Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: "Hogander, Jouni" <jouni.hogander@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH 2/5] drm/i915/dp: Add helper to get min sdp guardband
Date: Fri, 17 Oct 2025 16:37:08 +0530	[thread overview]
Message-ID: <5f813c0e-4bfc-4447-bd92-e88b7d4b176c@intel.com> (raw)
In-Reply-To: <ef18e6ca3eaa07953feda2cc8e7b9c53f7db6ab6.camel@intel.com>


On 10/17/2025 4:20 PM, Hogander, Jouni wrote:
> On Fri, 2025-10-17 at 10:31 +0530, Ankit Nautiyal wrote:
>> Add a helper to compute vblank time needed for transmitting specific
>> DisplayPort SDPs like PPS, GAMUT_METADATA, and VSC_EXT. Latency is
>> based on line count per packet type.
>>
>> This will be used to ensure adequate guardband when features like
>> DSC/HDR
>> are enabled.
>>
>> Bspec: 70151
>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>> ---
>>   drivers/gpu/drm/i915/display/intel_dp.c | 36
>> +++++++++++++++++++++++++
>>   drivers/gpu/drm/i915/display/intel_dp.h |  2 ++
>>   2 files changed, 38 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
>> b/drivers/gpu/drm/i915/display/intel_dp.c
>> index 7059d55687cf..3f2c319e3d6f 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -6990,3 +6990,39 @@ int intel_dp_compute_config_late(struct
>> intel_encoder *encoder,
>>   
>>   	return 0;
>>   }
>> +
>> +static
>> +int intel_dp_get_lines_for_sdp(u32 type)
>> +{
>> +	switch (type) {
>> +	case DP_SDP_VSC_EXT_VESA:
>> +	case DP_SDP_VSC_EXT_CEA:
>> +		return 10;
>> +	case HDMI_PACKET_TYPE_GAMUT_METADATA:
>> +		return 8;
>> +	case DP_SDP_PPS:
>> +		return 6;
> I found value 7 in the Bspec you are referring in commit message?

Hmm this indeed is 7, seems I misread the spec. Thanks for catching this!

Regards,

Ankit

>
> BR,
>
> Jouni Högander
>
>> +	default:
>> +		break;
>> +	}
>> +
>> +	return 0;
>> +}
>> +
>> +int intel_dp_sdp_min_guardband(const struct intel_crtc_state
>> *crtc_state,
>> +			       bool assume_all_enabled)
>> +{
>> +	int sdp_guardband = 0;
>> +
>> +	if (assume_all_enabled ||
>> +	    crtc_state->infoframes.enable &
>> +	
>> intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GAMUT_METADATA))
>> +		sdp_guardband = max(sdp_guardband,
>> +				
>> intel_dp_get_lines_for_sdp(HDMI_PACKET_TYPE_GAMUT_METADATA));
>> +
>> +	if (assume_all_enabled ||
>> +	    crtc_state->dsc.compression_enable)
>> +		sdp_guardband = max(sdp_guardband,
>> intel_dp_get_lines_for_sdp(DP_SDP_PPS));
>> +
>> +	return sdp_guardband;
>> +}
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h
>> b/drivers/gpu/drm/i915/display/intel_dp.h
>> index 281ced3a3b39..7ee5aeb28fe2 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.h
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
>> @@ -221,5 +221,7 @@ bool intel_dp_in_hdr_mode(const struct
>> drm_connector_state *conn_state);
>>   int intel_dp_compute_config_late(struct intel_encoder *encoder,
>>   				 struct intel_crtc_state
>> *crtc_state,
>>   				 struct drm_connector_state
>> *conn_state);
>> +int intel_dp_sdp_min_guardband(const struct intel_crtc_state
>> *crtc_state,
>> +			       bool assume_all_enabled);
>>   
>>   #endif /* __INTEL_DP_H__ */

  reply	other threads:[~2025-10-17 11:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  5:01 [PATCH 0/5] Optimize vrr.guardband Ankit Nautiyal
2025-10-17  5:01 ` [PATCH 1/5] drm/i915/psr: Add helper to get min psr guardband Ankit Nautiyal
2025-10-17  9:07   ` Hogander, Jouni
2025-10-17  9:30     ` Hogander, Jouni
2025-10-17  9:41       ` Nautiyal, Ankit K
2025-10-17  9:37     ` Nautiyal, Ankit K
2025-10-17  9:58       ` Hogander, Jouni
2025-10-17 10:15         ` Hogander, Jouni
2025-10-17 10:30           ` Hogander, Jouni
2025-10-17 11:11           ` Nautiyal, Ankit K
2025-10-17 11:30             ` Hogander, Jouni
2025-10-17  5:01 ` [PATCH 2/5] drm/i915/dp: Add helper to get min sdp guardband Ankit Nautiyal
2025-10-17 10:50   ` Hogander, Jouni
2025-10-17 11:07     ` Nautiyal, Ankit K [this message]
2025-10-17  5:02 ` [PATCH 3/5] drm/i915/dp: Check if guardband can accommodate sdp latencies Ankit Nautiyal
2025-10-17 12:02   ` Ville Syrjälä
2025-10-17  5:02 ` [PATCH 4/5] drm/i915/vrr: Use the min static optimized guardband Ankit Nautiyal
2025-10-17 12:06   ` Ville Syrjälä
2025-10-17  5:02 ` [PATCH 5/5] drm/i915/vrr: Use optimized guardband whenever VRR TG is active Ankit Nautiyal
2025-10-17 12:13   ` Ville Syrjälä
2025-10-17  6:10 ` ✓ i915.CI.BAT: success for Optimize vrr.guardband (rev3) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-10-17 12:34 [PATCH 0/5] Optimize vrr.guardband Ankit Nautiyal
2025-10-17 12:35 ` [PATCH 2/5] drm/i915/dp: Add helper to get min sdp guardband Ankit Nautiyal
2025-10-17 13:03   ` Hogander, Jouni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f813c0e-4bfc-4447-bd92-e88b7d4b176c@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jouni.hogander@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox