[PATCH] drm/amdgpu: fix fence handling in amdgpu_gem_object_close

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The exclusive fence is only optional.

Signed-off-by: Christian König <christian.koenig@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index a0be80513e96..77d988a0033f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -191,8 +191,10 @@ void amdgpu_gem_object_close(struct drm_gem_object *obj,
 		goto out_unlock;
 
 	fence = dma_resv_get_excl(bo->tbo.base.resv);
-	amdgpu_bo_fence(bo, fence, true);
-	fence = NULL;
+	if (fence) {
+		amdgpu_bo_fence(bo, fence, true);
+		fence = NULL;
+	}
 
 	r = amdgpu_vm_clear_freed(adev, vm, &fence);
 	if (r || !fence)
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux