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 X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 3FC2BC433DB for ; Mon, 22 Mar 2021 10:31:26 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 B996B6198F for ; Mon, 22 Mar 2021 10:31:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B996B6198F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vgEG2H7KFmxr8nG0/KtFZBmDPJSgrWwdrfnj0C5GK7k=; b=rco6/euimu6uF9qJOR68YCNwQ TLumdu7mZ3lUzVg2Fix2GE/FNV85J4L8i+qvuupNeb3Iamc1ehaXdME0IjtWpkkTvnOah00RzY3/a UL+BlHnjvbP/IPP0hyIRjijqqjsL1qB7bDz85/7rrOxT0+5vIelcR95AHLw9mNJhL9h1pC5eB/d9Z FETb9Orrlz9kYkgWXPquJmrWO8fzYOmYKUZ3J9c3jYLEpLm6AxUzCgpfTFPuMx0pzkyNFeeU06Ow5 Bs1fZ7rScn4/lfF93HwUUnIJRGB6Y5hmbKy6k2DwI1MTTtBTuGYPM0hTpfExfKs0uQv174UonaI2R ruLzIwqaA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOHoF-00BKoR-9E; Mon, 22 Mar 2021 10:29:19 +0000 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOHo7-00BKo0-QY for linux-arm-kernel@lists.infradead.org; Mon, 22 Mar 2021 10:29:13 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4F3rMR6z02z1s1Jn; Mon, 22 Mar 2021 11:29:07 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4F3rMR136vz1qv9k; Mon, 22 Mar 2021 11:29:07 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id LMI6HZNx46EO; Mon, 22 Mar 2021 11:29:05 +0100 (CET) X-Auth-Info: OdWZttE73T3wEDb4s/kUALOAD3JZlDfgmD+lEgdjvh0= Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 22 Mar 2021 11:29:05 +0100 (CET) Subject: Re: [PATCH V2] drm/bridge: lvds-codec: Add support for pixel data sampling edge select To: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, Alexandre Torgue , Andrzej Hajda , Antonio Borneo , Benjamin Gaignard , Biju Das , Maxime Coquelin , Philippe Cornu , Sam Ravnborg , Vincent Abriou , Yannick Fertre , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com References: <20201224061832.92010-1-marex@denx.de> From: Marek Vasut Message-ID: <4372d1cd-ffdb-e545-7262-d1ad1a649770@denx.de> Date: Mon, 22 Mar 2021 11:29:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210322_102912_115518_EBB6660A X-CRM114-Status: GOOD ( 25.88 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/22/21 2:14 AM, Laurent Pinchart wrote: > Hi Marek, Hi, [...] >> diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml >> index e5e3c72630cf..399a6528780a 100644 >> --- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml >> +++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml >> @@ -74,6 +74,13 @@ properties: >> >> additionalProperties: false >> >> + pixelclk-active: >> + description: | >> + Data sampling on rising or falling edge. >> + Use 0 to sample pixel data on rising edge and >> + Use 1 to sample pixel data on falling edge and >> + enum: [0, 1] > > The idea is good, but instead of adding a custom property, how about > reusing the pclk-sample property defined in > ../../media/video-interfaces.yaml ? Repeating myself from V1 discussion ... Either is fine by me, but I think pixelclk-active, which comes from panel-timings.yaml is closer to the video than multimedia bindings. > The property is only valid for encoders, so I would at least mention > that in the description, or, better, handle this based on the compatible > string to allow validation. How does that work in the Yaml file ? >> + >> powerdown-gpios: >> description: >> The GPIO used to control the power down line of this device. >> diff --git a/drivers/gpu/drm/bridge/lvds-codec.c b/drivers/gpu/drm/bridge/lvds-codec.c >> index dcf579a4cf83..cab81ccd895d 100644 >> --- a/drivers/gpu/drm/bridge/lvds-codec.c >> +++ b/drivers/gpu/drm/bridge/lvds-codec.c [...] >> @@ -126,6 +146,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); >> @@ -142,19 +163,20 @@ static int lvds_codec_remove(struct platform_device *pdev) >> return 0; >> } >> >> +static const struct lvds_codec_data decoder_data = { >> + .connector_type = DRM_MODE_CONNECTOR_DPI, >> + .is_encoder = false, > > The two fields are a bit redundant, as the decoder is always > LVDS-to-DPI, and the encoder DPI-to-LVDS. I don't mind too much, but > maybe we could drop the connector_type field, and derive the connector > type from is_encoder ? Or the other way around instead ? That is, if the connector_type is LVDS, then it is encoder , otherwise its decoder ? > One may then say that we could drop the lvds_codec_data structure as it > contains a single field, but I foresee a need to have device-specific > timings at some point, so I think it's a good addition. [...] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 E89BAC433C1 for ; Mon, 22 Mar 2021 10:29:16 +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 613776197F for ; Mon, 22 Mar 2021 10:29:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 613776197F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 BDCBB89E2B; Mon, 22 Mar 2021 10:29:15 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 33DE589E1D for ; Mon, 22 Mar 2021 10:29:14 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4F3rMR6z02z1s1Jn; Mon, 22 Mar 2021 11:29:07 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4F3rMR136vz1qv9k; Mon, 22 Mar 2021 11:29:07 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id LMI6HZNx46EO; Mon, 22 Mar 2021 11:29:05 +0100 (CET) X-Auth-Info: OdWZttE73T3wEDb4s/kUALOAD3JZlDfgmD+lEgdjvh0= Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 22 Mar 2021 11:29:05 +0100 (CET) Subject: Re: [PATCH V2] drm/bridge: lvds-codec: Add support for pixel data sampling edge select To: Laurent Pinchart References: <20201224061832.92010-1-marex@denx.de> From: Marek Vasut Message-ID: <4372d1cd-ffdb-e545-7262-d1ad1a649770@denx.de> Date: Mon, 22 Mar 2021 11:29:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US 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: Alexandre Torgue , Antonio Borneo , Vincent Abriou , Philippe Cornu , dri-devel@lists.freedesktop.org, Yannick Fertre , Andrzej Hajda , Maxime Coquelin , Biju Das , Sam Ravnborg , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Benjamin Gaignard Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 3/22/21 2:14 AM, Laurent Pinchart wrote: > Hi Marek, Hi, [...] >> diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml >> index e5e3c72630cf..399a6528780a 100644 >> --- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml >> +++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml >> @@ -74,6 +74,13 @@ properties: >> >> additionalProperties: false >> >> + pixelclk-active: >> + description: | >> + Data sampling on rising or falling edge. >> + Use 0 to sample pixel data on rising edge and >> + Use 1 to sample pixel data on falling edge and >> + enum: [0, 1] > > The idea is good, but instead of adding a custom property, how about > reusing the pclk-sample property defined in > ../../media/video-interfaces.yaml ? Repeating myself from V1 discussion ... Either is fine by me, but I think pixelclk-active, which comes from panel-timings.yaml is closer to the video than multimedia bindings. > The property is only valid for encoders, so I would at least mention > that in the description, or, better, handle this based on the compatible > string to allow validation. How does that work in the Yaml file ? >> + >> powerdown-gpios: >> description: >> The GPIO used to control the power down line of this device. >> diff --git a/drivers/gpu/drm/bridge/lvds-codec.c b/drivers/gpu/drm/bridge/lvds-codec.c >> index dcf579a4cf83..cab81ccd895d 100644 >> --- a/drivers/gpu/drm/bridge/lvds-codec.c >> +++ b/drivers/gpu/drm/bridge/lvds-codec.c [...] >> @@ -126,6 +146,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); >> @@ -142,19 +163,20 @@ static int lvds_codec_remove(struct platform_device *pdev) >> return 0; >> } >> >> +static const struct lvds_codec_data decoder_data = { >> + .connector_type = DRM_MODE_CONNECTOR_DPI, >> + .is_encoder = false, > > The two fields are a bit redundant, as the decoder is always > LVDS-to-DPI, and the encoder DPI-to-LVDS. I don't mind too much, but > maybe we could drop the connector_type field, and derive the connector > type from is_encoder ? Or the other way around instead ? That is, if the connector_type is LVDS, then it is encoder , otherwise its decoder ? > One may then say that we could drop the lvds_codec_data structure as it > contains a single field, but I foresee a need to have device-specific > timings at some point, so I think it's a good addition. [...] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel