Skip to content

ttm mem manager refactoring.

Dave Airlie dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest49 patches 49 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/49drm/qxl/ttm: call ttm manager debugdrivers/gpu/drm/qxl/qxl_ttm.c+4 -60 replies
2/49drm/vram-helper: call the ttm manager debug functiondrivers/gpu/drm/drm_gem_vram_helper.c+2 -41 reply
3/49drm/ttm: split the mm manager init codedrivers/gpu/drm/ttm/ttm_bo.c include/drm/ttm/ttm_bo_api.h include/drm/ttm/ttm_bo_driver.h+30 -145 replies
4/49drm/ttm: provide a driver-led init path for generic mm manager.drivers/gpu/drm/ttm/ttm_bo_manager.c include/drm/ttm/ttm_bo_driver.h+23 -34 replies
5/49drm/amdgpu/ttm: init managers from the driver side.drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1 more+33 -460 replies
6/49drm/radeon: use new ttm man init pathdrivers/gpu/drm/radeon/radeon_ttm.c+3 -50 replies
7/49drm/qxl/ttm: use new init path for managerdrivers/gpu/drm/qxl/qxl_ttm.c+1 -20 replies
8/49drm/vram_helper: use new ttm manager init functiondrivers/gpu/drm/drm_gem_vram_helper.c+1 -20 replies
9/49drm/nouveau: use new memory manager init pathsdrivers/gpu/drm/nouveau/nouveau_ttm.c+19 -240 replies
10/49drm/vmwgfx/ttm: convert vram mm init to new code pathsdrivers/gpu/drm/vmwgfx/vmwgfx_drv.c drivers/gpu/drm/vmwgfx/vmwgfx_drv.h drivers/gpu/drm/vmwgfx/vmwgfx_thp.c+28 -130 replies
11/49drm/vmwgfx/ttm: switch gmrid allocator to new init paths.drivers/gpu/drm/vmwgfx/vmwgfx_drv.c drivers/gpu/drm/vmwgfx/vmwgfx_drv.h drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c+17 -210 replies
12/49drm/ttm: convert system manager init to new code.drivers/gpu/drm/ttm/ttm_bo.c+17 -131 reply
13/49drm/ttm: purge old manager init path.drivers/gpu/drm/ttm/ttm_bo.c drivers/gpu/drm/ttm/ttm_bo_manager.c include/drm/ttm/ttm_bo_api.h +1 more+9 -531 reply
14/49drm/ttm: pass man around instead of mem_type in some placesdrivers/gpu/drm/ttm/ttm_bo.c+6 -81 reply
15/49drm/ttm: make some inline helper functions for cleanup paths.drivers/gpu/drm/ttm/ttm_bo.c include/drm/ttm/ttm_bo_driver.h+14 -42 replies
16/49drm/ttm: start allowing drivers to use new takedown pathdrivers/gpu/drm/ttm/ttm_bo.c drivers/gpu/drm/ttm/ttm_bo_manager.c include/drm/ttm/ttm_bo_driver.h+28 -61 reply
17/49drm/amdgpu/ttm: use new takedown pathdrivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1 more+29 -131 reply
18/49drm/vmwgfx: takedown vram managerdrivers/gpu/drm/vmwgfx/vmwgfx_drv.c drivers/gpu/drm/vmwgfx/vmwgfx_drv.h drivers/gpu/drm/vmwgfx/vmwgfx_thp.c+26 -110 replies
19/49drm/vram_helper: call explicit mm takedowndrivers/gpu/drm/drm_gem_vram_helper.c+1 -00 replies
20/49drm/nouveau: use new cleanup pathsdrivers/gpu/drm/nouveau/nouveau_ttm.c+30 -110 replies
21/49drm/radeon/ttm: use new takedown pathsdrivers/gpu/drm/radeon/radeon_ttm.c+2 -21 reply
22/49drm/qxl/ttm: use new takedown pathdrivers/gpu/drm/qxl/qxl_ttm.c+2 -20 replies
23/49drm/vmwgfx: fix gmrid takedown paths to new interfacedrivers/gpu/drm/vmwgfx/vmwgfx_drv.c drivers/gpu/drm/vmwgfx/vmwgfx_drv.h drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c+14 -80 replies
24/49drm/ttm: remove range manager legacy takedown pathdrivers/gpu/drm/ttm/ttm_bo_manager.c+9 -191 reply
25/49drm/ttm: make TTM responsible for cleaning system only.drivers/gpu/drm/ttm/ttm_bo.c include/drm/ttm/ttm_bo_api.h include/drm/ttm/ttm_bo_driver.h+4 -891 reply
26/49drm/ttm: add wrapper to get manager from bdev.drivers/gpu/drm/ttm/ttm_bo.c drivers/gpu/drm/ttm/ttm_bo_util.c drivers/gpu/drm/ttm/ttm_bo_vm.c +1 more+34 -285 replies
27/49drm/amdgfx/ttm: use wrapper to get ttm memory managersdrivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5 more+39 -360 replies
28/49drm/vram-helper: use wrapper to access memory managersdrivers/gpu/drm/drm_gem_vram_helper.c+3 -30 replies
29/49drm/nouveau/ttm: use wrapper to access memory managersdrivers/gpu/drm/nouveau/nouveau_ttm.c+4 -40 replies
30/49drm/qxl/ttm: use wrapper to access memory managerdrivers/gpu/drm/qxl/qxl_ttm.c+5 -50 replies
31/49drm/radeon/ttm: use wrapper to access memory managerdrivers/gpu/drm/radeon/radeon_gem.c drivers/gpu/drm/radeon/radeon_ttm.c+7 -80 replies
32/49drm/vmwgfx/ttm: use wrapper to access memory managerdrivers/gpu/drm/vmwgfx/vmwgfx_drv.c drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c drivers/gpu/drm/vmwgfx/vmwgfx_thp.c+17 -120 replies
33/49drm/ttm: rename manager variable to make sure wrapper is used.drivers/gpu/drm/ttm/ttm_bo.c include/drm/ttm/ttm_bo_driver.h+6 -30 replies
34/49drm/ttm: make manager debug function optionaldrivers/gpu/drm/ttm/ttm_bo.c+1 -13 replies
35/49drm/nouveau/ttm: don't fill in blank ttm debug callbackdrivers/gpu/drm/nouveau/nouveau_ttm.c+0 -91 reply
36/49drm/vmwgfx/gmrid: don't provide pointless ttm debug callbackdrivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c+0 -71 reply
37/49drm/ttm: allow drivers to provide their own manager subclassesinclude/drm/ttm/ttm_bo_driver.h+10 -10 replies
38/49drm/amdgpu/ttm: use bo manager subclassing for vram/gtt mgrsdrivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c+44 -271 reply
39/49drm/ttm: make ttm_bo_man_init/takedown take type + argsdrivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/drm_gem_vram_helper.c drivers/gpu/drm/nouveau/nouveau_ttm.c +5 more+67 -635 replies
40/49drm/ttm: move range manager to subclassed driver allocationdrivers/gpu/drm/ttm/ttm_bo_manager.c+20 -121 reply
41/49drm/vmwgfx/ttm: move thp to driver manageddrivers/gpu/drm/vmwgfx/vmwgfx_thp.c+22 -110 replies
42/49drm/vmwgfx/gmrid: convert to driver controlled allocation.drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c+20 -130 replies
43/49drm/nouveau/ttm: move to driver allocated managerdrivers/gpu/drm/nouveau/nouveau_ttm.c+28 -130 replies
44/49drm/ttm: drop priv pointer in memory managerinclude/drm/ttm/ttm_bo_driver.h+0 -21 reply
45/49drm/amdgpu/ttm: remove man->bdev references.drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c+5 -21 reply
46/49drm/ttm: drop man->bdev link.drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c drivers/gpu/drm/nouveau/nouveau_ttm.c +6 more+10 -171 reply
47/49drm/ttm: drop list of memory managers from device.drivers/gpu/drm/ttm/ttm_bo.c include/drm/ttm/ttm_bo_driver.h+4 -42 replies
48/49drm/ttm: drop type manager has_typedrivers/gpu/drm/ttm/ttm_bo.c include/drm/ttm/ttm_bo_driver.h+2 -90 replies
49/49drm/ttm: consolidate manager used apis into a set and get.drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c drivers/gpu/drm/nouveau/nouveau_ttm.c +6 more+28 -282 replies

