All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: John Watts <contact@jookia.org>
Cc: "Rob Herring" <robh+dt@kernel.org>,
	"Frank Rowand" <frowand.list@gmail.com>,
	"Hervé Codina" <herve.codina@bootlin.com>,
	"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
	kernel-team@android.com, "Rob Herring" <robh@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing
Date: Fri, 22 Mar 2024 18:53:57 -0700	[thread overview]
Message-ID: <CAGETcx8+vw0Vr0NWzjOAvxAZ07M4U7BWPAgO9avCngW0-9e_kA@mail.gmail.com> (raw)
In-Reply-To: <ZfvN5jDrftG-YRG4@titan>

On Wed, Mar 20, 2024 at 11:05 PM John Watts <contact@jookia.org> wrote:
>
> On Fri, Feb 23, 2024 at 09:24:35PM -0800, Saravana Kannan wrote:
> > Introduced a stupid bug in commit 782bfd03c3ae ("of: property: Improve
> > finding the supplier of a remote-endpoint property") due to a last minute
> > incorrect edit of "index !=0" into "!index". This patch fixes it to be
> > "index > 0" to match the comment right next to it.
> >
> > Reported-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> > Link: https://lore.kernel.org/lkml/20240223171849.10f9901d@booty/
> > Fixes: 782bfd03c3ae ("of: property: Improve finding the supplier of a remote-endpoint property")
> > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > ---
> > Using Link: instead of Closes: because Luca reported two separate issues.
> >
> > Sorry about introducing a stupid bug in an -rcX Rob.
> >
> > -Saravana
>
> Hi there,
>
> Could this be reverted? It breaks my audio-graph-card2 setup:
>
> [   17.116290] platform 2034000.i2s: deferred probe pending: platform: wait for supplier /sound/multi
> [   17.125370] platform test_codec: deferred probe pending: platform: wait for supplier /sound/multi
> [   17.134257] platform sound: deferred probe pending: asoc-audio-graph-card2: parse error

Hmmm.... cycle detection should work here and not enforce probe
ordering. I'd appreciate help with debugging that. Let me look at it
on Monday. Can you enabled all the debug logs in drivers/base/core.c
and tell me what cycle detection is telling about these nodes?

But the better fix would be to use the new "post-init-providers"
property. See below.

>
> / {
>         ...
>
>
>         test_codec {
>                 compatible = "test-codec";
>                 prefix = "Test codec";
>                 #sound-dai-cells = <0>;

post-init-provider = <&multi>;

Right now there's a cyclic dependency between test_codec and multi and
this tells the kernel that test codec needs to probe first.

Similar additions to the other nodes blocked on multi.

Thanks,
Saravana

>                 port {
>                         test_ep: endpoint {
>                                 remote-endpoint = <&card_ep_2>;
>                         };
>                 };
>         };
>
>         sound {
>                 compatible = "audio-graph-card2";
>                 label = "CS5368";
>                 links = <&i2s2_port>;
>                 multi {
>                         #address-cells = <1>;
>                         #size-cells = <0>;
>                         convert-channels = <16>;
>                         port@0 {
>                                 reg = <0>;
>                                 card_ep_0: endpoint {
>                                         remote-endpoint = <&i2s2_ep>;
>                                 };
>                         };
>                         //port@1 {
>                         //      reg = <1>;
>                         //      card_ep_1: endpoint {
>                         //              remote-endpoint = <&cs5368_ep>;
>                         //      };
>                         //};
>                         port@1 {
>                                 reg = <1>;
>                                 card_ep_2: endpoint {
>                                         remote-endpoint = <&test_ep>;
>                                 };
>                         };
>                 };
>         };
> };
>
>
> &i2s2 {
>         pinctrl-0 = <&i2s2_pins>, <&i2s2_din_pins>;
>         pinctrl-names = "default";
>         status = "okay";
>         i2s2_port: port {
>                 i2s2_ep: endpoint {
>                         format = "dsp_a";
>                         bitclock-master;
>                         frame-master;
>                         remote-endpoint = <&card_ep_0>;
>                 };
>         };
> };
>
> John.

  reply	other threads:[~2024-03-23  1:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-24  5:24 [PATCH] of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing Saravana Kannan
2024-02-24  5:28 ` Saravana Kannan
2024-02-26 12:04   ` Luca Ceresoli
2024-02-29  0:20   ` Rob Herring
2024-02-26  8:19 ` Luca Ceresoli
2024-02-26  8:56 ` Herve Codina
2024-02-29 10:11 ` Geert Uytterhoeven
2024-02-29 22:45   ` Saravana Kannan
2024-02-29 22:47     ` Saravana Kannan
2024-03-14  1:48   ` Saravana Kannan
2024-03-14  8:46     ` Geert Uytterhoeven
2024-03-15  5:50       ` Saravana Kannan
2024-03-01 21:28 ` Rob Herring
2024-03-21  6:04 ` John Watts
2024-03-23  1:53   ` Saravana Kannan [this message]
2024-03-23 12:19     ` John Watts
2024-03-25 22:49       ` Saravana Kannan
2024-03-26  0:42         ` John Watts
2024-03-26  1:35           ` Saravana Kannan
2024-03-26  1:42             ` John Watts
2024-03-26  2:31             ` John Watts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGETcx8+vw0Vr0NWzjOAvxAZ07M4U7BWPAgO9avCngW0-9e_kA@mail.gmail.com \
    --to=saravanak@google.com \
    --cc=contact@jookia.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=herve.codina@bootlin.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.