Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BA12C5519F for ; Wed, 25 Nov 2020 08:51:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12B0F20637 for ; Wed, 25 Nov 2020 08:51:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12B0F20637 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E85E6E86F; Wed, 25 Nov 2020 08:51:00 +0000 (UTC) Received: from honk.sigxcpu.org (honk.sigxcpu.org [24.134.29.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 944A56E86F for ; Wed, 25 Nov 2020 08:50:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 52AD9FB03; Wed, 25 Nov 2020 09:50:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l84pxCrkMIBA; Wed, 25 Nov 2020 09:50:53 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id F17D54068E; Wed, 25 Nov 2020 09:50:51 +0100 (CET) Date: Wed, 25 Nov 2020 09:50:51 +0100 From: Guido =?iso-8859-1?Q?G=FCnther?= To: "Lukas F. Hartmann" Subject: Re: nwl-dsi: fixup mode only for LCDIF input, not DCSS Message-ID: <20201125085051.GA9364@bogon.m.sigxcpu.org> References: <20201124171216.980628-1-lukas@mntre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201124171216.980628-1-lukas@mntre.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , David Airlie , Neil Armstrong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andrzej Hajda , Laurent Pinchart , laurentiu.palcu@nxp.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Lukas, On Tue, Nov 24, 2020 at 06:12:17PM +0100, Lukas F. Hartmann wrote: > The fixup of HSYNC and VSYNC should not be done when the input source is > DCSS, or internal display does not work on MNT Reform 2 (open hardware > laptop based on NXP i.MX8M using DCSS->DSI->eDP for internal display). > > Signed-off-by: Lukas F. Hartmann > --- > drivers/gpu/drm/bridge/nwl-dsi.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c > index 66b67402f..6735ab2a2 100644 > --- a/drivers/gpu/drm/bridge/nwl-dsi.c > +++ b/drivers/gpu/drm/bridge/nwl-dsi.c > @@ -807,10 +807,16 @@ static bool nwl_dsi_bridge_mode_fixup(struct drm_bridge *bridge, > const struct drm_display_mode *mode, > struct drm_display_mode *adjusted_mode) > { > - /* At least LCDIF + NWL needs active high sync */ > - adjusted_mode->flags |= (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC); > - adjusted_mode->flags &= ~(DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC); > + struct device_node *remote; > + struct nwl_dsi *dsi = bridge_to_dsi(bridge); > + > + remote = of_graph_get_remote_node(dsi->dev->of_node, 0, > + NWL_DSI_ENDPOINT_LCDIF); > + if (remote) { > + /* At least LCDIF + NWL needs active high sync */ > + adjusted_mode->flags |= (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC); > + adjusted_mode->flags &= ~(DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC); > + } When submitting the NWL driver i was told to not change properties based on the endpoint. The argument is that this breaks when putting the bridge into another chain and that there might be other bridges in between. Maybe Laurent and Andrzej have a suggetion? I intend to respin the input mux bridge (https://lore.kernel.org/dri-devel/cover.1589548223.git.agx@sigxcpu.org/) at some point but even then we need to carry over the flags, so any input on how that should best be done would be welcome. Cheers, -- Guido > > return true; > } > -- > 2.28.0 > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel