From 9862d2ac667a0e731aa75c17c1b146da809bc3ae Mon Sep 17 00:00:00 2001 From: ChunTao Tso Date: Mon, 8 Dec 2025 17:36:57 +0800 Subject: [PATCH] drm/amd/display: Add frame skip feature support flag [WHY] The set_replay_frame_skip_number() function should not execute when the link does not support the Frame Skipping feature. [HOW] Add a new field `frame_skip_supported` to struct replay_config to indicate whether the link supports frame skipping. Check this flag at the beginning of set_replay_frame_skip_number() and return early if the feature is not supported. Reviewed-by: Robin Chen Signed-off-by: ChunTao Tso Signed-off-by: Chenyu Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h b/drivers/gpu/drm/amd/display/dc/dc_types.h index cf4bf0faf1cd9..455b22350ae8d 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_types.h +++ b/drivers/gpu/drm/amd/display/dc/dc_types.h @@ -1185,6 +1185,8 @@ struct replay_config { bool os_request_force_ffu; /* Replay optimization */ union replay_optimization replay_optimization; + /* Replay sub feature Frame Skipping is supported */ + bool frame_skip_supported; }; /* Replay feature flags*/ diff --git a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c index fd139b219bf9a..864002b637166 100644 --- a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c +++ b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c @@ -984,6 +984,9 @@ void set_replay_frame_skip_number(struct dc_link *link, uint32_t *frame_skip_number_array = NULL; uint32_t frame_skip_number = 0; + if (false == link->replay_settings.config.frame_skip_supported) + return; + if (link == NULL || flicker_free_refresh_rate_mhz == 0 || coasting_vtotal_refresh_rate_mhz == 0) return; -- 2.47.3