Re: [PATCH RESEND v2 14/32] drm/vkms: Introduce config for plane color range
From: Luca Ceresoli
Date: Thu Dec 18 2025 - 13:00:03 EST
On Wed Oct 29, 2025 at 3:36 PM CET, Louis Chauvet wrote:
> VKMS driver supports all the color range on planes, but for testing it can
> be useful to only advertise few of them. This new configuration interface
> will allow configuring the color range per planes.
>
> Signed-off-by: Louis Chauvet <louis.chauvet@xxxxxxxxxxx>
> --- a/drivers/gpu/drm/vkms/vkms_config.c
> +++ b/drivers/gpu/drm/vkms/vkms_config.c
> @@ -359,6 +379,16 @@ bool vkms_config_is_valid(const struct vkms_config *config)
>
> if (!vkms_config_valid_plane_color_encoding(config, plane_cfg))
> return false;
> +
> + if (!vkms_config_valid_plane_color_range(config, plane_cfg))
> + return false;
> +
> + if ((vkms_config_plane_get_supported_color_encodings(plane_cfg) == 0) !=
> + (vkms_config_plane_get_supported_color_ranges(plane_cfg) == 0)) {
> + drm_info(dev,
> + "Both supported color encoding and color range must be set, or none\n");
encodings ranges
> @@ -441,6 +471,12 @@ static int vkms_config_show(struct seq_file *m, void *data)
> seq_puts(m, "\n");
> seq_printf(m, "\tdefault color encoding=%s\n",
> drm_get_color_encoding_name(vkms_config_plane_get_default_color_encoding(plane_cfg)));
> + seq_puts(m, "\tsupported color range=");
ranges
> --- a/drivers/gpu/drm/vkms/vkms_config.h
> +++ b/drivers/gpu/drm/vkms/vkms_config.h
> @@ -47,6 +47,8 @@ struct vkms_config {
> * must be managed by other means.
> * @default_color_encoding: Default color encoding that should be used by this plane
> * @supported_color_encodings: Color encoding that this plane will support
> + * @default_color_range: Default color range that should be used by this plane
> + * @supported_color_ranges: Color range that this plane will support
ranges
With those fixed you can add:
Reviewed-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com