From patchwork Tue Feb 1 11:36:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Niedermaier X-Patchwork-Id: 12731596 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 43EE4C433F5 for ; Tue, 1 Feb 2022 11:40:50 +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=ecRVXMM1mARHJNwEeZMLcMND2PcHUpbjzS1e7+yCkZQ=; b=MGbnHNMNbci8/0 f6okNL91J+9w6mOyWYD84rQKpiwgzNZF6f6g5D3CxxQXexVYwnbKOvOCCj89i0K/ty7iEhwWlgk1I T+EsXH1ZkWI6+IednY8CUFCLRFg83AdYGJU4VbZDHoBNsylCjHIR6tMMAXwmeIeVOm+5XlboDyTAn aznv1t4i5BT91A5EIjDPQUJf7CJkC6XOrw8DcK7Hkv8EJMdpcc8845UDD/hm1/P7yRL9+IDxXRiWQ jiILGF683N9/wbPN9ZyWDWN0L7+Ugj9dxi4gdL+Lv8dYLQ8f+oVRRLbAtprYygGDh5l2KezrGZME2 Hkd7T+onmwlO4hORVOLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nErVG-00BrvL-6e; Tue, 01 Feb 2022 11:39:18 +0000 Received: from mx4.securetransport.de ([178.254.6.145]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nErVC-00BruC-3b for linux-arm-kernel@lists.infradead.org; Tue, 01 Feb 2022 11:39:16 +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 mx4.securetransport.de (Postfix) with ESMTPSA id D7EA0720E78; Tue, 1 Feb 2022 12:38:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dh-electronics.com; s=dhelectronicscom; t=1643715510; bh=G4hxvicrPyWWb2wqeoKKguVBSOvbv/GWBmaGdR2TLEU=; h=From:To:CC:Subject:Date:From; b=TqjZJrPUCMF1VghGB3b0zqn9GN7aeecH9vCyH6jT8ckbcICnnKuVo1nRwUF8kTY0e 3Vu84WQnnpXZkNOh8u3SW6D0TIepQFl4VimNLlqnnsIlHnVl9bL4SETEj8M1/mGMO9 5NLkWuWaHnhqy2tkjnHScRMc4LXlnj4b7y9Np6hkmKTCchqbvJ3Z2C3D08/K90GIPr MfhbuRS+AAumuvumB6EElcmAQg1hpObtaUyI19EiUjkGOjk0xY60zc9x54Cp5hPErQ tSPP9Fv/tLEq2HLCo1xPulvOCaJg1W6IFAuKcLHR3/qTimk9SjP8WboHLNbABXB69y xSc+9cX4r5tEQ== 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:38:06 +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:38:05 +0100 From: Christoph Niedermaier To: CC: Christoph Niedermaier , Marek Vasut , Boris Brezillon , "Philipp Zabel" , David Airlie , "Daniel Vetter" , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Subject: [PATCH V2] drm/imx: parallel-display: Remove bus flags check in imx_pd_bridge_atomic_check() Date: Tue, 1 Feb 2022 12:36:43 +0100 Message-ID: <20220201113643.4638-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_033914_431490_F67ECBDD X-CRM114-Status: GOOD ( 16.25 ) 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 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 Tested-by: Max Krummenacher --- 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;