Ver código fonte

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>
monk.liu 10 anos atrás
pai
commit
ca95261325
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

+ 4 - 0
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;