[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGETcx8hSGNxO9O_0tS+hSkAuTT6ctR_RhvqcJKzgcALL7ohxg@mail.gmail.com>
Date: Thu, 29 Feb 2024 14:47:35 -0800
From: Saravana Kannan <saravanak@...gle.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Rob Herring <robh+dt@...nel.org>, Frank Rowand <frowand.list@...il.com>,
Hervé Codina <herve.codina@...tlin.com>,
Luca Ceresoli <luca.ceresoli@...tlin.com>, kernel-team@...roid.com,
Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] of: property: fw_devlink: Fix stupid bug in
remote-endpoint parsing
On Thu, Feb 29, 2024 at 2:45 PM Saravana Kannan <saravanak@...gle.com> wrote:
>
> On Thu, Feb 29, 2024 at 2:11 AM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> >
> > Hi Saravana,
> >
> > On Sat, Feb 24, 2024 at 6:25 AM Saravana Kannan <saravanak@...gle.com> 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@...tlin.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@...gle.com>
> >
> > Thanks for your patch!
> >
> > > --- a/drivers/of/property.c
> > > +++ b/drivers/of/property.c
> > > @@ -1304,7 +1304,7 @@ static struct device_node *parse_remote_endpoint(struct device_node *np,
> > > int index)
> > > {
> > > /* Return NULL for index > 0 to signify end of remote-endpoints. */
> > > - if (!index || strcmp(prop_name, "remote-endpoint"))
> > > + if (index > 0 || strcmp(prop_name, "remote-endpoint"))
> > > return NULL;
> > >
> > > return of_graph_get_remote_port_parent(np);
> > > --
> > > 2.44.0.rc0.258.g7320e95886-goog
> >
> > After this, the "Fixed dependency cycle" messages I reported to be
> > gone in [1] are back.
> >
> > In fact, they are slightly different, and there are now even more of them:
> >
> > -platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f7000/ports/port@...ndpoint@0
> > -platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f6000/ports/port@...ndpoint@0
> > -platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f5000/ports/port@...ndpoint@0
> > -platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f4000/ports/port@...ndpoint@0
> > -platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f3000/ports/port@...ndpoint@0
> > -platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f2000/ports/port@...ndpoint@0
> > -platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f1000/ports/port@...ndpoint@0
> > -platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f0000/ports/port@...ndpoint@0
> > -platform feaa0000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f3000/ports/port@...ndpoint@2
> > -platform feaa0000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f2000/ports/port@...ndpoint@2
> > -platform feaa0000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f1000/ports/port@...ndpoint@2
> > -platform feaa0000.csi2: Fixed dependency cycle(s) with
> > /soc/video@...f0000/ports/port@...ndpoint@2
> > -platform fead0000.hdmi: Fixed dependency cycle(s) with
> > /soc/sound@...00000/ports/port@...ndpoint
> > -platform feae0000.hdmi: Fixed dependency cycle(s) with
> > /soc/sound@...00000/ports/port@...ndpoint
> > -platform feb00000.display: Fixed dependency cycle(s) with
> > /soc/hdmi@...e0000/ports/port@...ndpoint
> > -platform feb00000.display: Fixed dependency cycle(s) with
> > /soc/hdmi@...d0000/ports/port@...ndpoint
> > -platform hdmi0-out: Fixed dependency cycle(s) with
> > /soc/hdmi@...d0000/ports/port@...ndpoint
> > -platform hdmi1-out: Fixed dependency cycle(s) with
> > /soc/hdmi@...e0000/ports/port@...ndpoint
> > -platform vga-encoder: Fixed dependency cycle(s) with /vga/port/endpoint
> > -platform vga-encoder: Fixed dependency cycle(s) with
> > /soc/display@...00000/ports/port@...ndpoint
> > +platform e6ef0000.video: Fixed dependency cycle(s) with /soc/csi2@...a0000
> > +platform e6ef0000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef1000.video: Fixed dependency cycle(s) with /soc/csi2@...a0000
> > +platform e6ef1000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef2000.video: Fixed dependency cycle(s) with /soc/csi2@...a0000
> > +platform e6ef2000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef3000.video: Fixed dependency cycle(s) with /soc/csi2@...a0000
> > +platform e6ef3000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef4000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef5000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef6000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef7000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform ec500000.sound: Fixed dependency cycle(s) with /soc/hdmi@...e0000
> > +platform ec500000.sound: Fixed dependency cycle(s) with /soc/hdmi@...d0000
> > +platform ec500000.sound: Fixed dependency cycle(s) with
> > /soc/i2c@...10000/codec@10
> > +platform e6ef7000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef6000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef5000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef4000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef3000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef2000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef1000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform e6ef0000.video: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +platform fea80000.csi2: Fixed dependency cycle(s) with /soc/video@...f7000
> > +platform fea80000.csi2: Fixed dependency cycle(s) with /soc/video@...f6000
> > +platform fea80000.csi2: Fixed dependency cycle(s) with /soc/video@...f5000
> > +platform fea80000.csi2: Fixed dependency cycle(s) with /soc/video@...f4000
> > +platform fea80000.csi2: Fixed dependency cycle(s) with /soc/video@...f3000
> > +platform fea80000.csi2: Fixed dependency cycle(s) with /soc/video@...f2000
> > +platform fea80000.csi2: Fixed dependency cycle(s) with /soc/video@...f1000
> > +platform fea80000.csi2: Fixed dependency cycle(s) with /soc/video@...f0000
> > +platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/i2c@...d8000/video-receiver@70
> > +platform e6ef3000.video: Fixed dependency cycle(s) with /soc/csi2@...a0000
> > +platform e6ef2000.video: Fixed dependency cycle(s) with /soc/csi2@...a0000
> > +platform e6ef1000.video: Fixed dependency cycle(s) with /soc/csi2@...a0000
> > +platform e6ef0000.video: Fixed dependency cycle(s) with /soc/csi2@...a0000
> > +platform feaa0000.csi2: Fixed dependency cycle(s) with /soc/video@...f3000
> > +platform feaa0000.csi2: Fixed dependency cycle(s) with /soc/video@...f2000
> > +platform feaa0000.csi2: Fixed dependency cycle(s) with /soc/video@...f1000
> > +platform feaa0000.csi2: Fixed dependency cycle(s) with /soc/video@...f0000
> > +platform feaa0000.csi2: Fixed dependency cycle(s) with
> > /soc/i2c@...d8000/video-receiver@70
> > +platform ec500000.sound: Fixed dependency cycle(s) with /soc/hdmi@...d0000
> > +platform fead0000.hdmi: Fixed dependency cycle(s) with /soc/sound@...00000
> > +platform fead0000.hdmi: Fixed dependency cycle(s) with /soc/display@...00000
> > +platform ec500000.sound: Fixed dependency cycle(s) with /soc/hdmi@...e0000
> > +platform feae0000.hdmi: Fixed dependency cycle(s) with /soc/sound@...00000
> > +platform feae0000.hdmi: Fixed dependency cycle(s) with /soc/display@...00000
> > +platform feae0000.hdmi: Fixed dependency cycle(s) with /soc/display@...00000
> > +platform fead0000.hdmi: Fixed dependency cycle(s) with /soc/display@...00000
> > +platform feb00000.display: Fixed dependency cycle(s) with /soc/hdmi@...e0000
> > +platform feb00000.display: Fixed dependency cycle(s) with /soc/hdmi@...d0000
> > +platform cvbs-in: Fixed dependency cycle(s) with
> > /soc/i2c@...d8000/video-receiver@70
> > +platform hdmi-in: Fixed dependency cycle(s) with
> > /soc/i2c@...d8000/video-receiver@70
> > +platform fead0000.hdmi: Fixed dependency cycle(s) with /hdmi0-out
> > +platform hdmi0-out: Fixed dependency cycle(s) with /soc/hdmi@...d0000
> > +platform feae0000.hdmi: Fixed dependency cycle(s) with /hdmi1-out
> > +platform hdmi1-out: Fixed dependency cycle(s) with /soc/hdmi@...e0000
> > +platform vga: Fixed dependency cycle(s) with /vga-encoder
> > +platform feb00000.display: Fixed dependency cycle(s) with /vga-encoder
> > +platform vga-encoder: Fixed dependency cycle(s) with /vga
> > +platform vga-encoder: Fixed dependency cycle(s) with /soc/display@...00000
> >
> > -i2c 2-0010: Fixed dependency cycle(s) with
> > /soc/sound@...00000/ports/port@...ndpoint
> > +platform ec500000.sound: Fixed dependency cycle(s) with
> > /soc/i2c@...10000/codec@10
> >
> > -i2c 4-0070: Fixed dependency cycle(s) with
> > /soc/csi2@...80000/ports/port@...ndpoint
> > -i2c 4-0070: Fixed dependency cycle(s) with
> > /soc/csi2@...a0000/ports/port@...ndpoint
> > -i2c 4-0070: Fixed dependency cycle(s) with /hdmi-in/port/endpoint
> > -i2c 4-0070: Fixed dependency cycle(s) with /cvbs-in/port/endpoint
> > +platform feaa0000.csi2: Fixed dependency cycle(s) with
> > /soc/i2c@...d8000/video-receiver@70
> > +platform fea80000.csi2: Fixed dependency cycle(s) with
> > /soc/i2c@...d8000/video-receiver@70
> > +i2c 4-0070: Fixed dependency cycle(s) with /soc/csi2@...80000
> > +i2c 4-0070: Fixed dependency cycle(s) with /soc/csi2@...a0000
> >
> > I guess all of that is expected?
>
> I'm assuming all of these cycles are between devices that use
> remote-endpoint/port(s)? If so, yes, these are all expected. It's just
> logging things more accurately now.
>
> Once post-init-providers lands, you can use that property to break the
> cycles and also allow a better probe/suspend/resume ordering between
> these devices.
To be clear, this is just extra and more accurate logging in your case
and it's saying fw_devlink isn't enforcing ordering between these
devices. So, unless there's a bug in the drivers themselves, this
isn't breaking anything.
-Saravana
Powered by blists - more mailing lists