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=-9.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 CF5DAC433DF for ; Fri, 16 Oct 2020 16:26: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 05B3120848 for ; Fri, 16 Oct 2020 16:26:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05B3120848 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.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 1184F6EE36; Fri, 16 Oct 2020 16:26:01 +0000 (UTC) Received: from asavdk4.altibox.net (asavdk4.altibox.net [109.247.116.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1F8AA6EE36 for ; Fri, 16 Oct 2020 16:26:00 +0000 (UTC) Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 4DB4E80608; Fri, 16 Oct 2020 18:25:55 +0200 (CEST) Date: Fri, 16 Oct 2020 18:25:53 +0200 From: Sam Ravnborg To: Marek Vasut Subject: Re: [RFC][PATCH] drm/bridge: lvds-codec: Add support for pixel data sampling edge select Message-ID: <20201016162553.GA1333109@ravnborg.org> References: <20201002230823.242147-1-marex@denx.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201002230823.242147-1-marex@denx.de> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=fu7ymmwf c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=8b9GpE9nAAAA:8 a=hD80L64hAAAA:8 a=yC-0_ovQAAAA:8 a=P1BnusSwAAAA:8 a=pGLkceISAAAA:8 a=7gkXJVJtAAAA:8 a=JfrnYn6hAAAA:8 a=phlkwaE_AAAA:8 a=e5mUnYsNAAAA:8 a=6CZSjis6Rq6xaZBMZBsA:9 a=lKBsp2zljbJEqnF_:21 a=AoBWwtdSRskkJ9Z_:21 a=CjuIK1q_8ugA:10 a=T3LWEMljR5ZiDmsYVIUa:22 a=QsnFDINu91a9xkgZirup:22 a=D0XLA9XvdZm18NrgonBM:22 a=E9Po1WZjFZOl8hwRPBS3:22 a=1CNFftbPRP8L7MoqJWF3:22 a=uKTQOUHymn4LaG7oTSIC:22 a=Vxmtnl_E_bksehYqCbjh:22 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: Benjamin Gaignard , Antonio Borneo , Philippe Cornu , dri-devel@lists.freedesktop.org, Yannick Fertre , Andrzej Hajda , Laurent Pinchart , Maxime Coquelin , Biju Das , Vincent Abriou , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Alexandre Torgue Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Marek. On Sat, Oct 03, 2020 at 01:08:23AM +0200, Marek Vasut wrote: > The OnSemi FIN3385 Parallel-to-LVDS encoder has a dedicated input line to > select input pixel data sampling edge. Add DT property "pixelclk-active", > same as the one used by display timings, and configure bus flags based on > this DT property. Why is it that this information cannot come from the panel driver? The property tell when data are sampled and the FIN3385 Parallel-to-LVDS is the one that transmit the data - not then one that samples the data. Correct? Sam > > Signed-off-by: Marek Vasut > Cc: Alexandre Torgue > Cc: Andrzej Hajda > Cc: Antonio Borneo > Cc: Benjamin Gaignard > Cc: Biju Das > Cc: Laurent Pinchart > Cc: Maxime Coquelin > Cc: Philippe Cornu > Cc: Sam Ravnborg > Cc: Vincent Abriou > Cc: Yannick Fertre > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-stm32@st-md-mailman.stormreply.com > To: dri-devel@lists.freedesktop.org > --- > drivers/gpu/drm/bridge/lvds-codec.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/lvds-codec.c b/drivers/gpu/drm/bridge/lvds-codec.c > index f52ccffc1bd1..bc941d4fb5b9 100644 > --- a/drivers/gpu/drm/bridge/lvds-codec.c > +++ b/drivers/gpu/drm/bridge/lvds-codec.c > @@ -19,6 +19,7 @@ struct lvds_codec { > struct device *dev; > struct drm_bridge bridge; > struct drm_bridge *panel_bridge; > + struct drm_bridge_timings timings; > struct regulator *vcc; > struct gpio_desc *powerdown_gpio; > u32 connector_type; > @@ -80,6 +81,7 @@ static int lvds_codec_probe(struct platform_device *pdev) > struct device_node *panel_node; > struct drm_panel *panel; > struct lvds_codec *lvds_codec; > + u32 val; > int ret; > > lvds_codec = devm_kzalloc(dev, sizeof(*lvds_codec), GFP_KERNEL); > @@ -124,6 +126,12 @@ static int lvds_codec_probe(struct platform_device *pdev) > if (IS_ERR(lvds_codec->panel_bridge)) > return PTR_ERR(lvds_codec->panel_bridge); > > + if (!of_property_read_u32(dev->of_node, "pixelclk-active", &val)) { > + lvds_codec->timings.input_bus_flags = val ? > + DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE : > + DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE; > + } > + > /* > * The panel_bridge bridge is attached to the panel's of_node, > * but we need a bridge attached to our of_node for our user > @@ -131,6 +139,7 @@ static int lvds_codec_probe(struct platform_device *pdev) > */ > lvds_codec->bridge.of_node = dev->of_node; > lvds_codec->bridge.funcs = &funcs; > + lvds_codec->bridge.timings = &lvds_codec->timings; > drm_bridge_add(&lvds_codec->bridge); > > platform_set_drvdata(pdev, lvds_codec); > -- > 2.28.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel