From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4877BE6B272 for ; Tue, 23 Dec 2025 11:13:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A64C410E2A3; Tue, 23 Dec 2025 11:13:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="bMsmfwAy"; dkim-atps=neutral Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by gabe.freedesktop.org (Postfix) with ESMTPS id 053AB10E2A3 for ; Tue, 23 Dec 2025 11:13:00 +0000 (UTC) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 47B3DC1AE1F; Tue, 23 Dec 2025 11:12:32 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 5B4B260716; Tue, 23 Dec 2025 11:12:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A4E8010AB091E; Tue, 23 Dec 2025 12:12:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1766488376; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=mB0Qz80nHWgjnD9I+aol8xVD4b/U+N6gGueNxTCJ/Og=; b=bMsmfwAyPoECFEIzIAcVrxvcpScOAnBt6c2+htz2HQk99cUagpmeTVzjNb0g32k/0h2hUA eV541nb/Duw/vZVgVr2G8KPfCf33wdeYF872YWzp+VMQb9UqWMa6cbdcJoale8gqbVFbvz 7OoNbxIr0DijClVPoUbCES15Wsd8gAZAJFO444+210jjbRPEwQVGY2iM641DTptZuE2mBg PdClYH8YwLbR4d7E9NDXG5+K6OHqLqD0Sy3d1jIrpAnW1+YqPt8Y5SUGKWYEb1Xn2ACyzW Cl1EB2NokaWXloTWjb5obEcoMIJzoi28zY6MbuVuphH3mP8rX76rrDg1H3hryg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 23 Dec 2025 12:12:54 +0100 Message-Id: Subject: Re: [PATCH v3 02/33] drm/drm_mode_config: Add helper to get plane type name Cc: , , , , , , =?utf-8?q?Jos=C3=A9_Exp=C3=B3sito?= To: "Louis Chauvet" , "Haneen Mohammed" , "Simona Vetter" , "Melissa Wen" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , , "Jonathan Corbet" From: "Luca Ceresoli" X-Mailer: aerc 0.20.1 References: <20251222-vkms-all-config-v3-0-ba42dc3fb9ff@bootlin.com> <20251222-vkms-all-config-v3-2-ba42dc3fb9ff@bootlin.com> In-Reply-To: <20251222-vkms-all-config-v3-2-ba42dc3fb9ff@bootlin.com> X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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=C3=A9 Exp=C3=B3sito > Signed-off-by: Louis Chauvet > --- > 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_typ= e_enum_list[] =3D { > { 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 kno= wn > + * 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: >=3D 0 With that fixed: Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com