drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr
authorNirmoy Das <nirmoy.das@amd.com>
Fri, 7 Jan 2022 22:42:28 +0000 (17:42 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Jan 2022 20:44:26 +0000 (15:44 -0500)
commit1dd8b1b987fad93b647cb0fa5289d69b4c889dc2
tree99faa1f1bb1b49a2c6ae39630272ab1431df936d
parent62d5f9f7110ad374db67ab4820f4ff2d916c3cdb
drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

Do not allow exported amdgpu_gtt_mgr_*() to accept
any ttm_resource_manager pointer. Also there is no need
to force other module to call a ttm function just to
eventually call gtt_mgr functions.

v4: remove unused adev.
v3: upcast mgr from ttm resopurce manager instead of
getting it from adev.
v2: pass adev's gtt_mgr instead of adev.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h