]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Add frame skip feature support flag
authorChunTao Tso <chuntao.tso@amd.com>
Mon, 8 Dec 2025 09:36:57 +0000 (17:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2026 21:59:58 +0000 (16:59 -0500)
[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 <robin.chen@amd.com>
Signed-off-by: ChunTao Tso <chuntao.tso@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_types.h
drivers/gpu/drm/amd/display/modules/power/power_helpers.c

index cf4bf0faf1cd909935bc051e539e2275bb8000c1..455b22350ae8da208a57919d4857f0d211ad25fd 100644 (file)
@@ -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*/
index fd139b219bf9a5799822bb145afd937b74f7f7d9..864002b63716647a296b531c54f1b82c308fe772 100644 (file)
@@ -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;