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. 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