aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authormonk.liu <[email protected]>2015-05-25 06:44:05 +0000
committerAlex Deucher <[email protected]>2015-06-04 01:03:53 +0000
commitca95261325cfdff85eb2c9107198c714e266cb5b (patch)
treed3c0e29c1c4eba85b0c07cf555a357956a18b294 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parentdrm/amdgpu: implement the allocation range (v3) (diff)
downloadkernel-ca95261325cfdff85eb2c9107198c714e266cb5b.tar.gz
kernel-ca95261325cfdff85eb2c9107198c714e266cb5b.zip
drm/amdgpu: fix bug of vm_bo_map (v2)
call reservation_object_reserve_shared before amdgpu_bo_fence Signed-off-by: monk.liu <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-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;