From: Allen Li <[email protected]>

[Why&How]
To improve power saving of Replay,
skip the link off frame count check for general UI in DC mode.
Also disable timing sync in the same condition.

Reviewed-by: ChunTao (Chun-Tao) Tso <[email protected]>
Signed-off-by: Allen Li <[email protected]>
Signed-off-by: Roman Li <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dc_types.h                | 2 ++
 drivers/gpu/drm/amd/display/modules/power/power_replay.c | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h 
b/drivers/gpu/drm/amd/display/dc/dc_types.h
index 7ff2152ff233..af241b2bd29a 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_types.h
@@ -1311,6 +1311,8 @@ struct replay_settings {
        uint32_t replay_events;
        /* Last ABM periodic keep-alive FFU allowed bit sent to DMUB (VESA PR) 
*/
        bool last_abm_periodic_ffu_allowed;
+       /* System is in DC mode */
+       bool system_in_dc;
 };
 
 /* To split out "global" and "per-panel" config settings.
diff --git a/drivers/gpu/drm/amd/display/modules/power/power_replay.c 
b/drivers/gpu/drm/amd/display/modules/power/power_replay.c
index 7861e46c612d..666585b7e00c 100644
--- a/drivers/gpu/drm/amd/display/modules/power/power_replay.c
+++ b/drivers/gpu/drm/amd/display/modules/power/power_replay.c
@@ -338,9 +338,11 @@ static bool mod_power_update_replay_active_status(unsigned 
int active_replay_eve
 
        /* General UI scenario */
        if (active_replay_events & replay_event_general_ui) {
-               if (replay_enable_option & pr_enable_option_general_ui)
+               if (replay_enable_option & pr_enable_option_general_ui) {
+                       if (link->replay_settings.system_in_dc)
+                               
link->replay_settings.config.replay_timing_sync_supported = false;
                        return true;
-               else
+               } else
                        return false;
        }
 
-- 
2.34.1

Reply via email to