All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>
To: Robert Mader <robert.mader@collabora.com>,
	Melissa Wen <mwen@igalia.com>,  <dri-devel@lists.freedesktop.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	<linux-kernel@vger.kernel.org>, <amd-gfx@lists.freedesktop.org>,
	<intel-gfx@lists.freedesktop.org>,
	Harry Wentland <harry.wentland@amd.com>,
	Daniel Stone <daniels@collabora.com>,
	Uma Shankar <uma.shankar@intel.com>,
	Louis Chauvet <louis.chauvet@bootlin.com>,
	Simon Ser <contact@emersion.fr>,
	Pekka Paalanen <pekka.paalanen@collabora.com>,
	Leandro Ribeiro <leandro.ribeiro@collabora.com>
Subject: Re: [PATCH v1 1/4] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind driver feature
Date: Wed, 1 Jul 2026 13:58:06 +0530	[thread overview]
Message-ID: <fccd9cd9-ca51-48e1-b564-528848a40b1f@intel.com> (raw)
In-Reply-To: <267deaf4-55ec-492d-8646-e16a9b4bfb65@collabora.com>



On 7/1/2026 1:39 PM, Robert Mader wrote:
> On 01.07.26 09:35, Robert Mader wrote:
>> On 30.06.26 18:57, Melissa Wen wrote:
>>>
>>>
>>> On 30/06/2026 10:42, Robert Mader wrote:
>>>> The client cap is currently advertised unconditionally, even for 
>>>> drivers that do
>>>> not support plane color pipelines. If clients supporting the later, 
>>>> like Wayland
>>>> compositors and drm_info, enable the client cap on sich drivers they 
>>>> will be
>>>> left without both color pipeline and the legacy properties 
>>>> COLOR_ENCODING and
>>>> COLOR_RANGE, effectively breaking YUV->RGB conversion support.
>>>>
>>>> Add a new driver feature and guard the client cap behind it, allowing
>>>> plane color pipeline and legacy YUV->RGB support to co-exist.
>>>
>>> Ouch, that's indeed a problem. Nice catch!
>>>
>>> I'm not sure if this is the right way to go because plane color 
>>> pipeline can be supported per plane and per hw family.
>>> My suggestion would be to only deprecate COLOR_ENCODING and 
>>> COLOR_RANGE in drm_mode_object_get_properties() if a plane 
>>> COLOR_PIPELINE property is attached.
>>> WDYT?
>>
>> Hi Melissa!
>>
>> I don't think we need or should use the legacy properties for drivers 
>> and clients that supports the new API. Once Harrys YUV conversion 
>> colorop series(1) lands, every plane on every hardware currently 
>> supporting COLOR_ENCODING and COLOR_RANGE could express that with the 
>> colorop API as well - even if not supporting any other operations.

Is it a concern then that v6.19 will have COLOR PIPELINE advertised 
without YUV support in AMD and still not allow legacy properties to be 
used? If it is, then the nuanced approach that Melissa suggested might help.

In Intel's case, currently the COLOR PIPELINE is exposed with a CTM 
block which can in theory be used for the YUV -> RGB conversion but we 
do have a dedicated programmable input CSC for this which we plan to 
expose in the near future. [1]

==
Chaitanya

[1] Note: This is in addition to the fixed matrix block that we are 
exposing for our SDR planes in

https://lore.kernel.org/intel-gfx/20260617090819.1735153-1-chaitanya.kumar.borah@intel.com/
It
>> would look roughly like this:
>>
>> └───"COLOR_PIPELINE" (atomic): enum {Bypass, YUV Pipeline 123} = Bypass
>>      ├───Bypass
>>      └───YUV Pipeline 123
>>          └───Color Operation 123
>>              └───Properties
>>                  ├───"TYPE" (immutable): enum {1D Curve, 1D LUT, 3x4 Matrix, Multiplier, 3D LUT, Fixed Matrix} = Fixed Matrix
>>                  ├───"BYPASS" (atomic): range [0, 1] = 1
>>                  ├───"NEXT" (atomic, immutable): object colorop = 465
>>                  └───"FIXED_MATRIX_TYPE" (atomic): enum {YCbCr 601 Full to RGB, YCbCr 601 Limited to RGB, YCbCr 709 Full to RGB, YCbCr 709 Limited to RGB, YCbCr 2020 NC Full to RGB, YCbCr 2020 NC Limited to RGB} = YCbCr 601 Full to RGB
>>
>> Doing so will be nicer for compositors/clients going forward as they'd 
>> only need to support a single API if they don't care about legacy 
>> drivers (and we can adapt all in-tree drivers).
>>
>> Do you agree?
>>
>> Best regards
>>
>> Robert
>>
>> 1: https://lists.freedesktop.org/archives/dri-devel/2026-June/575655.html
>>
> P.S.: sorry for the noise, just resending with all to/cc headers to make 
> sure it doesn't get lost - and wanted to add that I'm currently working 
> on the Weston implementation for the YUV conversion colorop to get it 
> over the line.
> 
> -- 
> Robert Mader
> Consultant Software Developer
> 
> Collabora Ltd.
> Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK
> Registered in England & Wales, no. 5513718
> 


  reply	other threads:[~2026-07-01  8:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30  8:42 [PATCH v1 0/4] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind driver feature Robert Mader
2026-06-30  8:42 ` [PATCH v1 1/4] " Robert Mader
2026-06-30  8:47   ` Robert Mader
2026-06-30 16:57   ` Melissa Wen
2026-07-01  7:35     ` Robert Mader
2026-07-01  8:09       ` Robert Mader
2026-07-01  8:28         ` Borah, Chaitanya Kumar [this message]
2026-06-30  8:42 ` [PATCH v1 2/4] drm/amdgpu: Add DRIVER_PLANE_COLOR_PIPELINE " Robert Mader
2026-06-30  8:58   ` sashiko-bot
2026-06-30  8:42 ` [PATCH v1 3/4] drm/i915: " Robert Mader
2026-06-30  8:57   ` sashiko-bot
2026-06-30  8:42 ` [PATCH v1 4/4] drm/vkms: " Robert Mader
2026-06-30  8:57   ` sashiko-bot
2026-06-30 12:18 ` ✓ i915.CI.BAT: success for drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind " Patchwork
2026-06-30 20:05 ` ✓ i915.CI.Full: " Patchwork
2026-07-01 10:41 ` [PATCH v1 0/4] " Maarten Lankhorst
2026-07-01 13:32   ` Robert Mader
2026-07-01 14:26     ` Maarten Lankhorst
2026-07-01 16:10       ` Robert Mader

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=fccd9cd9-ca51-48e1-b564-528848a40b1f@intel.com \
    --to=chaitanya.kumar.borah@intel.com \
    --cc=airlied@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=contact@emersion.fr \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=leandro.ribeiro@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=pekka.paalanen@collabora.com \
    --cc=robert.mader@collabora.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --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 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.