From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
Saravana Kannan <saravanak@google.com>,
Aradhya Bhatia <aradhya.bhatia@linux.dev>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Devarsh Thakkar <devarsht@ti.com>
Subject: Re: fw_devlinks preventing a panel driver from probing
Date: Thu, 26 Sep 2024 14:52:35 +0300 [thread overview]
Message-ID: <5a540bdb-e3ca-494a-b68d-8f81f4d1cc1a@ideasonboard.com> (raw)
In-Reply-To: <34mewzvfyjsvyud3lzy6swxs7sr64xkgrbkxtvyw3czvoerct7@7guo32ehwa52>
Hi,
On 21/09/2024 23:15, Dmitry Baryshkov wrote:
> On Mon, Sep 16, 2024 at 02:51:57PM GMT, Tomi Valkeinen wrote:
>> Hi,
>>
>> We have an issue where two devices have dependencies to each other,
>> according to drivers/base/core.c's fw_devlinks, and this prevents them from
>> probing. I've been adding debugging to the core.c, but so far I don't quite
>> grasp the issue, so I thought to ask. Maybe someone can instantly say that
>> this just won't work...
>
> Well, just 2c from my side. I consider that fw_devlink adds devlinks for
> of-graph nodes to be a bug. It doesn't know about the actual direction
> of dependencies between corresponding devices or about the actual
> relationship between drivers. It results in a loop which is then broken
> in some way. Sometimes this works. Sometimes it doesn't. Sometimes this
> hides actual dependencies between devices. I tried reverting offending
> parts of devlink, but this attempt failed.
I was also wondering about this. The of-graphs are always two-way links,
so the system must always mark them as a cycle. But perhaps there are
other benefits in the devlinks than dependency handling?
>> If I understand the fw_devlink code correctly, in a normal case the links
>> formed with media graphs are marked as a cycle (FWLINK_FLAG_CYCLE), and then
>> ignored as far as probing goes.
>>
>> What we see here is that when using a single-link OLDI panel, the panel
>> driver's probe never gets called, as it depends on the OLDI, and the link
>> between the panel and the OLDI is not a cycle.
>
> I think in your case you should be able to fix the issue by using the
> FWNODE_FLAG_NOT_DEVICE, which is intented to be used in such cases. You
How would I go using FWNODE_FLAG_NOT_DEVICE? Won't this only make a
difference if the flag is there at early stage when the linux devices
are being created? I think it's too late if I set the flag when the dss
driver is being probed.
> have a dependency on DT node which doesn't have backing device.
Well, there is a backing device, the DSS. But if you mean that the
system at the moment cannot figure out that there is a backing device,
then true.
Tomi
next prev parent reply other threads:[~2024-09-26 11:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 11:51 Tomi Valkeinen
2024-09-21 20:15 ` Dmitry Baryshkov
2024-09-26 11:52 ` Tomi Valkeinen [this message]
2024-09-26 23:26 ` Dmitry Baryshkov
2024-09-27 6:41 ` Tomi Valkeinen
2024-09-27 8:35 ` Dmitry Baryshkov
2024-10-04 11:52 ` Tomi Valkeinen
2024-10-19 15:13 ` Dmitry Baryshkov
2024-10-21 23:29 ` Saravana Kannan
2024-10-22 7:51 ` Tomi Valkeinen
2024-10-22 16:07 ` Saravana Kannan
2024-10-23 8:52 ` Tomi Valkeinen
2024-10-24 22:55 ` Saravana Kannan
2024-10-25 22:40 ` Saravana Kannan
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=5a540bdb-e3ca-494a-b68d-8f81f4d1cc1a@ideasonboard.com \
--to=tomi.valkeinen@ideasonboard.com \
--cc=aradhya.bhatia@linux.dev \
--cc=devarsht@ti.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=saravanak@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®