Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: block MPO if it prevents pstate support

This change adds a method to block mpo when it would cause us to
exit pstate support. We should block mpo by default where MPO
causes issues by preventing pstate change.

Reviewed-by: Jun Lei <jun.lei@amd.com>
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Dmytro Laktyushkin and committed by
Alex Deucher
072ae240 ce74bece

+25 -2
+17
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 5420 5420 edp_link->dc->link_srv->edp_set_panel_power(edp_link, powerOn); 5421 5421 } 5422 5422 5423 + /* 5424 + ***************************************************************************** 5425 + * dc_get_power_profile_for_dc_state() - extracts power profile from dc state 5426 + * 5427 + * Called when DM wants to make power policy decisions based on dc_state 5428 + * 5429 + ***************************************************************************** 5430 + */ 5431 + struct dc_power_profile dc_get_power_profile_for_dc_state(const struct dc_state *context) 5432 + { 5433 + struct dc_power_profile profile = { 0 }; 5434 + 5435 + profile.power_level += !context->bw_ctx.bw.dcn.clk.p_state_change_support; 5436 + 5437 + return profile; 5438 + } 5439 +
+6
drivers/gpu/drm/amd/display/dc/dc.h
··· 2360 2360 2361 2361 void dc_query_current_properties(struct dc *dc, struct dc_current_properties *properties); 2362 2362 2363 + struct dc_power_profile { 2364 + int power_level; /* Lower is better */ 2365 + }; 2366 + 2367 + struct dc_power_profile dc_get_power_profile_for_dc_state(const struct dc_state *context); 2368 + 2363 2369 /* DSC Interfaces */ 2364 2370 #include "dc_dsc.h" 2365 2371
+2 -2
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
··· 137 137 #define DCN3_15_MAX_DET_SIZE 384 138 138 #define DCN3_15_CRB_SEGMENT_SIZE_KB 64 139 139 #define DCN3_15_MAX_DET_SEGS (DCN3_15_MAX_DET_SIZE / DCN3_15_CRB_SEGMENT_SIZE_KB) 140 - /* Minimum 2 extra segments need to be in compbuf and claimable to guarantee seamless mpo transitions */ 141 - #define MIN_RESERVED_DET_SEGS 2 140 + /* Minimum 3 extra segments need to be in compbuf and claimable to guarantee seamless mpo transitions */ 141 + #define MIN_RESERVED_DET_SEGS 3 142 142 143 143 enum dcn31_clk_src_array_id { 144 144 DCN31_CLK_SRC_PLL0,