]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/dp: Account for AS_SDP guardband only when enabled
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Wed, 27 May 2026 04:10:50 +0000 (09:40 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 28 May 2026 11:18:10 +0000 (16:48 +0530)
Currently the intel_dp_sdp_min_guardband() accounts for AS_SDP for all
platforms that support adaptive sync SDP even for configurations where
it cannot be enabled. Instead account for adaptive sync SDP guardband
only when it is enabled.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260527041050.601735-13-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index 03c2ec56ee81b1b622b06f6e9ea9de1a9e5d1e05..0ce0c09835f6d6b63f0639a7184ce72d36cf1f7c 100644 (file)
@@ -7591,7 +7591,6 @@ int intel_dp_get_lines_for_sdp(const struct intel_crtc_state *crtc_state, u32 ty
 int intel_dp_sdp_min_guardband(const struct intel_crtc_state *crtc_state,
                               bool assume_all_enabled)
 {
-       struct intel_display *display = to_intel_display(crtc_state);
        int sdp_guardband = 0;
 
        if (assume_all_enabled ||
@@ -7606,8 +7605,8 @@ 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_PPS));
 
-       if ((assume_all_enabled && HAS_AS_SDP(display)) ||
-           crtc_state->infoframes.enable & intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC))
+       if (crtc_state->infoframes.enable &
+           intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC))
                sdp_guardband = max(sdp_guardband,
                                    intel_dp_get_lines_for_sdp(crtc_state, DP_SDP_ADAPTIVE_SYNC));