Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>
To: Simon Ser <contact@emersion.fr>
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Uma Shankar" <uma.shankar@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, pekka.paalanen@collabora.com,
	harry.wentland@amd.com, mwen@igalia.com, jadahl@redhat.com,
	sebastian.wick@redhat.com, swati2.sharma@intel.com,
	alex.hung@amd.com, jani.nikula@intel.com,
	suraj.kandpal@intel.com
Subject: Re: [v8 14/15] drm/i915/color: Add 3D LUT to color pipeline
Date: Mon, 15 Dec 2025 14:13:08 +0530	[thread overview]
Message-ID: <31921238-6621-40d5-94b5-8ba3e5f9d40c@intel.com> (raw)
In-Reply-To: <k4mMdQv6X-RIzc4veUD5pP2oD1KGp1Tx6ifJM6S8W3nrowRPz275vsfcNUHeflvxZaISPaM_e861Q-1rO1jnV8bNNmOdPJ3tyS3GVbnpbao=@emersion.fr>



On 12/12/2025 11:55 PM, Simon Ser wrote:
> On Friday, December 12th, 2025 at 18:47, Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com> wrote:
> 
>>>> +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);
>>>> +
>>>> + if (crtc && intel_color_crtc_has_3dlut(display, crtc->pipe))
>>>> + glk_lut_3d_commit(dsb, crtc, !!plane_state->hw.lut_3d);
>>>> ^^^^^^^^^^^^
>>>
>>> And this looks like a pretty major fail. Why is the 3D LUT stored in
>>> the plane state when it's a pipe level thing?
>>
>> With DISPLAY_VER(display) >= 35, 3DLUT can be attached to a plane.
>>
>> (Bits[23:22] in 3DLUT_CTL). This is the only way we are exposing the HW
>> to the userspace right now (through the new plane color pipeline uapi).
>> Therefore, it lies in the plane state.
>>
>> However, there are (soonish)plans to adopt the color pipeline for crtcs
>> too. Once that happens, it needs to be handled a bit more carefully. A
>> potential approach is to allow userspace to program the block with a
>> first come first served semantics and fail the commit if it tries to set
>> 3DLUT both on plane and crtc in the same commit.
> 
> The plane 3D LUT must only be used before blending. Any pipe-level
> post-blending 3D LUT hardware block is not suitable to implement plane
> colorops.

Same 3D LUT block is shared across pipe and planes. When we do end up 
implementing the pipe color pipeline we would like the 3DLUT exposed at 
the pipe stage too.

However, there is no good way to do it in the current color pipeline 
UAPI (atleast that I know of). One suggestion from Harry (discussed in 
the hackfest) was to list the pipelines in order of preference of the 
driver.

Considering we prefer the pre-blend 3DLUT over a post blend one, it 
would mean that we *don't* expose the 3DLUT on the first pipeline on the 
crtc but do it in the second one. (I am not sure how well it scales though)

I have considered other solutions like introducing a new property say 
"muxed" which could be used with Bypass to indicate if the current color 
block is being used in another part of the pipeline.

Suggestions are welcome.

==
Chaitanya


  reply	other threads:[~2025-12-15  8:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03  8:51 [v8 00/15] Plane Color Pipeline support for Intel platforms Uma Shankar
2025-12-03  8:47 ` ✗ CI.checkpatch: warning for Plane Color Pipeline support for Intel platforms (rev7) Patchwork
2025-12-03  8:48 ` ✓ CI.KUnit: success " Patchwork
2025-12-03  8:51 ` [v8 01/15] drm/i915/display: Add identifiers for driver specific blocks Uma Shankar
2025-12-03  8:51 ` [v8 02/15] drm/i915: Add intel_color_op Uma Shankar
2025-12-03  8:51 ` [v8 03/15] drm/i915/color: Add helper to create intel colorop Uma Shankar
2025-12-03  8:52 ` [v8 04/15] drm/i915/color: Create a transfer function color pipeline Uma Shankar
2025-12-03  8:52 ` [v8 05/15] drm/i915/color: Add framework to program CSC Uma Shankar
2025-12-03  8:52 ` [v8 06/15] drm/i915/color: Preserve sign bit when int_bits is Zero Uma Shankar
2025-12-03  8:52 ` [v8 07/15] drm/i915/color: Add plane CTM callback for D12 and beyond Uma Shankar
2025-12-03  8:52 ` [v8 08/15] drm/i915: Add register definitions for Plane Degamma Uma Shankar
2025-12-03  8:52 ` [v8 09/15] drm/i915: Add register definitions for Plane Post CSC Uma Shankar
2025-12-03  8:52 ` [v8 10/15] drm/i915/color: Add framework to program PRE/POST CSC LUT Uma Shankar
2025-12-03  8:52 ` [v8 11/15] drm/i915/color: Program Pre-CSC registers Uma Shankar
2025-12-03  8:52 ` [v8 12/15] drm/i915/color: Program Plane Post CSC Registers Uma Shankar
2025-12-03  8:52 ` [v8 13/15] drm/i915/color: Add registers for 3D LUT Uma Shankar
2025-12-03  8:52 ` [v8 14/15] drm/i915/color: Add 3D LUT to color pipeline Uma Shankar
2025-12-12 15:08   ` Ville Syrjälä
2025-12-12 17:46     ` Borah, Chaitanya Kumar
2025-12-12 18:25       ` Simon Ser
2025-12-15  8:43         ` Borah, Chaitanya Kumar [this message]
2025-12-18 16:15           ` Simon Ser
2025-12-19 13:24             ` Borah, Chaitanya Kumar
2025-12-12 18:45       ` Ville Syrjälä
2025-12-15  8:26         ` Borah, Chaitanya Kumar
2025-12-03  8:52 ` [v8 15/15] drm/i915/color: Enable Plane Color Pipelines Uma Shankar
2025-12-04 18:44 ` [v8 00/15] Plane Color Pipeline support for Intel platforms Jani Nikula
2025-12-11  0:08   ` Matt Roper
2025-12-11 14:01     ` Borah, Chaitanya Kumar

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=31921238-6621-40d5-94b5-8ba3e5f9d40c@intel.com \
    --to=chaitanya.kumar.borah@intel.com \
    --cc=alex.hung@amd.com \
    --cc=contact@emersion.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jadahl@redhat.com \
    --cc=jani.nikula@intel.com \
    --cc=mwen@igalia.com \
    --cc=pekka.paalanen@collabora.com \
    --cc=sebastian.wick@redhat.com \
    --cc=suraj.kandpal@intel.com \
    --cc=swati2.sharma@intel.com \
    --cc=uma.shankar@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