From patchwork Tue Feb 1 11:07:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Niedermaier X-Patchwork-Id: 12731578 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 6CCA7C433F5 for ; Tue, 1 Feb 2022 11:11:10 +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:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=B1ldr2O5zCXSRlub0w9oDu1R7POOF+u08nr5TRMI1zI=; b=ciqfSTjxqD1uhh A+fhlRHo87tqezyKKaLsQ+HbyUvI97Fzdu9D/Te7TCxhvE4DQ+gxVxKYgfI2IMieUF/Po4aXheR43 P6Zp1Gv10/+/JRy6QoucsrAR8egxjdREJHnk1ttmibuxvQIMNKrmaApb2RfgmhQJs17XIxCc7v3+A jlqmr105ip7157Re1a8ScFdSpN7w84VaSfiLH9atAEcsr82zSz5zWpghGwUebb3pV6b/4vre/QTXh gLOmVww2BY60PA3hAe33axlMPwgT4Q9VRI5nDKwVq/wLcUSYQc9F08GHvPe6sa258JVUeWLhe9sNE E1/AKoULdHJpXs8UDHoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEr2k-00Bo50-RT; Tue, 01 Feb 2022 11:09:50 +0000 Received: from mx3.securetransport.de ([116.203.31.6]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEr2g-00Bo4U-3q for linux-arm-kernel@lists.infradead.org; Tue, 01 Feb 2022 11:09:48 +0000 Received: from mail.dh-electronics.com (business-24-134-97-169.pool2.vodafone-ip.de [24.134.97.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx3.securetransport.de (Postfix) with ESMTPSA id 21E995DE19; Tue, 1 Feb 2022 12:08:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dh-electronics.com; s=dhelectronicscom; t=1643713739; bh=T1pR5YOrHJEnGTpa4D2Pe9uGNpEOqar+i3lRd9LJQdc=; h=From:To:CC:Subject:Date:From; b=OoFKOc/xAK7w+wCz5tosKRin6Myqgn6y6n29ufQDDPWixBg4E16Ek39DUA0YHQK2s Fs4XoF4N9nXsajkJz7AyXMk+D9sVQOYmPCKMRe7eLKsN3XFYNOdQ5UV+iN+h4dlYnX +Zv3es4C7MP8xlLxewWtrWXSRyrwqV80V/i50Y+26rfSwcF4fOm35bmDHn+WIZ63Jh TpVX58gW5oIKC/Umz7WHeCQOCXKq6fg+c8HYcSrouCfrzWSGW32zZauWZZlGZirIxQ w9H6KBoKscRgh9uwcefMX3FiQTgSdSXGZgc4P0LveD9qL1IXyePZmzb/mYCU0x+78p OKG4kE3hh8bRg== Received: from DHPWEX01.DH-ELECTRONICS.ORG (10.64.2.30) by DHPWEX01.DH-ELECTRONICS.ORG (10.64.2.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 1 Feb 2022 12:08:33 +0100 Received: from localhost.localdomain (172.16.51.18) by DHPWEX01.DH-ELECTRONICS.ORG (10.64.2.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15 via Frontend Transport; Tue, 1 Feb 2022 12:08:32 +0100 From: Christoph Niedermaier To: CC: Christoph Niedermaier , Marek Vasut , Sam Ravnborg , Laurent Pinchart , Maxime Ripard , Philipp Zabel , David Airlie , Daniel Vetter , Shawn Guo , "Sascha Hauer" , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Subject: [RFC][PATCH] Revert "drm/panel-simple: drop use of data-mapping property" Date: Tue, 1 Feb 2022 12:07:17 +0100 Message-ID: <20220201110717.3585-1-cniedermaier@dh-electronics.com> X-Mailer: git-send-email 2.11.0 X-klartext: yes MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220201_030946_335231_87804E85 X-CRM114-Status: GOOD ( 16.49 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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; + /* Extract bus_flags from display_timing */ bus_flags = 0; vm.flags = timing->flags;