Message ID | 20230624-sm6125-dpu-v1-3-1d5a638cebf2@somainline.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp6128844vqr; Fri, 23 Jun 2023 17:50:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xmHSmzpxL1zQ0YodcWLdIFcwNuzZkpozR7pofeU+0MgIia2yBy2cM5JJO00NJD2Ctoq2R X-Received: by 2002:a17:902:e809:b0:1ab:11c8:777a with SMTP id u9-20020a170902e80900b001ab11c8777amr848792plg.13.1687567808936; Fri, 23 Jun 2023 17:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687567808; cv=none; d=google.com; s=arc-20160816; b=HDTkNXucLD/kxTfqfFzalDkLQpVnDpG76+hGwMiQSpkUnawx7zoVvrlcC5OyNqK7gU 7cLO5TjcEfV+292bF3XC2JyWWxXxUXkzrL5mFlcUj3ut2AhZdeSy+N8t7srOhoWl3dg4 86/XtfNcYZbtfX5Pnk9ERA5vkMRrmwAR742bFEyGkPh0kx8AjyzkyKOI24cwQDh2Hnk6 iHWgaaUbPD3+c+xfFjm2XGsj2WYqDjgYZzYGFFu/ha4q9EloEn9ZotstBHttYIgDntIe UpWZAdHApG0+EihD6yc0Kb139Jox31OZ4eTTMR0kQumuRZYzlNKHAcXH6dscqG1XKE9D pnTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=8E065UDF//HE2tkFb3SPPJH5ZeV6oiEJ94m94XA2o2k=; fh=OfzUp+OcwbFUfZC2mGhS6GGXsXqM7NhjMWKyOt4HPQU=; b=GB0RJZsDeXW5SBlfG514LVv9T1UrGuTdQ4xjxcTMvR/E8LjdbN27cg5qO0Nkdmj7X7 WIUICjgah/bp6iErX/PjiN84g9f8tvnK+KSHw6JI3seXUbn1jjoIRXpvgLy8q6cQ9+ti dFzBjpVrLp6eZkPmGqIKtu4/HYFuiiHH7S3afBbLtwcuTs+xvhOT7WtBkW5N5i6TCUOe g5/J0+ClcrAF6ztaT50EjJOwz6hWlvPv9T490q69EI9JQushx8vLXY23s33mXVXc5zRs WG296rOlcu2NcpSiTKQB28bHtGRtlvLWJF9L2Eopfs9ab5+Ta5Ju3vck7pOJnwrKdpDb zQYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a170902f10500b001ae4e665c60si339018plb.156.2023.06.23.17.49.56; Fri, 23 Jun 2023 17:50:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232217AbjFXAlX (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Fri, 23 Jun 2023 20:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231840AbjFXAlK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 23 Jun 2023 20:41:10 -0400 Received: from relay05.th.seeweb.it (relay05.th.seeweb.it [5.144.164.166]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75742294D for <linux-kernel@vger.kernel.org>; Fri, 23 Jun 2023 17:41:07 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 871603F7BA; Sat, 24 Jun 2023 02:41:04 +0200 (CEST) From: Marijn Suijten <marijn.suijten@somainline.org> Date: Sat, 24 Jun 2023 02:41:01 +0200 Subject: [PATCH 03/15] dt-bindings: clock: qcom,dispcc-sm6125: Require GCC PLL0 DIV clock MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230624-sm6125-dpu-v1-3-1d5a638cebf2@somainline.org> References: <20230624-sm6125-dpu-v1-0-1d5a638cebf2@somainline.org> In-Reply-To: <20230624-sm6125-dpu-v1-0-1d5a638cebf2@somainline.org> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Krishna Manikandan <quic_mkrishn@quicinc.com> Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Konrad Dybcio <konrad.dybcio@linaro.org>, Martin Botka <martin.botka@somainline.org>, Jami Kettunen <jami.kettunen@somainline.org>, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Lux Aliaga <they@mint.lgbt>, Marijn Suijten <marijn.suijten@somainline.org> X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769543102730208736?= X-GMAIL-MSGID: =?utf-8?q?1769543102730208736?= |
Series |
drm/msm: Add SM6125 MDSS/DPU hardware and enable Sony Xperia 10 II panel
|
|
Commit Message
Marijn Suijten
June 24, 2023, 12:41 a.m. UTC
The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will
be passed from DT, and should be required by the bindings.
Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml | 4 ++++
1 file changed, 4 insertions(+)
Comments
On 24.06.2023 02:41, Marijn Suijten wrote: > The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will > be passed from DT, and should be required by the bindings. > > Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") > Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > --- Ideally, you'd stick it at the bottom of the list, as the items: order is part of the ABI Konrad > Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > index 2acf487d8a2f..11ec154503a3 100644 > --- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > +++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > @@ -23,6 +23,7 @@ properties: > clocks: > items: > - description: Board XO source > + - description: GPLL0 div source from GCC > - description: Byte clock from DSI PHY0 > - description: Pixel clock from DSI PHY0 > - description: Pixel clock from DSI PHY1 > @@ -32,6 +33,7 @@ properties: > clock-names: > items: > - const: bi_tcxo > + - const: gcc_disp_gpll0_div_clk_src > - const: dsi0_phy_pll_out_byteclk > - const: dsi0_phy_pll_out_dsiclk > - const: dsi1_phy_pll_out_dsiclk > @@ -65,12 +67,14 @@ examples: > compatible = "qcom,sm6125-dispcc"; > reg = <0x5f00000 0x20000>; > clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, > + <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>, > <&dsi0_phy 0>, > <&dsi0_phy 1>, > <&dsi1_phy 1>, > <&dp_phy 0>, > <&dp_phy 1>; > clock-names = "bi_tcxo", > + "gcc_disp_gpll0_div_clk_src", > "dsi0_phy_pll_out_byteclk", > "dsi0_phy_pll_out_dsiclk", > "dsi1_phy_pll_out_dsiclk", >
On 24/06/2023 03:45, Konrad Dybcio wrote: > On 24.06.2023 02:41, Marijn Suijten wrote: >> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will >> be passed from DT, and should be required by the bindings. >> >> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") >> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> >> --- > Ideally, you'd stick it at the bottom of the list, as the items: order > is part of the ABI Yes, please add them to the end. Order is fixed. Best regards, Krzysztof
On 2023-06-24 03:45:02, Konrad Dybcio wrote: > On 24.06.2023 02:41, Marijn Suijten wrote: > > The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will > > be passed from DT, and should be required by the bindings. > > > > Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") > > Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > > --- > Ideally, you'd stick it at the bottom of the list, as the items: order > is part of the ABI This isn't an ABI break, as this driver nor its bindings require/declare a fixed order: they declare a relation between clocks and clock-names. This orders the GCC clock just like other dispccs. And the previous patch dropped the unused cfg_ahb_clk from the bindings, so all bets are off anyway. - Marijn > > Konrad > > Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > > index 2acf487d8a2f..11ec154503a3 100644 > > --- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > > +++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > > @@ -23,6 +23,7 @@ properties: > > clocks: > > items: > > - description: Board XO source > > + - description: GPLL0 div source from GCC > > - description: Byte clock from DSI PHY0 > > - description: Pixel clock from DSI PHY0 > > - description: Pixel clock from DSI PHY1 > > @@ -32,6 +33,7 @@ properties: > > clock-names: > > items: > > - const: bi_tcxo > > + - const: gcc_disp_gpll0_div_clk_src > > - const: dsi0_phy_pll_out_byteclk > > - const: dsi0_phy_pll_out_dsiclk > > - const: dsi1_phy_pll_out_dsiclk > > @@ -65,12 +67,14 @@ examples: > > compatible = "qcom,sm6125-dispcc"; > > reg = <0x5f00000 0x20000>; > > clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, > > + <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>, > > <&dsi0_phy 0>, > > <&dsi0_phy 1>, > > <&dsi1_phy 1>, > > <&dp_phy 0>, > > <&dp_phy 1>; > > clock-names = "bi_tcxo", > > + "gcc_disp_gpll0_div_clk_src", > > "dsi0_phy_pll_out_byteclk", > > "dsi0_phy_pll_out_dsiclk", > > "dsi1_phy_pll_out_dsiclk", > >
On 2023-06-24 11:08:54, Krzysztof Kozlowski wrote: > On 24/06/2023 03:45, Konrad Dybcio wrote: > > On 24.06.2023 02:41, Marijn Suijten wrote: > >> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will > >> be passed from DT, and should be required by the bindings. > >> > >> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") > >> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > >> --- > > Ideally, you'd stick it at the bottom of the list, as the items: order > > is part of the ABI > > Yes, please add them to the end. Order is fixed. Disagreed for bindings that declare clock-names and when the driver adheres to it, see my reply to Konrad's message. - Marijn
On 25.06.2023 21:48, Marijn Suijten wrote: > On 2023-06-24 03:45:02, Konrad Dybcio wrote: >> On 24.06.2023 02:41, Marijn Suijten wrote: >>> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will >>> be passed from DT, and should be required by the bindings. >>> >>> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") >>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> >>> --- >> Ideally, you'd stick it at the bottom of the list, as the items: order >> is part of the ABI > > This isn't an ABI break, as this driver nor its bindings require/declare > a fixed order: they declare a relation between clocks and clock-names. Bindings describe the ABI, drivers implement compliant code flow. > > This orders the GCC clock just like other dispccs. And the previous > patch dropped the unused cfg_ahb_clk from the bindings, so all bets are > off anyway. Thinking about it again, the binding has not been consumed by any upstream DT to date, so it should (tm) be fine to let it slide.. Konrad > > - Marijn > >> >> Konrad >>> Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml >>> index 2acf487d8a2f..11ec154503a3 100644 >>> --- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml >>> +++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml >>> @@ -23,6 +23,7 @@ properties: >>> clocks: >>> items: >>> - description: Board XO source >>> + - description: GPLL0 div source from GCC >>> - description: Byte clock from DSI PHY0 >>> - description: Pixel clock from DSI PHY0 >>> - description: Pixel clock from DSI PHY1 >>> @@ -32,6 +33,7 @@ properties: >>> clock-names: >>> items: >>> - const: bi_tcxo >>> + - const: gcc_disp_gpll0_div_clk_src >>> - const: dsi0_phy_pll_out_byteclk >>> - const: dsi0_phy_pll_out_dsiclk >>> - const: dsi1_phy_pll_out_dsiclk >>> @@ -65,12 +67,14 @@ examples: >>> compatible = "qcom,sm6125-dispcc"; >>> reg = <0x5f00000 0x20000>; >>> clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, >>> + <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>, >>> <&dsi0_phy 0>, >>> <&dsi0_phy 1>, >>> <&dsi1_phy 1>, >>> <&dp_phy 0>, >>> <&dp_phy 1>; >>> clock-names = "bi_tcxo", >>> + "gcc_disp_gpll0_div_clk_src", >>> "dsi0_phy_pll_out_byteclk", >>> "dsi0_phy_pll_out_dsiclk", >>> "dsi1_phy_pll_out_dsiclk", >>>
On 2023-06-26 11:43:39, Konrad Dybcio wrote: > On 25.06.2023 21:48, Marijn Suijten wrote: > > On 2023-06-24 03:45:02, Konrad Dybcio wrote: > >> On 24.06.2023 02:41, Marijn Suijten wrote: > >>> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will > >>> be passed from DT, and should be required by the bindings. > >>> > >>> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") > >>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > >>> --- > >> Ideally, you'd stick it at the bottom of the list, as the items: order > >> is part of the ABI > > > > This isn't an ABI break, as this driver nor its bindings require/declare > > a fixed order: they declare a relation between clocks and clock-names. > Bindings describe the ABI, drivers implement compliant code flow. That is how bindings are supposed to be... However typically the driver is written/ported first and then the bindings are simply created to reflect this, and sometimes (as is the case with this patch) incorrectly. That, together with a lack of DTS and known-working device with it (which is why I'm submitting driver+bindings+dts in one series now!) makes us shoot ourselves in the foot by locking everyone into an ABI that makes no sense. > > This orders the GCC clock just like other dispccs. And the previous > > patch dropped the unused cfg_ahb_clk from the bindings, so all bets are > > off anyway. > Thinking about it again, the binding has not been consumed by any upstream > DT to date, so it should (tm) be fine to let it slide.. Exactly, I hope/doubt anyone was already using these incomplete bindings. And again: the ABI here is the name->phandle mapping, the order Does Not Matter™. So I hope we can let it slide (otherwise the previous patch shouldd have been NAK'ed as well??) (Unless you are SM6115 which uses index-based mapping and does not define clock-names at all) - Marijn > Konrad > > > > - Marijn > > > >> > >> Konrad > >>> Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml | 4 ++++ > >>> 1 file changed, 4 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > >>> index 2acf487d8a2f..11ec154503a3 100644 > >>> --- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > >>> +++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > >>> @@ -23,6 +23,7 @@ properties: > >>> clocks: > >>> items: > >>> - description: Board XO source > >>> + - description: GPLL0 div source from GCC > >>> - description: Byte clock from DSI PHY0 > >>> - description: Pixel clock from DSI PHY0 > >>> - description: Pixel clock from DSI PHY1 > >>> @@ -32,6 +33,7 @@ properties: > >>> clock-names: > >>> items: > >>> - const: bi_tcxo > >>> + - const: gcc_disp_gpll0_div_clk_src > >>> - const: dsi0_phy_pll_out_byteclk > >>> - const: dsi0_phy_pll_out_dsiclk > >>> - const: dsi1_phy_pll_out_dsiclk > >>> @@ -65,12 +67,14 @@ examples: > >>> compatible = "qcom,sm6125-dispcc"; > >>> reg = <0x5f00000 0x20000>; > >>> clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, > >>> + <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>, > >>> <&dsi0_phy 0>, > >>> <&dsi0_phy 1>, > >>> <&dsi1_phy 1>, > >>> <&dp_phy 0>, > >>> <&dp_phy 1>; > >>> clock-names = "bi_tcxo", > >>> + "gcc_disp_gpll0_div_clk_src", > >>> "dsi0_phy_pll_out_byteclk", > >>> "dsi0_phy_pll_out_dsiclk", > >>> "dsi1_phy_pll_out_dsiclk", > >>>
On 25/06/2023 21:48, Marijn Suijten wrote: > On 2023-06-24 11:08:54, Krzysztof Kozlowski wrote: >> On 24/06/2023 03:45, Konrad Dybcio wrote: >>> On 24.06.2023 02:41, Marijn Suijten wrote: >>>> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will >>>> be passed from DT, and should be required by the bindings. >>>> >>>> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") >>>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> >>>> --- >>> Ideally, you'd stick it at the bottom of the list, as the items: order >>> is part of the ABI >> >> Yes, please add them to the end. Order is fixed. > > Disagreed for bindings that declare clock-names and when the driver > adheres to it, see my reply to Konrad's message. That's the generic rule, with some exceptions of course. Whether one chosen driver (chosen system and chosen version of that system) adheres or not, does not change it. Other driver behaves differently and ABI is for everyone, not only for your specific version of Linux driver. Follow the rule. Best regards, Krzysztof
On 26/06/2023 16:26, Marijn Suijten wrote: > On 2023-06-26 11:43:39, Konrad Dybcio wrote: >> On 25.06.2023 21:48, Marijn Suijten wrote: >>> On 2023-06-24 03:45:02, Konrad Dybcio wrote: >>>> On 24.06.2023 02:41, Marijn Suijten wrote: >>>>> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will >>>>> be passed from DT, and should be required by the bindings. >>>>> >>>>> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") >>>>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> >>>>> --- >>>> Ideally, you'd stick it at the bottom of the list, as the items: order >>>> is part of the ABI >>> >>> This isn't an ABI break, as this driver nor its bindings require/declare >>> a fixed order: they declare a relation between clocks and clock-names. >> Bindings describe the ABI, drivers implement compliant code flow. > > That is how bindings are supposed to be... However typically the driver > is written/ported first and then the bindings are simply created to Your development process does not matter for the bindings. Whatever you decide to do "typically" is your choice, although of course I understand why you do it like that. You can argument the same that "I never create bindings in my process, so the driver defines the ABI". > reflect this, and sometimes (as is the case with this patch) > incorrectly. > > That, together with a lack of DTS and known-working device with it > (which is why I'm submitting driver+bindings+dts in one series now!) > makes us shoot ourselves in the foot by locking everyone into an ABI > that makes no sense. No one is locked into the ABI. SoC maintainer decides on this. However unjustified ABI breaking or not caring about it at all is not the way to go. It is not the correct process. > >>> This orders the GCC clock just like other dispccs. And the previous >>> patch dropped the unused cfg_ahb_clk from the bindings, so all bets are >>> off anyway. >> Thinking about it again, the binding has not been consumed by any upstream >> DT to date, so it should (tm) be fine to let it slide.. > > Exactly, I hope/doubt anyone was already using these incomplete > bindings. And again: the ABI here is the name->phandle mapping, the > order Does Not Matter™. No, it's not. Your one driver does not define the ABI. There are many different drivers, many different operating systems and other software components. Best regards, Krzysztof
On 2023-06-26 18:15:13, Krzysztof Kozlowski wrote: > On 26/06/2023 16:26, Marijn Suijten wrote: > > On 2023-06-26 11:43:39, Konrad Dybcio wrote: > >> On 25.06.2023 21:48, Marijn Suijten wrote: > >>> On 2023-06-24 03:45:02, Konrad Dybcio wrote: > >>>> On 24.06.2023 02:41, Marijn Suijten wrote: > >>>>> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will > >>>>> be passed from DT, and should be required by the bindings. > >>>>> > >>>>> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") > >>>>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > >>>>> --- > >>>> Ideally, you'd stick it at the bottom of the list, as the items: order > >>>> is part of the ABI > >>> > >>> This isn't an ABI break, as this driver nor its bindings require/declare > >>> a fixed order: they declare a relation between clocks and clock-names. > >> Bindings describe the ABI, drivers implement compliant code flow. > > > > That is how bindings are supposed to be... However typically the driver > > is written/ported first and then the bindings are simply created to > > Your development process does not matter for the bindings. Whatever you > decide to do "typically" is your choice, although of course I understand > why you do it like that. You can argument the same that "I never create > bindings in my process, so the driver defines the ABI". This is not my process, nor my choice. > > reflect this, and sometimes (as is the case with this patch) > > incorrectly. > > > > That, together with a lack of DTS and known-working device with it > > (which is why I'm submitting driver+bindings+dts in one series now!) > > makes us shoot ourselves in the foot by locking everyone into an ABI > > that makes no sense. > > No one is locked into the ABI. SoC maintainer decides on this. However > unjustified ABI breaking or not caring about it at all is not the way to > go. It is not the correct process. It definitely sounds like it. > >>> This orders the GCC clock just like other dispccs. And the previous > >>> patch dropped the unused cfg_ahb_clk from the bindings, so all bets are > >>> off anyway. > >> Thinking about it again, the binding has not been consumed by any upstream > >> DT to date, so it should (tm) be fine to let it slide.. > > > > Exactly, I hope/doubt anyone was already using these incomplete > > bindings. And again: the ABI here is the name->phandle mapping, the > > order Does Not Matter™. > > No, it's not. Your one driver does not define the ABI. There are many > different drivers, many different operating systems and other software > components. You missed the point entirely. The point is that someone contributed a dt-bindings patch that does not represent the hardware (hence not the driver for that hardware either). It was taken without objection. So now what? We are stuck with a broken ABI that does not allow us to describe the hardware? If there are many different drivers and other OSes, why are we solely responsible for describing broken bindings? Why were there no objections elsewhere that this does not allow us to describe the hardware in question? Note that the person signing off on and sending that initial dt-bindings patch for qcom,dispcc-sm6125.yaml is me, by the way. - Marijn
On 2023-06-26 18:10:44, Krzysztof Kozlowski wrote: > On 25/06/2023 21:48, Marijn Suijten wrote: > > On 2023-06-24 11:08:54, Krzysztof Kozlowski wrote: > >> On 24/06/2023 03:45, Konrad Dybcio wrote: > >>> On 24.06.2023 02:41, Marijn Suijten wrote: > >>>> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will > >>>> be passed from DT, and should be required by the bindings. > >>>> > >>>> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") > >>>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > >>>> --- > >>> Ideally, you'd stick it at the bottom of the list, as the items: order > >>> is part of the ABI > >> > >> Yes, please add them to the end. Order is fixed. > > > > Disagreed for bindings that declare clock-names and when the driver > > adheres to it, see my reply to Konrad's message. > > That's the generic rule, with some exceptions of course. Whether one > chosen driver (chosen system and chosen version of that system) adheres > or not, does not change it. Other driver behaves differently and ABI is > for everyone, not only for your specific version of Linux driver. > > Follow the rule. This has no relation to the driver (just that our driver adheres to the bindings, as it is supposed to be). The bindings define a mapping from a clock-names=<> entry to a clock on the same index in the clocks=<> array. That relation remains the same with this change. - Marijn
On 26/06/2023 19:49, Marijn Suijten wrote: > On 2023-06-26 18:10:44, Krzysztof Kozlowski wrote: >> On 25/06/2023 21:48, Marijn Suijten wrote: >>> On 2023-06-24 11:08:54, Krzysztof Kozlowski wrote: >>>> On 24/06/2023 03:45, Konrad Dybcio wrote: >>>>> On 24.06.2023 02:41, Marijn Suijten wrote: >>>>>> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will >>>>>> be passed from DT, and should be required by the bindings. >>>>>> >>>>>> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") >>>>>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> >>>>>> --- >>>>> Ideally, you'd stick it at the bottom of the list, as the items: order >>>>> is part of the ABI >>>> >>>> Yes, please add them to the end. Order is fixed. >>> >>> Disagreed for bindings that declare clock-names and when the driver >>> adheres to it, see my reply to Konrad's message. >> >> That's the generic rule, with some exceptions of course. Whether one >> chosen driver (chosen system and chosen version of that system) adheres >> or not, does not change it. Other driver behaves differently and ABI is >> for everyone, not only for your specific version of Linux driver. >> >> Follow the rule. > > This has no relation to the driver (just that our driver adheres to the > bindings, as it is supposed to be). The bindings define a mapping from > a clock-names=<> entry to a clock on the same index in the clocks=<> > array. That relation remains the same with this change. Not really, binding also defines the list of clocks - their order and specific entries. This changes. Best regards, Krzysztof
On 2023-06-26 20:29:37, Krzysztof Kozlowski wrote: > On 26/06/2023 19:49, Marijn Suijten wrote: > > On 2023-06-26 18:10:44, Krzysztof Kozlowski wrote: > >> On 25/06/2023 21:48, Marijn Suijten wrote: > >>> On 2023-06-24 11:08:54, Krzysztof Kozlowski wrote: > >>>> On 24/06/2023 03:45, Konrad Dybcio wrote: > >>>>> On 24.06.2023 02:41, Marijn Suijten wrote: > >>>>>> The "gcc_disp_gpll0_div_clk_src" clock is consumed by the driver, will > >>>>>> be passed from DT, and should be required by the bindings. > >>>>>> > >>>>>> Fixes: 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings") > >>>>>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > >>>>>> --- > >>>>> Ideally, you'd stick it at the bottom of the list, as the items: order > >>>>> is part of the ABI > >>>> > >>>> Yes, please add them to the end. Order is fixed. > >>> > >>> Disagreed for bindings that declare clock-names and when the driver > >>> adheres to it, see my reply to Konrad's message. > >> > >> That's the generic rule, with some exceptions of course. Whether one > >> chosen driver (chosen system and chosen version of that system) adheres > >> or not, does not change it. Other driver behaves differently and ABI is > >> for everyone, not only for your specific version of Linux driver. > >> > >> Follow the rule. > > > > This has no relation to the driver (just that our driver adheres to the > > bindings, as it is supposed to be). The bindings define a mapping from > > a clock-names=<> entry to a clock on the same index in the clocks=<> > > array. That relation remains the same with this change. > > Not really, binding also defines the list of clocks - their order and > specific entries. This changes. And so it does in "dt-bindings: clock: qcom,dispcc-sm6125: Remove unused GCC_DISP_AHB_CLK"? - Marijn
On 2023-06-26 20:51:38, Marijn Suijten wrote: <snip> > > Not really, binding also defines the list of clocks - their order and > > specific entries. This changes. > > And so it does in "dt-bindings: clock: qcom,dispcc-sm6125: Remove unused > GCC_DISP_AHB_CLK"? Never mind: it is the last item so the order of the other items doesn't change. The total number of items decreases though, which sounds like an ABI-break too? - Marijn
On 26/06/2023 20:53, Marijn Suijten wrote: > On 2023-06-26 20:51:38, Marijn Suijten wrote: > <snip> >>> Not really, binding also defines the list of clocks - their order and >>> specific entries. This changes. >> >> And so it does in "dt-bindings: clock: qcom,dispcc-sm6125: Remove unused >> GCC_DISP_AHB_CLK"? > > Never mind: it is the last item so the order of the other items doesn't > change. The total number of items decreases though, which sounds like > an ABI-break too? How does it break? Old DTS works exactly the same, doesn't it? Best regards, Krzysztof
On 2023-06-27 08:24:41, Krzysztof Kozlowski wrote: > On 26/06/2023 20:53, Marijn Suijten wrote: > > On 2023-06-26 20:51:38, Marijn Suijten wrote: > > <snip> > >>> Not really, binding also defines the list of clocks - their order and > >>> specific entries. This changes. > >> > >> And so it does in "dt-bindings: clock: qcom,dispcc-sm6125: Remove unused > >> GCC_DISP_AHB_CLK"? > > > > Never mind: it is the last item so the order of the other items doesn't > > change. The total number of items decreases though, which sounds like > > an ABI-break too? > > How does it break? Old DTS works exactly the same, doesn't it? So deleting a new item at the end does not matter. But what if I respin this patch to add the new clock _at the end_, which will then be at the same index as the previous GCC_DISP_AHB_CLK? - Marijn
On 27/06/2023 08:54, Marijn Suijten wrote: > On 2023-06-27 08:24:41, Krzysztof Kozlowski wrote: >> On 26/06/2023 20:53, Marijn Suijten wrote: >>> On 2023-06-26 20:51:38, Marijn Suijten wrote: >>> <snip> >>>>> Not really, binding also defines the list of clocks - their order and >>>>> specific entries. This changes. >>>> >>>> And so it does in "dt-bindings: clock: qcom,dispcc-sm6125: Remove unused >>>> GCC_DISP_AHB_CLK"? >>> >>> Never mind: it is the last item so the order of the other items doesn't >>> change. The total number of items decreases though, which sounds like >>> an ABI-break too? >> >> How does it break? Old DTS works exactly the same, doesn't it? > > So deleting a new item at the end does not matter. But what if I respin > this patch to add the new clock _at the end_, which will then be at the > same index as the previous GCC_DISP_AHB_CLK? I think you know the answer, right? What do you want to prove? That two independent changes can have together negative effect? We know this. Best regards, Krzysztof
On 2023-06-27 09:29:53, Krzysztof Kozlowski wrote: > On 27/06/2023 08:54, Marijn Suijten wrote: > > On 2023-06-27 08:24:41, Krzysztof Kozlowski wrote: > >> On 26/06/2023 20:53, Marijn Suijten wrote: > >>> On 2023-06-26 20:51:38, Marijn Suijten wrote: > >>> <snip> > >>>>> Not really, binding also defines the list of clocks - their order and > >>>>> specific entries. This changes. > >>>> > >>>> And so it does in "dt-bindings: clock: qcom,dispcc-sm6125: Remove unused > >>>> GCC_DISP_AHB_CLK"? > >>> > >>> Never mind: it is the last item so the order of the other items doesn't > >>> change. The total number of items decreases though, which sounds like > >>> an ABI-break too? > >> > >> How does it break? Old DTS works exactly the same, doesn't it? > > > > So deleting a new item at the end does not matter. But what if I respin > > this patch to add the new clock _at the end_, which will then be at the > > same index as the previous GCC_DISP_AHB_CLK? > > I think you know the answer, right? What do you want to prove? That two > independent changes can have together negative effect? We know this. The question is whether this is allowed? - Marijn
On 27/06/2023 09:49, Marijn Suijten wrote: > On 2023-06-27 09:29:53, Krzysztof Kozlowski wrote: >> On 27/06/2023 08:54, Marijn Suijten wrote: >>> On 2023-06-27 08:24:41, Krzysztof Kozlowski wrote: >>>> On 26/06/2023 20:53, Marijn Suijten wrote: >>>>> On 2023-06-26 20:51:38, Marijn Suijten wrote: >>>>> <snip> >>>>>>> Not really, binding also defines the list of clocks - their order and >>>>>>> specific entries. This changes. >>>>>> >>>>>> And so it does in "dt-bindings: clock: qcom,dispcc-sm6125: Remove unused >>>>>> GCC_DISP_AHB_CLK"? >>>>> >>>>> Never mind: it is the last item so the order of the other items doesn't >>>>> change. The total number of items decreases though, which sounds like >>>>> an ABI-break too? >>>> >>>> How does it break? Old DTS works exactly the same, doesn't it? >>> >>> So deleting a new item at the end does not matter. But what if I respin >>> this patch to add the new clock _at the end_, which will then be at the >>> same index as the previous GCC_DISP_AHB_CLK? >> >> I think you know the answer, right? What do you want to prove? That two >> independent changes can have together negative effect? We know this. > > The question is whether this is allowed? That would be an ABI break and I already explained if it is or is not allowed. Best regards, Krzysztof
On 2023-06-27 10:21:12, Krzysztof Kozlowski wrote: > On 27/06/2023 09:49, Marijn Suijten wrote: > > On 2023-06-27 09:29:53, Krzysztof Kozlowski wrote: > >> On 27/06/2023 08:54, Marijn Suijten wrote: > >>> On 2023-06-27 08:24:41, Krzysztof Kozlowski wrote: > >>>> On 26/06/2023 20:53, Marijn Suijten wrote: > >>>>> On 2023-06-26 20:51:38, Marijn Suijten wrote: > >>>>> <snip> > >>>>>>> Not really, binding also defines the list of clocks - their order and > >>>>>>> specific entries. This changes. > >>>>>> > >>>>>> And so it does in "dt-bindings: clock: qcom,dispcc-sm6125: Remove unused > >>>>>> GCC_DISP_AHB_CLK"? > >>>>> > >>>>> Never mind: it is the last item so the order of the other items doesn't > >>>>> change. The total number of items decreases though, which sounds like > >>>>> an ABI-break too? > >>>> > >>>> How does it break? Old DTS works exactly the same, doesn't it? > >>> > >>> So deleting a new item at the end does not matter. But what if I respin > >>> this patch to add the new clock _at the end_, which will then be at the > >>> same index as the previous GCC_DISP_AHB_CLK? > >> > >> I think you know the answer, right? What do you want to prove? That two > >> independent changes can have together negative effect? We know this. > > > > The question is whether this is allowed? > > That would be an ABI break and I already explained if it is or is not > allowed. How should we solve it then, if we cannot remove GCC_DISP_AHB_CLK in one patch and add GCC_DISP_GPLL0_DIV_CLK_SRC **at the end** in the next patch? Keep an empty spot at the original index of GCC_DISP_AHB_CLK? - Marijn
On 27/06/2023 11:02, Marijn Suijten wrote: >>>>> So deleting a new item at the end does not matter. But what if I respin >>>>> this patch to add the new clock _at the end_, which will then be at the >>>>> same index as the previous GCC_DISP_AHB_CLK? >>>> >>>> I think you know the answer, right? What do you want to prove? That two >>>> independent changes can have together negative effect? We know this. >>> >>> The question is whether this is allowed? >> >> That would be an ABI break and I already explained if it is or is not >> allowed. > > How should we solve it then, if we cannot remove GCC_DISP_AHB_CLK in one > patch and add GCC_DISP_GPLL0_DIV_CLK_SRC **at the end** in the next > patch? Keep an empty spot at the original index of GCC_DISP_AHB_CLK? I don't know if you are trolling me or really asking question, so just in case it is the latter: "No one is locked into the ABI. SoC maintainer decides on this. " Also: https://lore.kernel.org/linux-arm-msm/20230608152759.GA2721945-robh@kernel.org/ https://lore.kernel.org/linux-arm-msm/CAL_JsqKOq+PdjUPVYqdC7QcjGxp-KbAG_O9e+zrfY7k-wRr1QQ@mail.gmail.com/ https://lore.kernel.org/linux-arm-msm/20220602143245.GA2256965-robh@kernel.org/ https://lore.kernel.org/linux-arm-msm/20220601202452.GA365963-robh@kernel.org/ Any many more. Best regards, Krzysztof
On 2023-06-27 11:07:22, Krzysztof Kozlowski wrote: > On 27/06/2023 11:02, Marijn Suijten wrote: > >>>>> So deleting a new item at the end does not matter. But what if I respin > >>>>> this patch to add the new clock _at the end_, which will then be at the > >>>>> same index as the previous GCC_DISP_AHB_CLK? > >>>> > >>>> I think you know the answer, right? What do you want to prove? That two > >>>> independent changes can have together negative effect? We know this. > >>> > >>> The question is whether this is allowed? > >> > >> That would be an ABI break and I already explained if it is or is not > >> allowed. > > > > How should we solve it then, if we cannot remove GCC_DISP_AHB_CLK in one > > patch and add GCC_DISP_GPLL0_DIV_CLK_SRC **at the end** in the next > > patch? Keep an empty spot at the original index of GCC_DISP_AHB_CLK? > > I don't know if you are trolling me or really asking question, so just > in case it is the latter: Apologies if it comes across that way, but I am genuinely misunderstanding what is and is not allowed as part of this ABI... > "No one is locked into the ABI. SoC maintainer decides on this. " Especially if it is up to the SoC mantainer. > Also: > https://lore.kernel.org/linux-arm-msm/20230608152759.GA2721945-robh@kernel.org/ > > https://lore.kernel.org/linux-arm-msm/CAL_JsqKOq+PdjUPVYqdC7QcjGxp-KbAG_O9e+zrfY7k-wRr1QQ@mail.gmail.com/ > > https://lore.kernel.org/linux-arm-msm/20220602143245.GA2256965-robh@kernel.org/ > > https://lore.kernel.org/linux-arm-msm/20220601202452.GA365963-robh@kernel.org/ > > Any many more. In that sense the question above is not for you, but for the SoC maintainer? Whom, I hope, will say that we can be lenient in changing the ABI for a platform that is only slowly being brought up by a bunch of community developers and unlikely to be touched by anyone else. Thanks for helping out so far! - Marijn
diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml index 2acf487d8a2f..11ec154503a3 100644 --- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml @@ -23,6 +23,7 @@ properties: clocks: items: - description: Board XO source + - description: GPLL0 div source from GCC - description: Byte clock from DSI PHY0 - description: Pixel clock from DSI PHY0 - description: Pixel clock from DSI PHY1 @@ -32,6 +33,7 @@ properties: clock-names: items: - const: bi_tcxo + - const: gcc_disp_gpll0_div_clk_src - const: dsi0_phy_pll_out_byteclk - const: dsi0_phy_pll_out_dsiclk - const: dsi1_phy_pll_out_dsiclk @@ -65,12 +67,14 @@ examples: compatible = "qcom,sm6125-dispcc"; reg = <0x5f00000 0x20000>; clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>, <&dsi0_phy 0>, <&dsi0_phy 1>, <&dsi1_phy 1>, <&dp_phy 0>, <&dp_phy 1>; clock-names = "bi_tcxo", + "gcc_disp_gpll0_div_clk_src", "dsi0_phy_pll_out_byteclk", "dsi0_phy_pll_out_dsiclk", "dsi1_phy_pll_out_dsiclk",