From: Dillon Varone <[email protected]> why: Fixed-refresh DRR extends blanking and can use a relaxed stutter constraint to improve Z8 optimization eligibility.
how: Add the wrapper PMO option for DRR stutter constraint relaxation. Pass the option into DML21 initialization and enable it for DCN42. Signed-off-by: Dillon Varone <[email protected]> Signed-off-by: Wayne Lin <[email protected]> --- .../dc/dml2_wrapper/dml21_wrapper/dml21_translation_helper.c | 3 +++ drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml2_wrapper.h | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml21_wrapper/dml21_translation_helper.c b/drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml21_wrapper/dml21_translation_helper.c index 6a9f822b2b33..dc65750a7fe3 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml21_wrapper/dml21_translation_helper.c +++ b/drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml21_wrapper/dml21_translation_helper.c @@ -40,6 +40,9 @@ static void dml21_populate_pmo_options(struct dml2_pmo_options *pmo_options, pmo_options->force_mandatory_uclk_pstate_support = config->pmo.force_mandatory_uclk_pstate_support; pmo_options->force_optional_uclk_pstate_support = in_dc->debug.force_optional_uclk_pstate_support; + + // stutter + pmo_options->relax_stutter_constraint_for_drr = config->pmo.relax_stutter_constraint_for_drr; } static enum dml2_project_id dml21_dcn_revision_to_dml2_project_id(const struct dc *in_dc) diff --git a/drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml2_wrapper.h b/drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml2_wrapper.h index 68ae013b026e..c1eb8cdfc9a4 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml2_wrapper.h +++ b/drivers/gpu/drm/amd/display/dc/dml2_wrapper/dml2_wrapper.h @@ -242,6 +242,7 @@ struct dml2_configuration_options { struct { bool force_mandatory_uclk_pstate_support; bool force_pstate_method_enable; + bool relax_stutter_constraint_for_drr; enum dml2_force_pstate_methods force_pstate_method_values[MAX_PIPES]; } pmo; bool map_dc_pipes_with_callbacks; diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c index c01614005281..a6fd956d12e9 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c @@ -2468,6 +2468,8 @@ static bool dcn42_resource_construct( dc->dml2_options.pmo.force_mandatory_uclk_pstate_support = true; + dc->dml2_options.pmo.relax_stutter_constraint_for_drr = true; + /* SPL */ dc->caps.scl_caps.sharpener_support = true; -- 2.43.0
