drm/amd/display: report synced displays to PowerPlay on DCE <= 10
Subsystems (3)
PATCH v3 3/3 drm/amd/display: report synced displays to PowerPlay on DCE <= 10
On DCE 11.0 and 11.2, bw_calcs() computes all_displays_in_sync via resource_are_streams_timing_synchronizable(), and dce11_pplib_apply_display_requirements() copies it to pp_display_cfg->all_displays_in_sync.
However, DCE 6, 8, and 10 (including iMac15,1 on DCE 8 and iMac17,1 on DCE 10) use dce100_validate_bandwidth()—which does not call bw_calcs()—and dce_pplib_apply_display_requirements() in dce_clk_mgr.c, leaving pp_display_cfg->all_displays_in_sync unset (false). Because PowerPlay is not informed that the streams have synchronized vertical blanking intervals, SMU7 prevents MCLK switching at idle or causes modeset underflows.
Set context->bw_ctx.bw.dce.all_displays_in_sync in dce100_validate_bandwidth() using resource_are_streams_timing_synchronizable() and copy it to pp_display_cfg->all_displays_in_sync in dce_pplib_apply_display_requirements(), matching the existing DCE 11 flow.
--- .../gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c | 3 +++ .../drm/amd/display/dc/resource/dce100/dce100_resource.c | 9 +++++++++ 2 files changed, 12 insertions(+)
drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c +3 -0
@@ -320,6 +320,9 @@ static void dce_pplib_apply_display_requirements( {struct dm_pp_display_configuration *pp_display_cfg = &context->pp_display_cfg; + pp_display_cfg->all_displays_in_sync = + context->bw_ctx.bw.dce.all_displays_in_sync; +dce110_fill_display_configs (context, pp_display_cfg);if (memcmp (&dc->current_state->pp_display_cfg, pp_display_cfg,sizeof (*pp_display_cfg)) !=0 )
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +9 -0
@@ -888,6 +888,14 @@ enum dc_status dce100_validate_bandwidth(/* TODO implement when needed but for now hardcode max value*/ context->bw_ctx.bw.dce.dispclk_khz =681000 ; context->bw_ctx.bw.dce.yclk_khz =250000 *MEMORY_TYPE_MULTIPLIER_CZ ; + context->bw_ctx.bw.dce.all_displays_in_sync = context->stream_count >1 ; +for (i =1 ; i < context->stream_count; i++) { +if (!resource_are_streams_timing_synchronizable ( + context->streams[0 ], context->streams[i])) { + context->bw_ctx.bw.dce.all_displays_in_sync = false; +break ; + } + } }else {/* On DCE 6.0 and 6.4 the PLL0 is both the display engine clock and * the DP clock, and shouldn't be turned off. Just select the display
@@ -900,6 +908,7 @@ enum dc_status dce100_validate_bandwidth( context->bw_ctx.bw.dce.dispclk_khz =0 ; context->bw_ctx.bw.dce.yclk_khz =0 ; + context->bw_ctx.bw.dce.all_displays_in_sync = false; }return DC_OK ;
Signature · 1 line
2.55.0