All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Subject: Re: [PATCH 2/2] drm/i915/dp: set VSC_SDP MSA delegation only for capable sinks
Date: Tue, 28 Jul 2026 12:41:58 +0300	[thread overview]
Message-ID: <2f89bdd9ac273191ea28665bc48314eb36444d27@intel.com> (raw)
In-Reply-To: <20260709113951.3557968-3-chaitanya.kumar.borah@intel.com>

On Thu, 09 Jul 2026, Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> wrote:
> Per DP 1.4a section 2.2.4.3, the MSA MISC1 VSC_SDP bit signals that
> the sink should defer colorimetry to the VSC SDP. It should only be set
> when the sink advertises DP_VSC_SDP_EXT_FOR_COLORIMETRY_SUPPORTED and a
> VSC SDP with pixel encoding/colorimetry payload will actually be sent.
>
> Fold the colorimetry_support check into intel_dp_needs_vsc_colorimetry()
> so both intel_ddi_set_dp_msa() and intel_dp_compute_vsc_sdp() share a
> single consistent gate.
>
> Assisted-by: GitHub_Copilot:claude-sonnet-4.6

Who would teach Claude to add proper Fixes: and Cc: stable tags so
important fixes actually propagate to users in a timely fashion?

BR,
Jani.

> Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c |  2 ++
>  drivers/gpu/drm/i915/display/intel_dp.c  | 14 ++++++++++----
>  2 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index c764472bd69a..13010375e21b 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -469,6 +469,8 @@ void intel_ddi_set_dp_msa(const struct intel_crtc_state *crtc_state,
>  	 * of Color Encoding Format and Content Color Gamut] while sending
>  	 * YCBCR 420, HDR BT.2020 signals we should program MSA MISC1 fields
>  	 * which indicate VSC SDP for the Pixel Encoding/Colorimetry Format.
> +	 * Only set the delegation bit when the content needs it and
> +	 * the sink advertises support.
>  	 */
>  	if (intel_dp_needs_vsc_colorimetry(crtc_state, conn_state))
>  		temp |= DP_MSA_MISC_COLOR_VSC_SDP;
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 93282694c29b..53688c5bef74 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3163,8 +3163,7 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
>  {
>  	struct drm_dp_vsc_sdp *vsc;
>  
> -	if ((!intel_dp->colorimetry_support ||
> -	     !intel_dp_needs_vsc_colorimetry(crtc_state, conn_state)) &&
> +	if (!intel_dp_needs_vsc_colorimetry(crtc_state, conn_state) &&
>  	    !crtc_state->has_psr)
>  		return;
>  
> @@ -3173,7 +3172,6 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
>  	crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_VSC);
>  	vsc->sdp_type = DP_SDP_VSC;
>  
> -	/* Needs colorimetry */
>  	if (intel_dp_needs_vsc_colorimetry(crtc_state, conn_state)) {
>  		intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
>  						 vsc);
> @@ -5103,11 +5101,19 @@ bool
>  intel_dp_needs_vsc_colorimetry(const struct intel_crtc_state *crtc_state,
>  			       const struct drm_connector_state *conn_state)
>  {
> +	struct intel_dp *intel_dp =
> +		enc_to_intel_dp(to_intel_encoder(conn_state->best_encoder));
> +
>  	/*
>  	 * As per DP 1.4a spec section 2.2.4.3 [MSA Field for Indication
>  	 * of Color Encoding Format and Content Color Gamut], in order to
> -	 * sending YCBCR 420 or HDR BT.2020 signals we should use DP VSC SDP.
> +	 * send YCBCR 420 or HDR BT.2020 signals we should use DP VSC SDP.
> +	 * Only signal this when the sink advertises VSC SDP colorimetry
> +	 * support.
>  	 */
> +	if (!intel_dp->colorimetry_support)
> +		return false;
> +
>  	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420)
>  		return true;

-- 
Jani Nikula, Intel

  parent reply	other threads:[~2026-07-28  9:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 11:39 [PATCH 0/2] drm/i915/dp: fix MSA VSC_SDP delegation for colorimetry Chaitanya Kumar Borah
2026-07-09 11:39 ` [PATCH 1/2] drm/i915/dp: s/intel_dp_needs_vsc_sdp/intel_dp_needs_vsc_colorimetry Chaitanya Kumar Borah
2026-07-16  5:33   ` Samala, Pranay
2026-07-22 11:51     ` Borah, Chaitanya Kumar
2026-07-09 11:39 ` [PATCH 2/2] drm/i915/dp: set VSC_SDP MSA delegation only for capable sinks Chaitanya Kumar Borah
2026-07-17  4:28   ` Samala, Pranay
2026-07-22 11:50     ` Borah, Chaitanya Kumar
2026-07-28  9:41   ` Jani Nikula [this message]
2026-07-28 10:12     ` Borah, Chaitanya Kumar
2026-07-09 12:10 ` ✓ CI.KUnit: success for drm/i915/dp: fix MSA VSC_SDP delegation for colorimetry Patchwork
2026-07-09 12:50 ` ✓ i915.CI.BAT: " Patchwork
2026-07-09 13:26 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-09 15:18 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-07-10  9:51 ` ✓ i915.CI.Full: success " Patchwork

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=2f89bdd9ac273191ea28665bc48314eb36444d27@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.