drm/amd/display: Check frame skip capability in Sink side
authorLeon Huang <Leon.Huang1@amd.com>
Tue, 20 Jan 2026 08:04:09 +0000 (16:04 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 12 Feb 2026 20:08:30 +0000 (15:08 -0500)
[Why&How]
Frame skip capability is described in AMD VSDB in EDID.
Need to retrieve the cap and determine fr.skipping mode enablement

Reviewed-by: ChunTao Tso <chuntao.tso@amd.com>
Signed-off-by: Leon Huang <Leon.Huang1@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@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/link/protocols/link_dp_panel_replay.c

index cc3b44c..4a9e86d 100644 (file)
@@ -34,6 +34,7 @@
        link->ctx->logger
 
 #define DP_SINK_PR_ENABLE_AND_CONFIGURATION            0x37B
+#define DP_SINK_ENABLE_FRAME_SKIPPING_MODE_SHIFT       (5)
 
 static unsigned int dp_pr_calc_num_static_frames(unsigned int vsync_rate_hz)
 {
@@ -89,6 +90,7 @@ static bool dp_setup_panel_replay(struct dc_link *link, const struct dc_stream_s
        union panel_replay_enable_and_configuration_2 pr_config_2 = { 0 };
 
        union dpcd_alpm_configuration alpm_config;
+       uint8_t data = 0;
 
        replay_context.controllerId = CONTROLLER_ID_UNDEFINED;
 
@@ -186,6 +188,14 @@ static bool dp_setup_panel_replay(struct dc_link *link, const struct dc_stream_s
                        DP_RECEIVER_ALPM_CONFIG,
                        &alpm_config.raw,
                        sizeof(alpm_config.raw));
+
+               //Enable frame skipping
+               if (link->replay_settings.config.frame_skip_supported)
+                       data = data | (1 << DP_SINK_ENABLE_FRAME_SKIPPING_MODE_SHIFT);
+
+               dm_helpers_dp_write_dpcd(link->ctx, link,
+                       DP_SINK_PR_ENABLE_AND_CONFIGURATION,
+                       (uint8_t *)&(data), sizeof(uint8_t));
        }
 
        return true;