From: Prike Liang Date: Tue, 6 May 2025 08:32:23 +0000 (+0800) Subject: drm/amdgpu: unreserve the gem BO before returning from attach error X-Git-Tag: v6.16-rc1~144^2~10^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=def41146b96a9e292a17cddb1ac97007f41c44bc;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index f03fc3cf4d50b..2c68118fe9fd6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -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; }