]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd: Check that VPE has reached DPM0 in idle handler
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 16 Oct 2025 18:55:27 +0000 (13:55 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Oct 2025 13:46:13 +0000 (09:46 -0400)
commit3ac635367eb589bee8edcc722f812a89970e14b7
tree72100f9ad037b98b3681404b9b59820b4ba7eccd
parent883687c30736c1b4d36c8cc6153bca5c2c76a5d8
drm/amd: Check that VPE has reached DPM0 in idle handler

[Why]
Newer VPE microcode has functionality that will decrease DPM level
only when a workload has run for 2 or more seconds.  If VPE is turned
off before this DPM decrease and the PMFW doesn't reset it when
power gating VPE, the SOC can get stuck with a higher DPM level.

This can happen from amdgpu's ring buffer test because it's a short
quick workload for VPE and VPE is turned off after 1s.

[How]
In idle handler besides checking fences are drained check PMFW version
to determine if it will reset DPM when power gating VPE.  If PMFW will
not do this, then check VPE DPM level. If it is not DPM0 reschedule
delayed work again until it is.

v2: squash in return fix (Alex)

Cc: Peyton.Lee@amd.com
Reported-by: Sultan Alsawaf <sultan@kerneltoast.com>
Reviewed-by: Sultan Alsawaf <sultan@kerneltoast.com>
Tested-by: Sultan Alsawaf <sultan@kerneltoast.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4615
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c