Re: [PATCH v6 07/43] drm/drm_color_mgmt: Expose drm_get_color_encoding_name
From: Oarora Etimis
Date: Tue Nov 24 2026 - 08:52:49 EST
On Fri, Nov 20, 2026 at 06:58:49PM +0100, Louis Chauvet wrote:
> drm_get_color_encoding_name can be useful to display debug information
> outside drm core. Export it so it could be used for VKMS
>
> Reviewed-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
> Signed-off-by: Louis Chauvet <louis.chauvet@xxxxxxxxxxx>
> ---
> drivers/gpu/drm/drm_color_mgmt.c | 2 +-
> drivers/gpu/drm/drm_crtc_internal.h | 2 --
> include/drm/drm_color_mgmt.h | 2 ++
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c
> index e4e31bc0153e..de219c23322f 100644
> --- a/drivers/gpu/drm/drm_color_mgmt.c
> +++ b/drivers/gpu/drm/drm_color_mgmt.c
> @@ -496,7 +496,7 @@ const char *drm_get_color_encoding_name(enum drm_color_encoding encoding)
>
> return color_encoding_name[encoding];
> }
> -EXPORT_SYMBOL_IF_KUNIT(drm_get_color_encoding_name);
> +EXPORT_SYMBOL(drm_get_color_encoding_name);
>
> /**
> * drm_get_color_range_name - return a string for color range
> diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h
> index 3492787c3697..f3a3ffd358dc 100644
> --- a/drivers/gpu/drm/drm_crtc_internal.h
> +++ b/drivers/gpu/drm/drm_crtc_internal.h
> @@ -38,7 +38,6 @@
> #include <linux/err.h>
> #include <linux/types.h>
>
> -enum drm_color_encoding;
> enum drm_color_range;
> enum drm_connector_force;
> enum drm_mode_status;
> @@ -121,7 +120,6 @@ int drm_mode_destroy_dumb_ioctl(struct drm_device *dev,
> void *data, struct drm_file *file_priv);
>
> /* drm_color_mgmt.c */
> -const char *drm_get_color_encoding_name(enum drm_color_encoding encoding);
> const char *drm_get_color_range_name(enum drm_color_range range);
>
> /* IOCTLs */
> diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h
> index 5140691f476a..133ca77d91c7 100644
> --- a/include/drm/drm_color_mgmt.h
> +++ b/include/drm/drm_color_mgmt.h
> @@ -113,6 +113,8 @@ enum drm_color_range {
> DRM_COLOR_RANGE_MAX,
> };
>
> +const char *drm_get_color_encoding_name(enum drm_color_encoding encoding);
> +
> int drm_plane_create_color_properties(struct drm_plane *plane,
> u32 supported_encodings,
> u32 supported_ranges,
>
> --
> 2.56.0
Reviewed-by: Oarora Etimis <oaroraetimis@xxxxxxxxx>