[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DF5JV82SZNTD.2S30QYBBSO6DA@bootlin.com>
Date: Tue, 23 Dec 2025 12:12:54 +0100
From: "Luca Ceresoli" <luca.ceresoli@...tlin.com>
To: "Louis Chauvet" <louis.chauvet@...tlin.com>, "Haneen Mohammed"
<hamohammed.sa@...il.com>, "Simona Vetter" <simona@...ll.ch>, "Melissa Wen"
<melissa.srw@...il.com>, "Maarten Lankhorst"
<maarten.lankhorst@...ux.intel.com>, "Maxime Ripard" <mripard@...nel.org>,
"Thomas Zimmermann" <tzimmermann@...e.de>, "David Airlie"
<airlied@...il.com>, <jose.exposito89@...il.com>, "Jonathan Corbet"
<corbet@....net>
Cc: <victoria@...tem76.com>, <sebastian.wick@...hat.com>,
<thomas.petazzoni@...tlin.com>, <dri-devel@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>, <linux-doc@...r.kernel.org>,
José Expósito <jose.exposito@...hat.com>
Subject: Re: [PATCH v3 02/33] drm/drm_mode_config: Add helper to get plane
type name
On Mon Dec 22, 2025 at 11:11 AM CET, Louis Chauvet wrote:
> Create and export an helper to display plane type using the
> property string. This could be used to display debug
> information in VKMS.
>
> Reviewed-by: José Expósito <jose.exposito@...hat.com>
> Signed-off-by: Louis Chauvet <louis.chauvet@...tlin.com>
> ---
> drivers/gpu/drm/drm_mode_config.c | 16 ++++++++++++++++
> include/drm/drm_mode_config.h | 3 +++
> 2 files changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
> index d12db9b0bab8..c940a67e255b 100644
> --- a/drivers/gpu/drm/drm_mode_config.c
> +++ b/drivers/gpu/drm/drm_mode_config.c
> @@ -231,6 +231,22 @@ static const struct drm_prop_enum_list drm_plane_type_enum_list[] = {
> { DRM_PLANE_TYPE_CURSOR, "Cursor" },
> };
>
> +/**
> + * drm_get_plane_type_name - return a string for plane name
> + * @type: plane type to compute name of
> + *
> + * Returns: The name of the plane type. "(unknown)" if type is not a known
> + * plane type.
> + */
> +const char *drm_get_plane_type_name(enum drm_plane_type type)
> +{
> + if (type > 0 && type < ARRAY_SIZE(drm_plane_type_enum_list))
This should be: >= 0
With that fixed:
Reviewed-by: Luca Ceresoli <luca.ceresoli@...tlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists