From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 160D32BE058 for ; Tue, 23 Dec 2025 11:12:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766488381; cv=none; b=rWuDmfSvoO8tMDgX4IaeHt38A3PK6QhQCGPgZultM3SuOHRa5JakGiM2H/BHVlGjzIlXYEQ5gaCPk8oHBezEp/z8qAHyPYUdfSUh3q5ITerPcZw0qZvpkcNGjk749XHX4TsNkA+9lSoB1gwEpsBOfCv/cnRwhN+rg2PMuKBMKB8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766488381; c=relaxed/simple; bh=wBT7KELJE7EF9qlJ4wJMKIprFTmgzENsOa2txiSqWNE=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=VKfbEHC0RLEUyJdTJt3PWN0C7vPc2FHpwt9cg7KfTHesA2pt/qWkj1z5E56cNh3NrCbUyMJMM5n8olQffcCnqB9XuPSywbEgvpHi3sD9SphEL8LxLn1TqhhEdi0twM6Ez/13WQXLxSD3j+2Lr4WZCLdpbHjKJ7CEmcRb2IF6KHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=bMsmfwAy; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="bMsmfwAy" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 871D01A23A5; Tue, 23 Dec 2025 11:12:57 +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== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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