mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
drm/amd/display: Enable FPO for configs that could reduce vlevel
[Description] - On high refresh rate DRR displays that support VBLANK naturally, UCLK could be idling at DPM1 instead of DPM0 since it doesn't use FPO - To achieve DPM0, enable FPO on these configs even though it can support P-State without FPO - Default disable for now, have debug option to enable Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com> Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -1961,7 +1961,8 @@ void dcn32_calculate_wm_and_dlg_fpu(struct dc *dc, struct dc_state *context,
|
||||
|
||||
context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching = false;
|
||||
|
||||
if (!pstate_en) {
|
||||
if (!pstate_en || (!dc->debug.disable_fpo_optimizations &&
|
||||
pstate_en && vlevel != 0)) {
|
||||
/* only when the mclk switch can not be natural, is the fw based vblank stretch attempted */
|
||||
context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching =
|
||||
dcn30_can_support_mclk_switch_using_fw_based_vblank_stretch(dc, context);
|
||||
@@ -1985,11 +1986,21 @@ void dcn32_calculate_wm_and_dlg_fpu(struct dc *dc, struct dc_state *context,
|
||||
context->bw_ctx.dml.soc.fclk_change_latency_us =
|
||||
dc->clk_mgr->bw_params->dummy_pstate_table[dummy_latency_index].dummy_pstate_latency_us;
|
||||
}
|
||||
dcn32_internal_validate_bw(dc, context, pipes, &pipe_cnt, &vlevel, false);
|
||||
maxMpcComb = context->bw_ctx.dml.vba.maxMpcComb;
|
||||
dcfclk_from_fw_based_mclk_switching = context->bw_ctx.dml.vba.DCFCLKState[vlevel][context->bw_ctx.dml.vba.maxMpcComb];
|
||||
pstate_en = context->bw_ctx.dml.vba.DRAMClockChangeSupport[vlevel][maxMpcComb] !=
|
||||
dm_dram_clock_change_unsupported;
|
||||
dcn32_internal_validate_bw(dc, context, pipes, &pipe_cnt, &vlevel_temp, false);
|
||||
if (vlevel_temp < vlevel) {
|
||||
vlevel = vlevel_temp;
|
||||
maxMpcComb = context->bw_ctx.dml.vba.maxMpcComb;
|
||||
dcfclk_from_fw_based_mclk_switching = context->bw_ctx.dml.vba.DCFCLKState[vlevel][context->bw_ctx.dml.vba.maxMpcComb];
|
||||
pstate_en = true;
|
||||
} else {
|
||||
/* Restore FCLK latency and re-run validation to go back to original validation
|
||||
* output if we find that enabling FPO does not give us any benefit (i.e. lower
|
||||
* voltage level)
|
||||
*/
|
||||
context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching = false;
|
||||
context->bw_ctx.dml.soc.fclk_change_latency_us = dc->clk_mgr->bw_params->wm_table.nv_entries[WM_A].dml_input.fclk_change_latency_us;
|
||||
dcn32_internal_validate_bw(dc, context, pipes, &pipe_cnt, &vlevel, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user