Re: [PATCH 08/19] drm/i915/dp: Add a helper to decide if AS SDP can be used

Nautiyal, Ankit K
2026-03-31T11:44:57Z

On 3/31/2026 1:10 AM, Ville Syrjälä wrote:
> On Mon, Mar 30, 2026 at 09:21:42PM +0300, Ville Syrjälä wrote:
>> On Mon, Mar 30, 2026 at 09:36:45AM +0530, Ankit Nautiyal wrote:
>>> 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.
>>>
>>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>>> ---
>>> drivers/gpu/drm/i915/display/intel_dp.c | 11 ++++++++++-
>>> 1 file changed, 10 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>>> index 499850c2abcf..7ca3f9d583db 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>>> @@ -3124,6 +3124,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_can_use_as_sdp(struct intel_dp *intel_dp,
>>> + struct intel_crtc_state *crtc_state)
> Hmm. Maybe the name should be .._need_as_sdp() or something like that
> instead. I can imagine many cases when we could use the AS SDP but don't
> have to.

Roger that. Will rename this to ..._needs_as_sdp().

Regards,

Ankit

>
>>> +{
>>> + if (!intel_dp->as_sdp_supported)
>>> + return false;
>>> +
>> Could have a FIXME here about fastset being borked with this. Didn't
>> read far enough in the series yet to see if you did anything about that.
>>
>> Either way
>> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>>> + return crtc_state->vrr.enable;
>>> +}
>>> +
>>> static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
>>> struct intel_crtc_state *crtc_state)
>>> {
>>> @@ -3131,7 +3140,7 @@ 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)
>>> + if (!intel_dp_can_use_as_sdp(intel_dp, crtc_state))
>>> return;
>>>
>>> crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);
>>> --
>>> 2.45.2
>> --
>> Ville Syrjälä
>> Intel