]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: move memory accounting into vmwgfx v4
authorChristian König <christian.koenig@amd.com>
Tue, 17 Nov 2020 12:52:28 +0000 (13:52 +0100)
committerChristian König <christian.koenig@amd.com>
Tue, 9 Feb 2021 16:27:33 +0000 (17:27 +0100)
commitaa5f26629fe6049c19aeb978135626f636d76405
tree306bc358491ab26c0fc9b53e70128828a053363b
parentcb693db27a7d0c9ba15eb6a61f39b31bbcf1ad67
drm/ttm: move memory accounting into vmwgfx v4

This is just another feature which is only used by VMWGFX, so move
it into the driver instead.

I've tried to add the accounting sysfs file to the kobject of the drm
minor, but I'm not 100% sure if this works as expected.

v2: fix typo in KFD and avoid 64bit divide
v3: fix init order in VMWGFX
v4: use pdev sysfs reference instead of drm

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Zack Rusin <zackr@vmware.com> (v3)
Tested-by: Nirmoy Das <nirmoy.das@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210208133226.36955-2-christian.koenig@amd.com
24 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/drm_gem_vram_helper.c
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/qxl/qxl_object.c
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/ttm/Makefile
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo_util.c
drivers/gpu/drm/ttm/ttm_device.c
drivers/gpu/drm/ttm/ttm_memory.c [deleted file]
drivers/gpu/drm/ttm/ttm_pool.c
drivers/gpu/drm/vmwgfx/Makefile
drivers/gpu/drm/vmwgfx/ttm_memory.c [new file with mode: 0644]
drivers/gpu/drm/vmwgfx/ttm_memory.h [new file with mode: 0644]
drivers/gpu/drm/vmwgfx/ttm_object.h
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
include/drm/ttm/ttm_bo_api.h
include/drm/ttm/ttm_bo_driver.h
include/drm/ttm/ttm_memory.h [deleted file]
include/drm/ttm/ttm_tt.h