drm/i915/dp: Add a helper to decide if AS SDP can be used

Add a helper that determines whether AS SDP can be used for the
current DP configuration. For now this is true only when the sink
supports AS SDP and VRR is enabled, but more conditions may be added
later.

v2:
 - Rename to intel_dp_needs_as_sdp(). (Ville)
 - Add a #FIXME documenting non-atomic of DP SDP updates. (Ville)

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/20260424090942.3060291-3-ankit.k.nautiyal@intel.com
This commit is contained in:
Ankit Nautiyal 2026-04-24 14:39:41 +05:30
parent 60656fa8fe
commit e2b3b2e8fa

View File

@ -3168,6 +3168,15 @@ static void intel_dp_compute_vsc_colorimetry(const struct intel_crtc_state *crtc
vsc->content_type = DP_CONTENT_TYPE_NOT_DEFINED;
}
static bool intel_dp_needs_as_sdp(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state)
{
if (!intel_dp->as_sdp_supported)
return false;
return crtc_state->vrr.enable;
}
static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state)
{
@ -3175,7 +3184,12 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
const struct drm_display_mode *adjusted_mode =
&crtc_state->hw.adjusted_mode;
if (!crtc_state->vrr.enable || !intel_dp->as_sdp_supported)
/*
* #FIXME: SDP/infoframe updates arent truly atomic, and with the new
* cdclk->tc clock crossing we may transiently send a corrupted packet
* if the update lands midtransmission.
*/
if (!intel_dp_needs_as_sdp(intel_dp, crtc_state))
return;
crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);