From ca95261325cfdff85eb2c9107198c714e266cb5b Mon Sep 17 00:00:00 2001 From: "monk.liu" Date: Mon, 25 May 2015 14:44:05 +0800 Subject: [PATCH] drm/amdgpu: fix bug of vm_bo_map (v2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit call reservation_object_reserve_shared before amdgpu_bo_fence Signed-off-by: monk.liu Reviewed-by: Christian König Reviewed-by: Jammy Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index b25e533fd6e8..cc6dca2581a6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -315,6 +315,10 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, if (r) return r; + r = reservation_object_reserve_shared(bo->tbo.resv); + if (r) + return r; + r = ttm_bo_validate(&bo->tbo, &bo->placement, true, false); if (r) goto error_unreserve; -- 2.30.2