drm/amd/display: Add missing mclk update
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Mon, 3 Apr 2023 20:10:27 +0000 (14:10 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Apr 2023 20:28:50 +0000 (16:28 -0400)
When using FPO, there is some misconfiguration that happens for the lack
of configuration of the MCLK switch in some circumstances. This commit
adds the required field update when using the MCLK switch.

Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@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/dml/dcn32/dcn32_fpu.c

index f0037cb43dca9f54124c3f49fd18732e359b7e28..23a972f2885fe914007582eb2fa300df96404deb 100644 (file)
@@ -1331,6 +1331,11 @@ static void dcn32_calculate_dlg_params(struct dc *dc, struct dc_state *context,
                        context->bw_ctx.dml.vba.DRAMClockChangeSupport[vlevel][context->bw_ctx.dml.vba.maxMpcComb]
                                        != dm_dram_clock_change_unsupported;
 
+       /* Pstate change might not be supported by hardware, but it might be
+        * possible with firmware driven vertical blank stretching.
+        */
+       context->bw_ctx.bw.dcn.clk.p_state_change_support |= context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching;
+
        context->bw_ctx.bw.dcn.clk.dppclk_khz = 0;
        context->bw_ctx.bw.dcn.clk.dtbclk_en = is_dtbclk_required(dc, context);
        context->bw_ctx.bw.dcn.clk.ref_dtbclk_khz = context->bw_ctx.dml.vba.DTBCLKPerState[vlevel] * 1000;