drm/amdgpu: unreserve the gem BO before returning from attach error
Subsystems (2)
PATCH 1/1 drm/amdgpu: unreserve the gem BO before returning from attach error
It requires unlocking the reserved gem BO before returning from attaching the eviction fence error.
Signed-off-by Prike Liang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1 -0
@@ -298,6 +298,7 @@ static int amdgpu_gem_object_open(struct drm_gem_object *obj, r =amdgpu_eviction_fence_attach (&fpriv->evf_mgr, abo);if (r) {DRM_DEBUG_DRIVER ("Failed to attach eviction fence to BO\n" ); +amdgpu_bo_unreserve (abo);return r; }
Signature · 1 line
2.34.1
Quoted 4 lines · Prike Liang
It requires unlocking the reserved gem BO before returning from attaching the eviction fence error.
Signed-off-by Prike Liang <[email protected]>
Reviewed-by Christian König <[email protected]>
Quoted 16 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1
-0@@ -298,6 +298,7 @@ static int amdgpu_gem_object_open(struct drm_gem_object *obj, r =amdgpu_eviction_fence_attach (&fpriv->evf_mgr, abo);if (r) {DRM_DEBUG_DRIVER ("Failed to attach eviction fence to BO\n" ); +amdgpu_bo_unreserve (abo);return r; }