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

drm/amd/display: run subvp validation with supported vlevel

[WHY]
Subvp portion validation currently assumes that if vlevel provided does not
support pstate, then none will, and so subvp is not used.

[HOW]
After get vlevel, use lowest vlevel that supports pstate if it
exists, and use that for subvp validation.

Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Dillon Varone <Dillon.Varone@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Dillon Varone and committed by
Alex Deucher
752e89a7 46604a08

+10
+10
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
··· 1169 1169 pipes[0].clks_cfg.dppclk_mhz = get_dppclk_calculated(&context->bw_ctx.dml, pipes, *pipe_cnt, 0); 1170 1170 *vlevel = dml_get_voltage_level(&context->bw_ctx.dml, pipes, *pipe_cnt); 1171 1171 1172 + /* Check that vlevel requested supports pstate or not 1173 + * if not, select the lowest vlevel that supports it 1174 + */ 1175 + for (i = *vlevel; i < context->bw_ctx.dml.soc.num_states; i++) { 1176 + if (vba->DRAMClockChangeSupport[i][vba->maxMpcComb] != dm_dram_clock_change_unsupported) { 1177 + *vlevel = i; 1178 + break; 1179 + } 1180 + } 1181 + 1172 1182 if (*vlevel < context->bw_ctx.dml.soc.num_states && 1173 1183 vba->DRAMClockChangeSupport[*vlevel][vba->maxMpcComb] != dm_dram_clock_change_unsupported 1174 1184 && subvp_validate_static_schedulability(dc, context, *vlevel)) {