[PATCH v7 02/22] drm: Add new general DRM property "color format"

Maxime Ripard mripard at kernel.org
Fri Feb 6 06:05:08 PST 2026


Hi,

On Wed, Jan 21, 2026 at 03:45:09PM +0100, Nicolas Frattaroli wrote:
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 7eaec37ae1c7..b5604dca728a 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -556,6 +556,16 @@ enum drm_colorspace {
>  	DRM_MODE_COLORIMETRY_COUNT
>  };
>  
> +enum drm_color_format {
> +	DRM_COLOR_FORMAT_AUTO			= 0,
> +	DRM_COLOR_FORMAT_RGB444			= BIT(0),
> +	DRM_COLOR_FORMAT_YCBCR444		= BIT(1),
> +	DRM_COLOR_FORMAT_YCBCR422		= BIT(2),
> +	DRM_COLOR_FORMAT_YCBCR420		= BIT(3),
> +};
> +
> +#define DRM_COLOR_FORMAT_COUNT 5
> +

I don't really see a reason to expose an enum, with a bunch of values
that are all mutually exclusive, as a bitmask. It's pretty inconsistent
with most (all?) the other similar properties we have.

I appreciate you did that to avoid fixing up every driver using those
values, but then maybe we don't have to? We could create a userspace
facing enum, and convert to DRM_COLOR_FORMAT internally.

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260206/5f748cc8/attachment.sig>


More information about the linux-arm-kernel mailing list