Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/uvd3.1: Don't validate the firmware when already validated

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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 889a2cfd889c4a4dd9d0c89ce9a8e60b78be71dd)

authored by

Timur Kristóf and committed by
Alex Deucher
13e4cf11 0ef196a2

+10
+10
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
··· 242 242 uint64_t addr; 243 243 uint32_t size; 244 244 245 + /* When the keyselect is already set, don't perturb it. */ 246 + if (RREG32(mmUVD_FW_START)) 247 + return; 248 + 245 249 /* program the VCPU memory controller bits 0-27 */ 246 250 addr = (adev->uvd.inst->gpu_addr + AMDGPU_UVD_FIRMWARE_OFFSET) >> 3; 247 251 size = AMDGPU_UVD_FIRMWARE_SIZE(adev) >> 3; ··· 287 283 { 288 284 int i; 289 285 uint32_t keysel = adev->uvd.keyselect; 286 + 287 + if (RREG32(mmUVD_FW_START) & UVD_FW_STATUS__PASS_MASK) { 288 + dev_dbg(adev->dev, "UVD keyselect already set: 0x%x (on CPU: 0x%x)\n", 289 + RREG32(mmUVD_FW_START), adev->uvd.keyselect); 290 + return 0; 291 + } 290 292 291 293 WREG32(mmUVD_FW_START, keysel); 292 294