From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Saravana Kannan <saravanak@google.com>
Cc: Rob Herring <robh@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Bjorn Andersson <andersson@kernel.org>,
Abel Vesa <abel.vesa@linaro.org>
Subject: Re: [RESEND PATCH] of: property: do not create clocks device link for clock controllers
Date: Sat, 28 Jan 2023 08:34:10 +0300 [thread overview]
Message-ID: <68B27FAF-5D14-476C-A22D-4615487EDEA6@linaro.org> (raw)
In-Reply-To: <CAGETcx-=2O_ZMLGSZrF7Q9Of3pbnieWFRJvzjTe0EVfGpgFSPQ@mail.gmail.com>
28 января 2023 г. 07:54:14 GMT+03:00, Saravana Kannan <saravanak@google.com> пишет:
>On Fri, Jan 27, 2023 at 8:41 PM Dmitry Baryshkov
><dmitry.baryshkov@linaro.org> wrote:
>>
>> On Fri, 27 Jan 2023 at 01:12, Saravana Kannan <saravanak@google.com> wrote:
>> >
>> > On Thu, Jan 26, 2023 at 2:51 PM Dmitry Baryshkov
>> > <dmitry.baryshkov@linaro.org> wrote:
>> > >
>> > > On 25/01/2023 21:09, Rob Herring wrote:
>> > > > On Tue, Jan 24, 2023 at 06:12:15PM -0800, Saravana Kannan wrote:
>> > > >> On Wed, Jan 18, 2023 at 5:35 AM Rob Herring <robh+dt@kernel.org> wrote:
>> > > >>>
>> > > >>> On Wed, Jan 18, 2023 at 3:11 AM Dmitry Baryshkov
>> > > >>> <dmitry.baryshkov@linaro.org> wrote:
>> > > >>>>
>> > > >>>> Do not create device link for clock controllers. Some of the clocks
>> > > >>>> provided to the device via OF can be the clocks that are just parents to
>> > > >>>> the clocks provided by this clock controller. Clock subsystem already
>> > > >>>> has support for handling missing clock parents correctly (clock
>> > > >>>> orphans). Later when the parent clock is registered, clocks get
>> > > >>>> populated properly.
>> > > >>>>
>> > > >>>> An example of the system where this matters is the SDM8450 MTP board
>> > > >>>> (see arch/arm64/boot/dts/qcom/sdm845-mtp.dts). Here the dispcc uses
>> > > >>>> clocks provided by dsi0_phy and dsi1_phy device tree nodes. However the
>> > > >>>> dispcc itself provides clocks to both PHYs, to the PHY parent device,
>> > > >>>> etc. With just dsi0_phy in place devlink is able to break the
>> > > >>>> dependency, but with two PHYs, dispcc doesn't get probed at all, thus
>> > > >>>> breaking display support.
>> > > >>>>
>> > > >>>> Cc: Bjorn Andersson <andersson@kernel.org>
>> > > >>>> Cc: Stephen Boyd <sboyd@kernel.org>
>> > > >>>> Cc: Saravana Kannan <saravanak@google.com>
>> > > >>>> Cc: Abel Vesa <abel.vesa@linaro.org>
>> > > >>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> > > >>>> ---
>> > > >>>>
>> > > >>>> This patch has been posted a year ago in January 2022 ([1]). Since that time
>> > > >>>> Saravana failed to produce patches to assist in debugging the issue
>> > > >>>> ([2]) or to fix the issue ([3]). The issue we observe has been described
>> > > >>>> by Abel at ([4]). As we work on adding support for Dual DSI
>> > > >>>> configurations, the issue becomes more and more important, since binding
>> > > >>>> the whole display subsystem fails.
>> > > >>
>> > > >> I did send out a patch series[1] to try and fix this. Heck I even
>> > > >> talked about this in LPC 2022. So I don't think it's accurate to say I
>> > > >> didn't help debug this or fix this. There's some email thread in lore
>> > > >> where Abel gave more details and I figured out the issue and we didn't
>> > > >> need any more debugging. And then I sent out [1]. Sorry I missed you
>> > > >> in the cc lise for [1] -- I try to keep track of everyone to cc but
>> > > >> things slip through the cracks sometimes. But at the same time, it's
>> > > >> easy to check for emails from me before saying I didn't help or didn't
>> > > >> send out fixes :)
>> > > >>
>> > > >> If you do try to give [1] a shot, there are a bunch of bugs that
>> > > >> people pointed out for which I gave fixes on top of [1] in the
>> > > >> replies. I was supposed to work on v2 over the holidays, but that
>> > > >> didn't happen because of stuff outside my control.
>> > > >>
>> > > >>> That's ample time to fix this, so I intend to apply this. But I'll
>> > > >>> give it a few days for comments.
>> > > >>
>> > > >> Rob, I'd recommend not applying this because it'll fix it for Dmitry
>> > > >> but break someone else's use case. That's the whole reason it takes me
>> > > >> a while to send out patches -- it's easy to fix it for a subset of
>> > > >> devices, but fixing something without breaking someone else is harder
>> > > >> (I still believe it's doable) and it takes a while to test them on all
>> > > >> the devices I want to test before sending them out.
>> > >
>> > > This case is really simple, I think. Clock controllers (and
>> > > clock-core-framework) are prepared to handle clock orphans properly.
>> > > Moreover they have been supposed to work in such way for quite a while.
>> > > In other words, I don't think we should save them from this
>> > > -EPROBE_DEFERRED.
>> >
>> > A clock controller can depend on other clock controllers for non clock
>> > tree reasons. For example, it might need a clock ON to access its
>> > registers. So, while the CCF can handle orphans properly, that's not
>> > the only dependency. Also, fw_devlink is not just about probing
>> > either. It also has to do with proper sync_state() callbacks.
>>
>> Just a question, please excuse if I'm misunderstanding it. Does
>> fw_devlink created this way also impose any runtime PM dependencies?
>
>If you set fw_devlink=rpm in the command line. The default is just "on".
So you plan to switch to rpm at some point?
next prev parent reply other threads:[~2023-01-28 5:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 9:11 [RESEND PATCH] of: property: do not create clocks device link for clock controllers Dmitry Baryshkov
2023-01-18 13:35 ` Rob Herring
2023-01-25 2:12 ` Saravana Kannan
2023-01-25 19:09 ` Rob Herring
2023-01-26 22:51 ` Dmitry Baryshkov
2023-01-26 23:12 ` Saravana Kannan
2023-01-27 0:13 ` Saravana Kannan
2023-01-28 4:41 ` Dmitry Baryshkov
2023-01-28 4:54 ` Saravana Kannan
2023-01-28 5:34 ` Dmitry Baryshkov [this message]
2023-01-28 5:55 ` Saravana Kannan
2023-02-02 3:27 ` Saravana Kannan
2023-01-20 21:59 ` Konrad Dybcio
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=68B27FAF-5D14-476C-A22D-4615487EDEA6@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=sboyd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).