From: "Christian König" <christian.koenig@amd.com>
To: "Timur Kristóf" <timur.kristof@gmail.com>,
amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com
Subject: Re: [PATCH 5/7] drm/amdgpu/uvd3.1: Don't validate the firmware when already validated
Date: Fri, 17 Apr 2026 09:22:39 +0200 [thread overview]
Message-ID: <5ee27a79-90b7-48ba-9fca-a87705e319d4@amd.com> (raw)
In-Reply-To: <20260416202643.25350-6-timur.kristof@gmail.com>
On 4/16/26 22:26, Timur Kristóf wrote:
> UVD 3.1 firmware validation seems to always fail after
> attempting it when it had already been validated.
> (This works similarly with the VCE 1.0 as well.)
>
> Don't attempt repeating the validation when it's already done.
>
> This caused issues in situations when the system isn't able
> to suspend the GPU properly and so the GPU isn't actually
> powered down. Then amdgpu would fail when calling the IP
> block resume function.
>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/2887
> Fixes: bb7978111dd3 ("drm/amdgpu: fix SI UVD firmware validate resume fail")
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c b/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
> index fea576a7f397f..efb3fde919ee3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
> @@ -242,6 +242,10 @@ static void uvd_v3_1_mc_resume(struct amdgpu_device *adev)
> uint64_t addr;
> uint32_t size;
>
> + /* When the keyselect is already set, don't perturb it. */
> + if (RREG32(mmUVD_FW_START))
> + return;
> +
> /* program the VCPU memory controller bits 0-27 */
> addr = (adev->uvd.inst->gpu_addr + AMDGPU_UVD_FIRMWARE_OFFSET) >> 3;
> size = AMDGPU_UVD_FIRMWARE_SIZE(adev) >> 3;
> @@ -284,6 +288,12 @@ static int uvd_v3_1_fw_validate(struct amdgpu_device *adev)
> int i;
> uint32_t keysel = adev->uvd.keyselect;
>
> + if (RREG32(mmUVD_FW_START) & UVD_FW_STATUS__PASS_MASK) {
> + dev_dbg(adev->dev, "UVD keyselect already set: 0x%x (on CPU: 0x%x)\n",
> + RREG32(mmUVD_FW_START), adev->uvd.keyselect);
> + return 0;
> + }
> +
> WREG32(mmUVD_FW_START, keysel);
>
> for (i = 0; i < 10; ++i) {
next prev parent reply other threads:[~2026-04-17 7:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 20:26 [PATCH 0/7] Various SI fixes, fix Radeon HD 7870 XT Timur Kristóf
2026-04-16 20:26 ` [PATCH 1/7] drm/amdgpu/gmc: Fix AMDGPU_GART_PLACEMENT_LOW to not overlap with VRAM Timur Kristóf
2026-04-17 10:58 ` Christian König
2026-04-16 20:26 ` [PATCH 2/7] drm/amdgpu/vce: Align VCPU BO to a power of two address Timur Kristóf
2026-04-17 7:08 ` Christian König
2026-04-16 20:26 ` [PATCH 3/7] drm/amdgpu: Add alignment to amdgpu_gtt_mgr_alloc_entries() Timur Kristóf
2026-04-16 20:26 ` [PATCH 4/7] drm/amdgpu/vce1: Fix workaround to ensure low 32-bit VCPU address Timur Kristóf
2026-04-17 7:21 ` Christian König
2026-04-16 20:26 ` [PATCH 5/7] drm/amdgpu/uvd3.1: Don't validate the firmware when already validated Timur Kristóf
2026-04-17 7:22 ` Christian König [this message]
2026-04-16 20:26 ` [PATCH 6/7] Documentation/gpu: Add TCC, update TCP in amdgpu glossary Timur Kristóf
2026-04-17 7:24 ` Christian König
2026-04-17 8:36 ` Timur Kristóf
2026-04-17 9:03 ` Christian König
2026-04-16 20:26 ` [PATCH 7/7] drm/amdgpu/gfx6: Support harvested SI chips with disabled TCCs Timur Kristóf
2026-04-17 12:56 ` Christian König
2026-04-17 13:36 ` Alex Deucher
2026-04-17 14:09 ` Timur Kristóf
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=5ee27a79-90b7-48ba-9fca-a87705e319d4@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=timur.kristof@gmail.com \
/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