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 16:09:32 +0000 (12:09 -0400)
commit9deb0b3dcf13e573d54bec8498f044da9780f4e2
tree50504e4811859439ab1ba1819965a8953cc4cf32
parent8ac1696b1d6b9de0d31447d9e86fe8948b12dec1
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