Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	Uma Shankar <uma.shankar@intel.com>,
	Matthew Schwartz <matthew.schwartz@linux.dev>
Subject: Re: [PATCH v2] drm/i915/color: Program the 3D LUT on the plane's own pipe with joiner
Date: Mon, 23 Nov 2026 12:01:04 +0200	[thread overview]
Message-ID: <awQO4Lln7Y1YQQ6d@intel.com> (raw)
In-Reply-To: <20261123090251.934904-1-chaitanya.kumar.borah@intel.com>

On Mon, Nov 23, 2026 at 02:32:51PM +0530, Chaitanya Kumar Borah wrote:
> With joiner, a secondary pipe plane gets its hw state from the primary
> pipe's plane, but its own uapi.crtc stays NULL. intel_color_load_3dlut()
> and intel_color_plane_commit_arm() take the CRTC from uapi.crtc, so they
> skip the secondary plane and its pipe's 3D LUT is never loaded or
> enabled, leaving that part of the screen without it.
> 
> Use hw.crtc, the CRTC the plane is actually on. The linked Y-plane of a
> planar YUV scanout also has hw.crtc set but no 3D LUT state of its own,
> so skip it in intel_color_plane_commit_arm() to keep it from clearing
> LUT_3D_CTL.
> 
> v2:
> - Correct the commit message (Sashiko)
> - Skip the linked Y-plane (Sashiko)
> 
> Cc: Uma Shankar <uma.shankar@intel.com>
> Cc: Matthew Schwartz <matthew.schwartz@linux.dev>
> Fixes: 65db7a1f9cf7 ("drm/i915/color: Add 3D LUT to color pipeline")
> Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> ---
> Matthew, the is_y_plane check is only needed to keep this patch
> regression free on its own: with hw.crtc the linked Y-plane would
> otherwise reach glk_lut_3d_commit() and clear LUT_3D_CTL. If you
> rebase your series on top of this patch, the check can be dropped in
> your patch 1 [1], since the owning-plane check there already skips
> the Y-plane, which is never PLANE_PRIMARY.
> 
> [1] https://lore.kernel.org/intel-gfx/20261118191514.2931270-2-matthew.schwartz@linux.dev/
> 
>  drivers/gpu/drm/i915/display/intel_color.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
> index 4070dc8d97d9..e5d40575aa95 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -4278,7 +4278,11 @@ void intel_color_plane_commit_arm(struct intel_dsb *dsb,
>  				  const struct intel_plane_state *plane_state)
>  {
>  	struct intel_display *display = to_intel_display(plane_state);
> -	struct intel_crtc *crtc = to_intel_crtc(plane_state->uapi.crtc);
> +	struct intel_crtc *crtc = to_intel_crtc(plane_state->hw.crtc);
> +
> +	/* The linked Y-plane has no 3D LUT state of its own */
> +	if (plane_state->is_y_plane)
> +		return;

I didn't think we exposed the 3D LUT property on anything but
one of the HDR planes?

>  
>  	if (crtc && intel_color_crtc_has_3dlut(display, crtc->pipe))
>  		glk_lut_3d_commit(dsb, crtc, !!plane_state->hw.lut_3d);

This is where the problem seems to be. Why is this not checking
that the plane is actually the one exposing the 3D LUT?

Also the 'crtc' NULL check looks completely pointless. This
shouldn't even be called for a disabled plane.

> @@ -4318,7 +4322,7 @@ intel_color_load_3dlut(struct intel_dsb *dsb,
>  		       const struct intel_plane_state *plane_state)
>  {
>  	struct intel_display *display = to_intel_display(plane_state);
> -	struct intel_crtc *crtc = to_intel_crtc(plane_state->uapi.crtc);
> +	struct intel_crtc *crtc = to_intel_crtc(plane_state->hw.crtc);
>  
>  	if (crtc && intel_color_crtc_has_3dlut(display, crtc->pipe))
>  		glk_load_lut_3d(dsb, crtc, plane_state->hw.lut_3d);
> -- 
> 2.50.1

-- 
Ville Syrjälä
Intel

      reply	other threads:[~2026-11-23 10:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 16:59 [PATCH] drm/i915/color: Program the 3D LUT on the plane's own pipe with joiner Chaitanya Kumar Borah
2026-11-19 17:36 ` sashiko-bot
2026-11-23  9:13   ` Borah, Chaitanya Kumar
2026-11-19 23:39 ` ✓ CI.KUnit: success for " Patchwork
2026-11-20  0:15 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-21 12:03 ` ✓ Xe.CI.FULL: " Patchwork
2026-11-23  9:02 ` [PATCH v2] " Chaitanya Kumar Borah
2026-11-23 10:01   ` Ville Syrjälä [this message]

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=awQO4Lln7Y1YQQ6d@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.schwartz@linux.dev \
    --cc=uma.shankar@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