aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2021-08-30 07:22:06 +0000
committerChristian König <[email protected]>2022-01-26 14:29:24 +0000
commit3f268ef06f8cf3c481dbd5843d564f5170c6df54 (patch)
tree102bbd239b2a6faeb16b64c2faf83e2cbb915bac /drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
parentdrm/ttm: add ttm_resource_fini v2 (diff)
downloadkernel-3f268ef06f8cf3c481dbd5843d564f5170c6df54.tar.gz
kernel-3f268ef06f8cf3c481dbd5843d564f5170c6df54.zip
drm/ttm: add back a reference to the bdev to the res manager
It is simply a lot cleaner to have this around instead of adding the device throughout the call chain. Signed-off-by: Christian König <[email protected]> Reviewed-by: Huang Rui <[email protected]> Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
index 55d68408951d..ddd0b6d74070 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
@@ -699,7 +699,8 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
struct amdgpu_vram_mgr *mgr = &adev->mman.vram_mgr;
struct ttm_resource_manager *man = &mgr->manager;
- ttm_resource_manager_init(man, adev->gmc.real_vram_size >> PAGE_SHIFT);
+ ttm_resource_manager_init(man, &adev->mman.bdev,
+ adev->gmc.real_vram_size >> PAGE_SHIFT);
man->func = &amdgpu_vram_mgr_func;