From: Sreeja Golui <[email protected]>

Why:
Ramless Idle static-screen streams can also use extended blanking and
should receive the relaxed stutter constraint.

How:
Add a timing flag for Ramless Idle static-screen mode and treat it
like fixed DRR when deciding whether to relax the stutter factor.

Cc: Dillon Varone <[email protected]>
Signed-off-by: Sreeja Golui <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
---
 .../display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h  | 1 +
 .../dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c       | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h
index 27ffe7ed11c7..816443c9427b 100644
--- 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h
+++ 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h
@@ -289,6 +289,7 @@ struct dml2_timing_cfg {
                bool disallowed;
                bool drr_active_variable;
                bool drr_active_fixed;
+               bool drr_active_idle_static_screen;
        } drr_config;
        unsigned long vblank_nom;
 };
diff --git 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c
 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c
index 3584dbe4c9fb..62ac29dfe9be 100644
--- 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c
+++ 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c
@@ -2361,9 +2361,10 @@ static bool 
should_relax_stutter_constraint_for_stream(const struct dml2_pmo_ini
                unsigned int stream_index)
 {
        // relax the stutter constraint when:
-       // 1. Stream has DRR fixed enabled (assumed blank is extended 
sufficiently beyond nominal)
+       // 1. Stream has fixed DRR or Ramless Idle static screen enabled 
(extended blank)
        // 2. The option to relax stutter constraint is enabled in PMO options.
-       return 
in_out->base_display_config->display_config.stream_descriptors[stream_index].timing.drr_config.drr_active_fixed
 &&
+       return 
(in_out->base_display_config->display_config.stream_descriptors[stream_index].timing.drr_config.drr_active_fixed
 ||
+                       
in_out->base_display_config->display_config.stream_descriptors[stream_index].timing.drr_config.drr_active_idle_static_screen)
 &&
                        
in_out->instance->options->relax_stutter_constraint_for_drr;
 }
 
-- 
2.43.0

Reply via email to