Reviews trailers per patch

16 of 49 patches have a Reviewed-by or Acked-by.

PatchThomas ZimmermannChristian König
1/49
2/49R-b
3/49
4/49R-b
5/49
6/49
7/49
8/49
9/49
10/49
11/49
12/49R-b
13/49R-b
14/49R-b
15/49
16/49
17/49R-b
18/49
19/49
20/49
21/49R-b
22/49
23/49
24/49
25/49R-b
26/49
27/49
28/49
29/49
30/49
31/49
32/49
33/49
34/49R-b
35/49A-b
36/49A-b
37/49
38/49R-b
39/49
40/49R-b
41/49
42/49
43/49
44/49R-b
45/49R-b
46/49R-b
47/49
48/49
49/49

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/49] ttm mem manager refactoring.

I started pulling on a thread, and it led me down a hole.

This series refactors the ttm ttm_mem_type_manager object into a driver owned, allocated, subclassaed object.

It starts with two minor fixes for some bad assumptions in two drivers.

Enables a new init path, ports all the drivers to the new init path, and cleans up the old init path.
Enables a new takedown path, ports all the drivers to the new takedown path, and cleans up the old takedown path
Wraps all access to the memory managers in the bo_device in a wrapper across all drivers.
Make debug callback optional
Enables driver to provide their own mem manager objects Subclasses the objects in all drivers and makes them into driver owned object Drops the bo_device arrays of pointers, and some unneeded links and struct members
Cleans up one api.

I think I'd probably want to merge all this via drm-misc, so if I can collect acks/r-b from driver maintainers that would be good.

This is also based on Chrisitan's work to remove init_mem_type, so it won't apply until he's finished getting all of that into drm-misc.

https://cgit.freedesktop.org/~airlied/linux/log/?h=ttm-refactor-mem-manager
is the tree I've built this on top off, so it's probably going to get rebased but the code should stay mostly the same.

I've done some boot testing on nouveau, and I hope to test it on vmwgfx and amdgpu soon.

Dave.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel