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 7A47FC433EF for ; Wed, 23 Feb 2022 16:41:22 +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=bEQj3tKGzEXz86/85/HWlxzv3+Db9yTzeMjXPXm/uNM=; b=cAAd3HE7W7Yvt4/62mvilcoBBk JU5JfIcI+fkjehrm0hnGHgeQE3pQmBJQdd+ZlCMKanZ+hxjafSc/v+bTrcLa6JLWWNfov52YtDU/Q 3+cmBQwjMu98LoSwsc7l7gm5a+tYleMk0Sn2Rrxqf8WrqotK5nCIxuJeUsriTisxLLNX0UOhuhWWJ FertdG9vK7zGY9REQPfpsegDqmmk0OM9nsPjH3DGkqRmPd/1rzwp3jDe3XB0b7ANdNRSfOWDN5BBZ zOyFjmNzgDgvYivEywvUKXyyPn3WRoODOz/lLPGR7eWQ66RuMSn0AFWxK3apxvNzwvNtKeG/DZeHb TMX11i+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMugL-00FMMY-VB; Wed, 23 Feb 2022 16:40:02 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMufx-00FMCb-5N for linux-arm-kernel@lists.infradead.org; Wed, 23 Feb 2022 16:39:39 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 8413258021B; Wed, 23 Feb 2022 11:39:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 23 Feb 2022 11:39:35 -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=GhS9Qm+4p+Rkb2Piz862l6DxZOFn7BdSotFTMd L6eco=; b=qzfbwFsidiYYykh4K2Jxg+MSDFlxGStHRu7xvsX5rqnRKrroKKzsUi FOx7R+Pe6OM+oyYb91SXbNky98G8Ovl+LTv96Cxi1Fv4kbCcqRopwTyBYx7Vw6az JyjMakcxntHG+YFV24dvaG1w8TnqdITJ1gNNNNTqp1rbbJwY81sXz/yxgC/5V4Ga bAxFU96gUEOVmn5KTfftKbmwDv0GIxNw7+SjRJANPMSAuZsAjST6YadyredrKLFt swKROeEOGihBzBTitY2NmcaDFzZTDz4p3qQO6PFMkxLfk2llAcprK9sSJZIZyGe+ GppBPFb0D7XbGHosKhzuDT9cvo6RdFag== 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=GhS9Qm+4p+Rkb2Piz 862l6DxZOFn7BdSotFTMdL6eco=; b=gYLyaKUNBZju59jFmLf5RCwWpByOkhGu8 RCJdLBEbYEirZEwMgG953Rkvg8ronSD5FNDpuSGihNUXIlo9C/bnQHh1TVpQIH+z +zKTr0h4NNwfpjHh73/V9+Y/ZnZBNDwklQ2t4SopY1LAfV6ildv65nv+PmtUm1DN Pg/vwWH6Z6fbRvHbLH8yKAiLVK8Qg47wKO0YkUgAl9i4wK5xTom65+sK2zs2WdQF FjzNcVq7kdF+Iq6HRzGzhcJRuXIRVrETCUgpSMuaN3+rRooTTL2xR6f/mSq+2YTj QXBmf6q7TF0UxCiQMY8kan06sInnbR3+az7rn0JyQRJAlOg2BfLmg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrledtgdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeevveefffduveeitdegtefhhfetueffteefffdvheevvdehteethedvleffgfej vdenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Feb 2022 11:39:33 -0500 (EST) Date: Wed, 23 Feb 2022 17:39:30 +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: <20220223163930.wk3twgz6hranicv6@houat> References: <20220222084723.14310-1-max.krummenacher@toradex.com> <20220223134154.oo7xhf37bgtvm3ai@houat> <20220223134757.f5upi2iun27op5w5@houat> <20220223143703.xi7vpamjg4ytmvqs@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_083937_313938_2DA6526D X-CRM114-Status: GOOD ( 33.80 ) 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="===============3935446594631995115==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============3935446594631995115== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="76yehplne2mlhk2z" Content-Disposition: inline --76yehplne2mlhk2z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 23, 2022 at 03:38:20PM +0100, Marek Vasut wrote: > On 2/23/22 15:37, Maxime Ripard wrote: > > On Wed, Feb 23, 2022 at 03:09:08PM +0100, Marek Vasut wrote: > > > On 2/23/22 14:47, Maxime Ripard wrote: > > > > 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 wrot= e: > > > > > > > Use the new property bus-format to set the enum bus_format an= d bpc. > > > > > > > Completes: commit 4a1d0dbc8332 ("drm/panel: simple: add panel= -dpi support") > > > > > > >=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/202202= 01110717.3585-1-cniedermaier@dh-electronics.com/ > > > > > > >=20 > > > > > > > Max > > > > > > >=20 > > > > > > > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/g= pu/drm/panel/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 timings > > > > > specified in DT (and needs bus format specified there too). > > > >=20 > > > > panel-dpi is supposed to have two compatibles, the panel-specific o= ne > > > > and panel-dpi. This would obviously be tied to the panel-specific o= ne. > > >=20 > > > This whole discussion is about the one which only has 'panel-dpi' com= patible > > > and describes the panel in DT completely. The specific compatible is = not > > > present in DT when this patch is needed. > >=20 > > From the panel-dpi DT binding: > >=20 > > properties: > > compatible: > > description: > > Shall contain a panel specific compatible and "panel-dpi" > > in that order. > > items: > > - {} > > - const: panel-dpi > >=20 > > The panel-specific compatible is mandatory, whether you like it or not. >=20 > It doesn't seem to me that's the intended use per panel-simple.c , so may= be > the bindings need to be fixed too ? It's not clear to me why this has anything to do with panel-simple, but the binding is correct, and that requirement is fairly standard. We have the same thing with panel-lvds for example. Maxime --76yehplne2mlhk2z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYhZjQgAKCRDj7w1vZxhR xeHhAQD/5CzK/6EkxeFhUo4encxukPWOvcvN+91UQwlzUZDgIAEA6LPMsADeA1hR nT0u1CxUfqlksfe9eQpUXNC4zKs+dgI= =55IT -----END PGP SIGNATURE----- --76yehplne2mlhk2z-- --===============3935446594631995115== 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 --===============3935446594631995115==--