From d6795b64b172b24622d33a3e0c7c1c7d15870fd2 Mon Sep 17 00:00:00 2001 From: Ankit Nautiyal Date: Tue, 15 Sep 2026 22:16:53 +0530 Subject: [PATCH] drm/i915/dp: Account VSC SDP in min guardband The transmission line for VSC SDP is the same as AS SDP (EMP_AS_SDP_TL) when AS SDP is enabled. Otherwise, it uses the second line of delayed vblank. For VSC without AS SDP, this requires 2 lines plus 1 setup line, so the VRR guardband must be at least 3 lines. When both AS SDP and VSC SDP are enabled, the guardband requirement is already accounted for during optimized guardband calculation and the final guardband validation in compute_config_late(). However, when VSC SDP is enabled without AS SDP, the VSC SDP requirement is not checked explicitly. Even in the unlikely case where the optimized guardband is clamped to vblank length, it cannot fall below 5 lines since such modes are already pruned. Still, for completeness, account for VSC SDP and ensure a minimum guardband of 3 lines. Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Link: https://patch.msgid.link/20260915164657.3429075-13-ankit.k.nautiyal@intel.com --- drivers/gpu/drm/i915/display/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index f55ae30bebf8..27f03f36eabb 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -7397,6 +7397,8 @@ int intel_dp_get_lines_for_sdp(const struct intel_crtc_state *crtc_state, u32 ty return 8; case DP_SDP_PPS: return 7; + case DP_SDP_VSC: + return 3; case DP_SDP_ADAPTIVE_SYNC: return crtc_state->vrr.vsync_start + 1; default: @@ -7428,6 +7430,11 @@ int intel_dp_sdp_min_guardband(const struct intel_crtc_state *crtc_state, sdp_guardband = max(sdp_guardband, intel_dp_get_lines_for_sdp(crtc_state, DP_SDP_ADAPTIVE_SYNC)); + if (crtc_state->infoframes.enable & + intel_hdmi_infoframe_enable(DP_SDP_VSC)) + sdp_guardband = max(sdp_guardband, + intel_dp_get_lines_for_sdp(crtc_state, DP_SDP_VSC)); + return sdp_guardband; }