]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: Exit IPS w/ DC helper for all dc_set_power_state cases
authorOvidiu Bunea <ovidiu.bunea@amd.com>
Wed, 4 Feb 2026 22:08:01 +0000 (17:08 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 23 Feb 2026 19:39:31 +0000 (14:39 -0500)
commitf44c094449669c7d9ac403cc73ce23e255f0828b
treefcbe0115af821ad0d46b7b79486425edca49bcee
parent413dd2fc603b18566e0d8cd6e79acf1ae292808a
drm/amd/display: Exit IPS w/ DC helper for all dc_set_power_state cases

[why & how]
On D3 path during dc_set_power_state, we may be in idle_allowed=true,
at which point we will exit idle via dc_wake_and_execute_dmub_cmd_list
which doesn't update dc->idle_optimizations_allowed to false. This
would cause any future attempts to allow idle optimizations via the DC
helper to get skipped because the value is stale and not reflective of
the actual HW state.

Move dc_exit_ips_for_hw_access() to the top of the function.
Additionally ensure that dc_power_down_on_boot thread holds the DC
lock and only runs if there are 0 streams.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c