]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amd/display: Fix p-state type when p-state is unsupported
authorDillon Varone <Dillon.Varone@amd.com>
Wed, 12 Feb 2025 22:06:42 +0000 (17:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Mar 2025 15:39:05 +0000 (10:39 -0500)
[WHY&HOW]
P-state type would remain on previously used when unsupported which
causes confusion in logging and visual confirm, so set back to zero
when unsupported.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Dillon Varone <Dillon.Varone@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c

index 6b514fd03f16f88817a135406fc98c14067dd49a..367c6b7944122d6a328ad7c016f053238e88fdf2 100644 (file)
@@ -564,6 +564,7 @@ void set_p_state_switch_method(
        if (!dc->ctx || !dc->ctx->dmub_srv || !pipe_ctx || !vba)
                return;
 
+       pipe_ctx->p_state_type = P_STATE_UNKNOWN;
        if (vba->DRAMClockChangeSupport[vba->VoltageLevel][vba->maxMpcComb] !=
                        dm_dram_clock_change_unsupported) {
                /* MCLK switching is supported */