drm/amdgpu: Move dmabuf attach/detach to backend_(un)bind
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 21 Apr 2021 23:25:45 +0000 (19:25 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 May 2021 02:44:10 +0000 (22:44 -0400)
commite552ee40b02bb6d30b0278d03fa03fae357ec043
treedb4ef5b693cc52706bcc41b35cf8c6e7fbf50df8
parent5ac3c3e45fb93d14102fc7cdc69ad909f6980388
drm/amdgpu: Move dmabuf attach/detach to backend_(un)bind

The dmabuf attachment should be updated by moving the SG BO to DOMAIN_CPU
and back to DOMAIN_GTT. This does not necessarily invoke the
populate/unpopulate callbacks. Do this in backend_bind/unbind instead.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Oak Zeng <Oak.Zeng@amd.com>
Acked-by: Ramesh Errabolu <Ramesh.Errabolu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c