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/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>

authored by

Ovidiu Bunea and committed by
Alex Deucher
f44c0944 413dd2fc

+5 -2
+5 -2
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 5540 5540 { 5541 5541 if (dc->ctx->dce_environment != DCE_ENV_VIRTUAL_HW && 5542 5542 dc->hwss.power_down_on_boot) { 5543 + if (dc->current_state->stream_count > 0) 5544 + return; 5545 + 5543 5546 if (dc->caps.ips_support) 5544 5547 dc_exit_ips_for_hw_access(dc); 5545 5548 dc->hwss.power_down_on_boot(dc); ··· 5554 5551 if (!dc->current_state) 5555 5552 return; 5556 5553 5554 + dc_exit_ips_for_hw_access(dc); 5555 + 5557 5556 switch (power_state) { 5558 5557 case DC_ACPI_CM_POWER_STATE_D0: 5559 5558 dc_state_construct(dc, dc->current_state); 5560 - 5561 - dc_exit_ips_for_hw_access(dc); 5562 5559 5563 5560 dc_z10_restore(dc); 5564 5561