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 <Prike.Liang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Prike Liang
2025-05-06 16:32:23 +08:00
committed by Alex Deucher
parent 926c79ad6e
commit def41146b9

View File

@@ -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;
}