From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Bob Zhou <bobzhou2@amd.com>, Leo Liu <leo.liu@amd.com>,
Frank Min <Frank.Min@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.18.y 6/6] drm/amdgpu: avoid force-completing uninitialized UVD rings
Date: Sat, 12 Sep 2026 07:17:11 -0400 [thread overview]
Message-ID: <20260912111711.2285466-6-sashal@kernel.org> (raw)
In-Reply-To: <20260912111711.2285466-1-sashal@kernel.org>
From: Bob Zhou <bobzhou2@amd.com>
[ Upstream commit 6760f5cb12d2366ddd58a2d8637f7583d73f596b ]
uvd_v7_0_sw_init() does not initialize the UVD decode ring for an
SR-IOV VF. However, amdgpu_uvd_resume() unconditionally force-completes
the decode ring when restoring its fence sequence.
Skip fence completion when the fence driver is not initialized.
Fixes: 0a33b11d26c6 ("drm/amdgpu: mark force completed fences with -ECANCELED")
Cc: stable@vger.kernel.org
Signed-off-by: Bob Zhou <bobzhou2@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Acked-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index f10268de0ea3c..5f8c036773552 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -516,7 +516,8 @@ int amdgpu_uvd_resume(struct amdgpu_device *adev)
}
memset_io(ptr, 0, size);
/* to restore uvd fence seq */
- amdgpu_fence_driver_force_completion(&adev->uvd.inst[i].ring, NULL);
+ if (adev->uvd.inst[i].ring.fence_drv.initialized)
+ amdgpu_fence_driver_force_completion(&adev->uvd.inst[i].ring, NULL);
}
}
return 0;
--
2.53.0
prev parent reply other threads:[~2026-09-12 11:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 11:29 FAILED: patch "[PATCH] drm/amdgpu: avoid force-completing uninitialized UVD rings" failed to apply to 6.18-stable tree gregkh
2026-09-12 11:17 ` [PATCH 6.18.y 1/6] drm/amdgpu: Fix missing unwind in amdgpu_ib_schedule() error path Sasha Levin
2026-09-12 11:17 ` [PATCH 6.18.y 2/6] drm/amdgpu: add a helper to calculate ring distance Sasha Levin
2026-09-12 11:17 ` [PATCH 6.18.y 3/6] drm/amdgpu: reorder IB schedule sequence Sasha Levin
2026-09-12 11:17 ` [PATCH 6.18.y 4/6] drm/amdgpu: Make amdgpu_vm_flush() non-failing in submission path Sasha Levin
2026-09-12 11:17 ` [PATCH 6.18.y 5/6] drm/amdgpu: plumb timedout fence through to force completion Sasha Levin
2026-09-12 11:17 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260912111711.2285466-6-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Frank.Min@amd.com \
--cc=alexander.deucher@amd.com \
--cc=bobzhou2@amd.com \
--cc=leo.liu@amd.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox