Re: [PATCH v9 02/19] drm: Add new general DRM property "color format"

From: Dmitry Baryshkov

Date: Sun Mar 01 2026 - 11:48:01 EST


On Fri, Feb 27, 2026 at 08:20:07PM +0100, Nicolas Frattaroli wrote:
> From: Andri Yngvason <andri@xxxxxxxxxxx>
>
> Add a new general DRM property named "color format" which can be used by
> userspace to request the display driver to output a particular color
> format.
>
> Possible options are:
> - auto (setup by default, driver internally picks the color format)
> - rgb
> - ycbcr444
> - ycbcr422
> - ycbcr420
>
> Drivers should advertise from this list which formats they support.
> Together with this list and EDID data from the sink we should be able
> to relay a list of usable color formats to users to pick from.
>
> Signed-off-by: Werner Sembach <wse@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Andri Yngvason <andri@xxxxxxxxxxx>
> Signed-off-by: Marius Vlad <marius.vlad@xxxxxxxxxxxxx>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 5 ++
> drivers/gpu/drm/drm_atomic_uapi.c | 11 ++++
> drivers/gpu/drm/drm_connector.c | 124 ++++++++++++++++++++++++++++++++++++
> include/drm/drm_connector.h | 103 ++++++++++++++++++++++++++++++
> 4 files changed, 243 insertions(+)

It seems and feels that the common code to be used (almost?) everywhere
would be:

if (!drm_mode_create_color_format_property(connector, supported_formats))
drm_connector_attach_color_format_property(connector);


Please mention somewhere the reason to split that into two functions.


--
With best wishes
Dmitry