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 D2BC0C433F5 for ; Wed, 2 Feb 2022 23:47:49 +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-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RcjJ1gyeU1KR5i01lACzeRWeIdfedI1kNNZSdS4NRhg=; b=4lbyRCiMUE2H9o lrZ4n6nhDkMnFRF80ZhkAJmcphVwH9gt6UxGjMmkDQCJboHA+BL+0lHe6SHXPzxg/Z9k5NI0Gn8wE IB8wql3pcHeJ3S36C/OZrcIKhWo9/GGMZppI7/buJm10fISubW0D0wIW4x6eHXPGXHG+9tXBqkgfR 0/WkDlxJtVoXwWEIqNlIQnezm6qg5Ea+EPT+xueZWd5Ie27iq1iVTsmuQgrZsNKFznkvB33mlfcY6 y9tsNbklR8f2P0aMWcTyGKDzTjdTd8/PrKF0kPHzYUoX8QoiBnQu2sm7CIh+gQMPlMX5HsjdNCpvX ta7gI878OVE+SfDh7/5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFPKX-00H5ce-82; Wed, 02 Feb 2022 23:46:29 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFPKT-00H5c5-F8 for linux-arm-kernel@lists.infradead.org; Wed, 02 Feb 2022 23:46:27 +0000 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F73249C; Thu, 3 Feb 2022 00:46:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1643845582; bh=CaVS0Kyks3ICR5rk8SJa5uxDJYGLEoL13EdAxXCkADA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z0xvy7V/ufO+uKZdqt7Id50H5u9q//7R3gs5WhcnVu9utkRgKiHPh/Hbcv3pEn2z8 eZEtJppXQKdfsFR4V+6YAAZxaRtVqJ+KLv0VaGuAqrlwPrWmPrNIxVC1SZIHcgvdK+ tZ/FQ13PoesHBCEjpFyWu/tQiJJ5izm4JUOAf/QI= Date: Thu, 3 Feb 2022 01:45:59 +0200 From: Laurent Pinchart To: Christoph Niedermaier Cc: dri-devel@lists.freedesktop.org, Marek Vasut , Sam Ravnborg , Maxime Ripard , Philipp Zabel , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-arm-kernel@lists.infradead.org Subject: Re: [RFC][PATCH] Revert "drm/panel-simple: drop use of data-mapping property" Message-ID: References: <20220201110717.3585-1-cniedermaier@dh-electronics.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220201110717.3585-1-cniedermaier@dh-electronics.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220202_154625_685033_E90B23D1 X-CRM114-Status: GOOD ( 27.45 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Christoph, Thank you for the patch. On Tue, Feb 01, 2022 at 12:07:17PM +0100, Christoph Niedermaier wrote: > Without the data-mapping devicetree property my display won't > work properly. It is flickering, because the bus flags won't > be assigned without a defined bus format by the imx parallel > display driver. There was a discussion about the removal [1] > and an agreement that a better solution is needed, but it is > missing so far. So what would be the better approach? > > [1] https://patchwork.freedesktop.org/patch/357659/?series=74705&rev=1 > > This reverts commit d021d751c14752a0266865700f6f212fab40a18c. > > Signed-off-by: Christoph Niedermaier > Cc: Marek Vasut > Cc: Sam Ravnborg > Cc: Laurent Pinchart > Cc: Maxime Ripard > Cc: Philipp Zabel > Cc: David Airlie > Cc: Daniel Vetter > Cc: Shawn Guo > Cc: Sascha Hauer > Cc: Pengutronix Kernel Team > Cc: Fabio Estevam > Cc: NXP Linux Team > Cc: linux-arm-kernel@lists.infradead.org > To: dri-devel@lists.freedesktop.org > --- > drivers/gpu/drm/panel/panel-simple.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c > index 3c08f9827acf..2c683d94a3f3 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 *mapping; > int ret; > > np = dev->of_node; > @@ -477,6 +478,16 @@ 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, "data-mapping", &mapping); > + if (!strcmp(mapping, "rgb24")) > + desc->bus_format = MEDIA_BUS_FMT_RGB888_1X24; > + else if (!strcmp(mapping, "rgb565")) > + desc->bus_format = MEDIA_BUS_FMT_RGB565_1X16; > + else if (!strcmp(mapping, "bgr666")) > + desc->bus_format = MEDIA_BUS_FMT_RGB666_1X18; > + else if (!strcmp(mapping, "lvds666")) > + desc->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI; You're right that there's an issue, but a revert isn't the right option. The commit you're reverting never made it in a stable release, because it was deemed to not be a good enough option. First of all, any attempt to fix this should include an update to the DT binding. Second, as this is about DPI panels, the LVDS option should be dropped. Finally, I've shared some initial thoughts in [1], maybe you can reply to that e-mail to continue the discussion there ? https://lore.kernel.org/all/20200303185531.GJ11333@pendragon.ideasonboard.com/ > + > /* Extract bus_flags from display_timing */ > bus_flags = 0; > vm.flags = timing->flags; -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel