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 2FE21C433EF for ; Mon, 21 Feb 2022 08:30:41 +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:References:In-Reply-To: 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=Svbs0eBt1FD3utDKmB+Xj6JoN8ZOWtN1WpDb+rwdMMw=; b=F6GVg+iOiDuMCR lQf9Hii0gD1HKWMcZ6V1QnXOmT0FgUxe7kN8E79OETNl0nvTmaO0C6sukZHJ1s8HVfK7W49UVX6Ha i5i7vo2K1aSdud8/yJUfej2+8HNWN3/bUdkW16Gy0VFVncxytYj60RhLDj4GQAzsFO4noXuZZQ3Qa tkzk3ZvDYWdn1DF1Ff4QRziPio8fpC1237w+cPTY94daQ7j0Bbc6p1GHocP3n+Ne8nu2sC0vOBlWa UiN4Fk8z/byk6kNLrQ+3SstcfxWIJ37LW5JRAm0GSTUcqZXKLLIUbQwvtcixsQrHegqtxaYb8uq7J BtMoMbXL3g7q7Ti2zwyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM44R-004ICf-3q; Mon, 21 Feb 2022 08:29:23 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM44M-004I87-I1 for linux-arm-kernel@lists.infradead.org; Mon, 21 Feb 2022 08:29:20 +0000 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 42A7F1F4334A; Mon, 21 Feb 2022 08:29:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1645432151; bh=WgoXngn3A+b78IQV6TPt47tWpAp6TiyyCgvUpO8Pd8w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VIB4BDJdLn+i57So/S2qiiGBmXMk/MhIRz8ucQ48N8pgOk5WjcinbGsYk16LdZtsW RtgRt5RKpIa+c3BFjShmfez0lr1h3ZGH64/4iNE3xYS+qt21G1pOwxtWNeS0bvlb+r OmPflG31QFiK4f5JknDmEMAzLuwG20u6nd3w/L9+WTSIgmNKpBMzgHcn5d/tJFlglg Spy4T0mPbnu9HNvlGG2osx6WRXg6e3Cc4K/MhpudB5ghOkrUpUYLDePXgwwFRrWpg3 JXr1mnfBnTAwCoQfzpoY7zG3xpgtiEj7P5Y9OKtpW7frjDCeqOQaxMsbQjVPeVQb/3 jaYGLCyWO/WdQ== Date: Mon, 21 Feb 2022 09:29:08 +0100 From: Boris Brezillon To: Christoph Niedermaier Cc: Max Krummenacher , "dri-devel@lists.freedesktop.org" , "Marek MV. Vasut" , David Airlie , "Sascha Hauer" , NXP Linux Team , "Shawn Guo" , Pengutronix Kernel Team , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH V2] drm/imx: parallel-display: Remove bus flags check in imx_pd_bridge_atomic_check() Message-ID: <20220221092908.6d8d18c5@collabora.com> In-Reply-To: References: <20220201113643.4638-1-cniedermaier@dh-electronics.com> <36f517300a15b2460a02512ef3c5814ad0ed2290.camel@gmail.com> Organization: Collabora X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_002918_827885_3B372DF2 X-CRM114-Status: GOOD ( 31.24 ) 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 Hello Christoph, On Sat, 19 Feb 2022 09:28:44 +0000 Christoph Niedermaier wrote: > From: Max Krummenacher [mailto:max.oss.09@gmail.com] > Sent: Wednesday, February 9, 2022 10:38 AM > >> If display timings were read from the devicetree using > >> of_get_display_timing() and pixelclk-active is defined > >> there, the flag DISPLAY_FLAGS_SYNC_POSEDGE/NEGEDGE is > >> automatically generated. Through the function > >> drm_bus_flags_from_videomode() e.g. called in the > >> panel-simple driver this flag got into the bus flags, > >> but then in imx_pd_bridge_atomic_check() the bus flag > >> check failed and will not initialize the display. The > >> original commit fe141cedc433 does not explain why this > >> check was introduced. So remove the bus flags check, > >> because it stops the initialization of the display with > >> valid bus flags. > >> > >> Fixes: fe141cedc433 ("drm/imx: pd: Use bus format/flags provided by the bridge when available") > >> Signed-off-by: Christoph Niedermaier > >> Cc: Marek Vasut > >> Cc: Boris Brezillon > >> 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 > >> --- > >> V2: - Add Boris to the Cc list > >> --- > >> drivers/gpu/drm/imx/parallel-display.c | 8 -------- > >> 1 file changed, 8 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c > >> index a8aba0141ce7..06cb1a59b9bc 100644 > >> --- a/drivers/gpu/drm/imx/parallel-display.c > >> +++ b/drivers/gpu/drm/imx/parallel-display.c > >> @@ -217,14 +217,6 @@ static int imx_pd_bridge_atomic_check(struct drm_bridge *bridge, > >> if (!imx_pd_format_supported(bus_fmt)) > >> return -EINVAL; > >> > >> - if (bus_flags & > >> - ~(DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_DE_HIGH | > >> - DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | > >> - DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)) { > >> - dev_warn(imxpd->dev, "invalid bus_flags (%x)\n", bus_flags); > >> - return -EINVAL; > >> - } > >> - > >> bridge_state->output_bus_cfg.flags = bus_flags; > >> bridge_state->input_bus_cfg.flags = bus_flags; > >> imx_crtc_state->bus_flags = bus_flags; > > > > Tested on a Colibri iMX6DL with a panel-dpi based panel. > > > > Tested-by: Max Krummenacher > > I still ask myself why this bus flag check is in the code. > Is there a reason not to remove that? The reasoning was that DE_{LOW,HIGH} and FLAG_PIXDATA_DRIVE_{POS,NEG}EDGE were the only bus_flags taken into account by the crtc logic, so anything else is simply ignored. This was definitely wrong since the driver supports at least one of the VSYNC polarity (perhaps both if there's a way to configure it that's not hooked-up yet). So I guess figuring out the default VSYNC polarity and accepting the according DISPLAY_FLAGS_SYNC_XXXEDGE flag is what makes most sense here. Regards, Boris _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel