summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authormonk.liu <monk.liu@amd.com>2015-05-25 14:44:05 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-06-03 21:03:53 -0400
commitca95261325cfdff85eb2c9107198c714e266cb5b (patch)
treed3c0e29c1c4eba85b0c07cf555a357956a18b294 /drivers
parent7e5a547f64af66fd906f266f0e8c9bde213d025c (diff)
downloadkernel-ca95261325cfdff85eb2c9107198c714e266cb5b.tar.gz
drm/amdgpu: fix bug of vm_bo_map (v2)
call reservation_object_reserve_shared before amdgpu_bo_fence Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian K├Ânig <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c4
1 files changed, 4 insertions, 0 deletions
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;