From: Christian König Date: Wed, 3 Jan 2018 12:36:22 +0000 (+0100) Subject: drm/amdgpu: optimize moved handling only when vm_debug is inactive X-Git-Tag: v4.19~1610^2~10^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b8cad2047ddcce761b0665ba7e601228df82bfd;p=platform%2Fkernel%2Flinux-rpi3.git drm/amdgpu: optimize moved handling only when vm_debug is inactive Otherwise we would completely circumvent that debugging feature. Signed-off-by: Christian König Reviewed-by: Roger He Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 8150587..cd1752b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1685,7 +1685,7 @@ int amdgpu_vm_handle_moved(struct amdgpu_device *adev, if (resv == vm->root.base.bo->tbo.resv) clear = false; /* Try to reserve the BO to avoid clearing its ptes */ - else if (reservation_object_trylock(resv)) + else if (!amdgpu_vm_debug && reservation_object_trylock(resv)) clear = false; /* Somebody else is using the BO right now */ else