From: Steven Price <steven.price@arm.com>
To: Rob Herring <robh@kernel.org>, Mark Brown <broonie@kernel.org>
Cc: David Airlie <airlied@linux.ie>,
dri-devel <dri-devel@lists.freedesktop.org>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/panfrost: Fix regulator_get_optional() misuse
Date: Thu, 5 Sep 2019 10:37:53 +0100 [thread overview]
Message-ID: <feaf7338-9aa1-5065-7a83-028aeadd5578@arm.com> (raw)
In-Reply-To: <CAL_JsqK8hn8aHa0e-QhT5=dMqCd0_HzNWMHM1YbEC_2z8n-tXg@mail.gmail.com>
On 05/09/2019 09:21, Rob Herring wrote:
> +Steven
>
> On Wed, Sep 4, 2019 at 1:30 PM Mark Brown <broonie@kernel.org> wrote:
>>
>> The panfrost driver requests a supply using regulator_get_optional()
>> but both the name of the supply and the usage pattern suggest that it is
>> being used for the main power for the device and is not at all optional
>> for the device for function, there is no meaningful handling for absent
>> supplies. Such regulators should use the vanilla regulator_get()
>> interface, it will ensure that even if a supply is not described in the
>> system integration one will be provided in software.
>
> I guess commits e21dd290881b ("drm/panfrost: Enable devfreq to work
> without regulator") and c90f30812a79 ("drm/panfrost: Add missing check
> for pfdev->regulator")
> in -next should be reverted or partially reverted?
Ah, I didn't realise that regulator_get() will return a dummy regulator
if none is provided in the DT. In theory that seems like a nicer
solution to my two commits. However there's still a problem - the dummy
regulator returned from regulator_get() reports errors when
regulator_set_voltage() is called. So I get errors like this:
[ 299.861165] panfrost e82c0000.mali: Cannot set voltage 1100000 uV
[ 299.867294] devfreq devfreq0: dvfs failed with (-22) error
(And therefore the frequency isn't being changed)
Ideally we want a dummy regulator that will silently ignore any
regulator_set_voltage() calls.
Steve
next prev parent reply other threads:[~2019-09-05 9:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 12:30 Mark Brown
2019-09-05 8:21 ` Rob Herring
2019-09-05 9:37 ` Steven Price [this message]
2019-09-05 12:40 ` Mark Brown
2019-09-05 13:02 ` Steven Price
2019-09-05 13:49 ` Neil Armstrong
2019-09-05 16:34 ` Mark Brown
2019-09-06 10:00 ` Steven Price
2019-09-06 10:55 ` Mark Brown
2019-09-06 14:45 ` Steven Price
2019-09-06 15:23 ` Steven Price
2019-09-09 15:41 ` Rob Herring
2019-09-09 16:22 ` Steven Price
2019-09-19 16:55 ` Rob Herring
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=feaf7338-9aa1-5065-7a83-028aeadd5578@arm.com \
--to=steven.price@arm.com \
--cc=airlied@linux.ie \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tomeu.vizoso@collabora.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®