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 1A689C433F5 for ; Wed, 23 Feb 2022 13:48:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CDAB10F6C7; Wed, 23 Feb 2022 13:48:03 +0000 (UTC) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 668B210F6CA for ; Wed, 23 Feb 2022 13:48:01 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id BFAB958044A; Wed, 23 Feb 2022 08:48:00 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 23 Feb 2022 08:48:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=hhzQuAP5h32D6MnSEhxXlUwNzkXcHYulOY6y2A CCY7I=; b=QLUW+WD3aAhsLBvTdEYmSzbIQvEqecEIbqMxvNBVW/MyyZBDj9v7wC /SU9rHHCl3vOKi5HxuUrCPEVotH1zbrorZMqbO5CcIabGGE7hCUQ8k7xO2F0qJ0z bczO5GRAh9FVmGhIy7YyXSq/35aBwXJfF7H76OQkbip0tZsa3NvlBbKRzG9JMEFp M2zxG3cPo/5uO+NLfIx4JLeRnWWADwGlQfanXSUcsGk6MIs3rg3XbfwCbe85XwyL DtUJ85YqtYa95uIMydxla77u7SUR+1xanKSsdqu4GyuzpyfNlMiEv8aTQgIkmmOs y695s6Jdao3f39D6JXlOni12gj18d1qA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=hhzQuAP5h32D6MnSE hxXlUwNzkXcHYulOY6y2ACCY7I=; b=nVkHpKCnVcGpjtCTpoZxRnF4d2pBWn/2m 4ISi4iG6ab493DhmbVVcwPNnaWGlQqoDqT3yxQL11AD4uCSz29e9A6Lt3aQkohBz aYlxIKWIuLtBWaYh15J/jkSSHoxA0uRYv6kziVDFnJGnUMpbZdNnbTjiGQcUwQzH BHhIyAitd5UdIRfwuphbea87DFb8i4W9RbF2v3pVUOFR2i3sbNb964psxbziDKdl kcw8B7NGCxh92+XxSoKVzYsulaMu1bMVRkV6DDb5/ysTO78i6jEzuRhiwzMY773C WiWudvLr3/uBraGPudL0OGEDU338DrkwJZ4Sd8UygUQYI0j5K0F0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrledtgdehhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeevveefffduveeitdegtefhhfetueffteefffdvheevvdehteethedvleffgfej vdenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Feb 2022 08:47:59 -0500 (EST) Date: Wed, 23 Feb 2022 14:47:57 +0100 From: Maxime Ripard To: Marek Vasut Subject: Re: [RFC PATCH] drm/panel: simple: panel-dpi: use bus-format to set bpc and bus_format Message-ID: <20220223134757.f5upi2iun27op5w5@houat> References: <20220222084723.14310-1-max.krummenacher@toradex.com> <20220223134154.oo7xhf37bgtvm3ai@houat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cdjboleowr56kila" Content-Disposition: inline In-Reply-To: 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: , Cc: Christoph Niedermaier , Max Krummenacher , Pengutronix Kernel Team , Max Krummenacher , David Airlie , Sam Ravnborg , Sascha Hauer , dri-devel@lists.freedesktop.org, DenysDrozdov , Laurent Pinchart , Shawn Guo , linux-arm-kernel@lists.infradead.org, NXP Linux Team Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --cdjboleowr56kila Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 23, 2022 at 02:45:30PM +0100, Marek Vasut wrote: > On 2/23/22 14:41, Maxime Ripard wrote: > > Hi, > >=20 > > On Tue, Feb 22, 2022 at 09:47:23AM +0100, Max Krummenacher wrote: > > > Use the new property bus-format to set the enum bus_format and bpc. > > > Completes: commit 4a1d0dbc8332 ("drm/panel: simple: add panel-dpi sup= port") > > >=20 > > > Signed-off-by: Max Krummenacher > > >=20 > > > --- > > >=20 > > > drivers/gpu/drm/panel/panel-simple.c | 32 +++++++++++++++++++++++++= +++ > > > 1 file changed, 32 insertions(+) > > >=20 > > > Relates to the discussion: https://lore.kernel.org/all/20220201110717= =2E3585-1-cniedermaier@dh-electronics.com/ > > >=20 > > > Max > > >=20 > > > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/p= anel/panel-simple.c > > > index c5f133667a2d..5c07260de71c 100644 > > > --- a/drivers/gpu/drm/panel/panel-simple.c > > > +++ b/drivers/gpu/drm/panel/panel-simple.c > > > @@ -453,6 +453,7 @@ static int panel_dpi_probe(struct device *dev, > > > struct panel_desc *desc; > > > unsigned int bus_flags; > > > struct videomode vm; > > > + const char *format =3D ""; > > > int ret; > > > np =3D dev->of_node; > > > @@ -477,6 +478,37 @@ static int panel_dpi_probe(struct device *dev, > > > of_property_read_u32(np, "width-mm", &desc->size.width); > > > of_property_read_u32(np, "height-mm", &desc->size.height); > > > + of_property_read_string(np, "bus-format", &format); > > > + if (!strcmp(format, "BGR888_1X24")) { > > > + desc->bpc =3D 8; > > > + desc->bus_format =3D MEDIA_BUS_FMT_BGR888_1X24; > > > + } else if (!strcmp(format, "GBR888_1X24")) { > > > + desc->bpc =3D 8; > > > + desc->bus_format =3D MEDIA_BUS_FMT_GBR888_1X24; > > > + } else if (!strcmp(format, "RBG888_1X24")) { > > > + desc->bpc =3D 8; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RBG888_1X24; > > > + } else if (!strcmp(format, "RGB444_1X12")) { > > > + desc->bpc =3D 6; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB444_1X12; > > > + } else if (!strcmp(format, "RGB565_1X16")) { > > > + desc->bpc =3D 6; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB565_1X16; > > > + } else if (!strcmp(format, "RGB666_1X18")) { > > > + desc->bpc =3D 6; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB666_1X18; > > > + } else if (!strcmp(format, "RGB666_1X24_CPADHI")) { > > > + desc->bpc =3D 6; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB666_1X24_CPADHI; > > > + } else if (!strcmp(format, "RGB888_1X24")) { > > > + desc->bpc =3D 8; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB888_1X24; > > > + } else { > > > + dev_err(dev, "%pOF: missing or unknown bus-format property\n", > > > + np); > > > + return -EINVAL; > > > + } > > > + > >=20 > > It doesn't seem right, really. We can't the bus format / bpc be inferred > > from the compatible? I'd expect two panels that don't have the same bus > > format to not be claimed as compatible. >=20 > Which compatible ? >=20 > Note that this is for panel-dpi compatible, i.e. the panel which has timi= ngs > specified in DT (and needs bus format specified there too). panel-dpi is supposed to have two compatibles, the panel-specific one and panel-dpi. This would obviously be tied to the panel-specific one. Maxime --cdjboleowr56kila Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYhY7DQAKCRDj7w1vZxhR xR6DAQCeCEQFyi57XJY0ICed8QAOIFjmZZavX/pIn+FYJkisXAD/WvNcAjcvrah7 Z51HWYrhpXU0I4IvJDHJv17Hu2PlJwY= =iSlM -----END PGP SIGNATURE----- --cdjboleowr56kila-- 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 59CA4C433F5 for ; Wed, 23 Feb 2022 14:45:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0tpExPhqdef0p2NBOz5RFlcg0BV/39i5BAQDlEWaueg=; b=avNozAx35a2Epb1jy28EYquEiI RmoyZ60a7a4Pd91IuhMTgBqEF1BooHXmSUD0jcuZiIRkU1HJDcvh6Z/4/Sgf/6GO00DymS3OdDaMD 2vPgRlypbO+C09GnB72tRsxT/NqMkxAzLffxqM4t20pVWSDTy6CJ84SzaIKyJ4xzdNhVPNFsbfZhi nP/IV738n2azSSkPtKPM9GEc+P6mzlyxjyxnZZae/AMP9W0eTtS1/5vwCDpH0W/ZV/Vu5aXQGp+CL 3JQIrwJsbioxIUh3tzV4NVWtB79/aTzMrPTLYNhLVxs37S2lNOJKe2zVSewrfB7qu15jHySD2+fNU pCVwBKtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMsrY-00EnRc-B4; Wed, 23 Feb 2022 14:43:30 +0000 Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMrzt-00Eaws-HI for linux-arm-kernel@lists.infradead.org; Wed, 23 Feb 2022 13:48:03 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id BFAB958044A; Wed, 23 Feb 2022 08:48:00 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 23 Feb 2022 08:48:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=hhzQuAP5h32D6MnSEhxXlUwNzkXcHYulOY6y2A CCY7I=; b=QLUW+WD3aAhsLBvTdEYmSzbIQvEqecEIbqMxvNBVW/MyyZBDj9v7wC /SU9rHHCl3vOKi5HxuUrCPEVotH1zbrorZMqbO5CcIabGGE7hCUQ8k7xO2F0qJ0z bczO5GRAh9FVmGhIy7YyXSq/35aBwXJfF7H76OQkbip0tZsa3NvlBbKRzG9JMEFp M2zxG3cPo/5uO+NLfIx4JLeRnWWADwGlQfanXSUcsGk6MIs3rg3XbfwCbe85XwyL DtUJ85YqtYa95uIMydxla77u7SUR+1xanKSsdqu4GyuzpyfNlMiEv8aTQgIkmmOs y695s6Jdao3f39D6JXlOni12gj18d1qA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=hhzQuAP5h32D6MnSE hxXlUwNzkXcHYulOY6y2ACCY7I=; b=nVkHpKCnVcGpjtCTpoZxRnF4d2pBWn/2m 4ISi4iG6ab493DhmbVVcwPNnaWGlQqoDqT3yxQL11AD4uCSz29e9A6Lt3aQkohBz aYlxIKWIuLtBWaYh15J/jkSSHoxA0uRYv6kziVDFnJGnUMpbZdNnbTjiGQcUwQzH BHhIyAitd5UdIRfwuphbea87DFb8i4W9RbF2v3pVUOFR2i3sbNb964psxbziDKdl kcw8B7NGCxh92+XxSoKVzYsulaMu1bMVRkV6DDb5/ysTO78i6jEzuRhiwzMY773C WiWudvLr3/uBraGPudL0OGEDU338DrkwJZ4Sd8UygUQYI0j5K0F0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrledtgdehhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeevveefffduveeitdegtefhhfetueffteefffdvheevvdehteethedvleffgfej vdenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Feb 2022 08:47:59 -0500 (EST) Date: Wed, 23 Feb 2022 14:47:57 +0100 From: Maxime Ripard To: Marek Vasut Cc: Max Krummenacher , dri-devel@lists.freedesktop.org, Sascha Hauer , Philipp Zabel , Laurent Pinchart , Fabio Estevam , linux-arm-kernel@lists.infradead.org, DenysDrozdov , David Airlie , Christoph Niedermaier , Pengutronix Kernel Team , Sam Ravnborg , Shawn Guo , Daniel Vetter , NXP Linux Team , Max Krummenacher Subject: Re: [RFC PATCH] drm/panel: simple: panel-dpi: use bus-format to set bpc and bus_format Message-ID: <20220223134757.f5upi2iun27op5w5@houat> References: <20220222084723.14310-1-max.krummenacher@toradex.com> <20220223134154.oo7xhf37bgtvm3ai@houat> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220223_054801_698383_C457C88F X-CRM114-Status: GOOD ( 23.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2520797621913764689==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2520797621913764689== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cdjboleowr56kila" Content-Disposition: inline --cdjboleowr56kila Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 23, 2022 at 02:45:30PM +0100, Marek Vasut wrote: > On 2/23/22 14:41, Maxime Ripard wrote: > > Hi, > >=20 > > On Tue, Feb 22, 2022 at 09:47:23AM +0100, Max Krummenacher wrote: > > > Use the new property bus-format to set the enum bus_format and bpc. > > > Completes: commit 4a1d0dbc8332 ("drm/panel: simple: add panel-dpi sup= port") > > >=20 > > > Signed-off-by: Max Krummenacher > > >=20 > > > --- > > >=20 > > > drivers/gpu/drm/panel/panel-simple.c | 32 +++++++++++++++++++++++++= +++ > > > 1 file changed, 32 insertions(+) > > >=20 > > > Relates to the discussion: https://lore.kernel.org/all/20220201110717= =2E3585-1-cniedermaier@dh-electronics.com/ > > >=20 > > > Max > > >=20 > > > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/p= anel/panel-simple.c > > > index c5f133667a2d..5c07260de71c 100644 > > > --- a/drivers/gpu/drm/panel/panel-simple.c > > > +++ b/drivers/gpu/drm/panel/panel-simple.c > > > @@ -453,6 +453,7 @@ static int panel_dpi_probe(struct device *dev, > > > struct panel_desc *desc; > > > unsigned int bus_flags; > > > struct videomode vm; > > > + const char *format =3D ""; > > > int ret; > > > np =3D dev->of_node; > > > @@ -477,6 +478,37 @@ static int panel_dpi_probe(struct device *dev, > > > of_property_read_u32(np, "width-mm", &desc->size.width); > > > of_property_read_u32(np, "height-mm", &desc->size.height); > > > + of_property_read_string(np, "bus-format", &format); > > > + if (!strcmp(format, "BGR888_1X24")) { > > > + desc->bpc =3D 8; > > > + desc->bus_format =3D MEDIA_BUS_FMT_BGR888_1X24; > > > + } else if (!strcmp(format, "GBR888_1X24")) { > > > + desc->bpc =3D 8; > > > + desc->bus_format =3D MEDIA_BUS_FMT_GBR888_1X24; > > > + } else if (!strcmp(format, "RBG888_1X24")) { > > > + desc->bpc =3D 8; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RBG888_1X24; > > > + } else if (!strcmp(format, "RGB444_1X12")) { > > > + desc->bpc =3D 6; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB444_1X12; > > > + } else if (!strcmp(format, "RGB565_1X16")) { > > > + desc->bpc =3D 6; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB565_1X16; > > > + } else if (!strcmp(format, "RGB666_1X18")) { > > > + desc->bpc =3D 6; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB666_1X18; > > > + } else if (!strcmp(format, "RGB666_1X24_CPADHI")) { > > > + desc->bpc =3D 6; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB666_1X24_CPADHI; > > > + } else if (!strcmp(format, "RGB888_1X24")) { > > > + desc->bpc =3D 8; > > > + desc->bus_format =3D MEDIA_BUS_FMT_RGB888_1X24; > > > + } else { > > > + dev_err(dev, "%pOF: missing or unknown bus-format property\n", > > > + np); > > > + return -EINVAL; > > > + } > > > + > >=20 > > It doesn't seem right, really. We can't the bus format / bpc be inferred > > from the compatible? I'd expect two panels that don't have the same bus > > format to not be claimed as compatible. >=20 > Which compatible ? >=20 > Note that this is for panel-dpi compatible, i.e. the panel which has timi= ngs > specified in DT (and needs bus format specified there too). panel-dpi is supposed to have two compatibles, the panel-specific one and panel-dpi. This would obviously be tied to the panel-specific one. Maxime --cdjboleowr56kila Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYhY7DQAKCRDj7w1vZxhR xR6DAQCeCEQFyi57XJY0ICed8QAOIFjmZZavX/pIn+FYJkisXAD/WvNcAjcvrah7 Z51HWYrhpXU0I4IvJDHJv17Hu2PlJwY= =iSlM -----END PGP SIGNATURE----- --cdjboleowr56kila-- --===============2520797621913764689== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============2520797621913764689==--