drm/amdgpu: fix fence handling in amdgpu_gem_object_close
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix fence handling in amdgpu_gem_object_close
The exclusive fence is only optional.
Signed-off-by Christian König <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +4 -2
@@ -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)
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by xinhui pan <[email protected]>
Quoted 33 lines
2020年3月31日 22:25,Christian König <[email protected]> 写道:
The exclusive fence is only optional.
Signed-off-by Christian König <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 6 ++++--1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +4
-2@@ -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)Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cxinhui.pan%40amd.com%7Cd59da038993e43160f6608d7d57f6535%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637212615519082332&sdata=kLCEV01aoJ6%2BrWD7yRBN1NB3b%2FJRyYA0TpV%2FGoATB0c%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx