drm/amdgpu: use the preferred pin domain after the check
authorChristian König <christian.koenig@amd.com>
Wed, 18 Aug 2021 12:05:28 +0000 (14:05 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 20 Aug 2021 17:35:35 +0000 (13:35 -0400)
commit2a7b9a8437130fd328001f4edfac8eec98dfe298
tree57f2d6e93f5879840b411cc911cfa74a652125c4
parentdaa7772d477ec658dc1fd9127549a7996d8e0c2b
drm/amdgpu: use the preferred pin domain after the check

For some reason we run into an use case where a BO is already pinned
into GTT, but should be pinned into VRAM|GTT again.

Handle that case gracefully as well.

Reviewed-by: Shashank Sharma <Shashank.sharma@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c