public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: David Airlie <airlied@linux.ie>,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/panfrost: Fix regulator_get_optional() misuse
Date: Fri, 6 Sep 2019 15:45:11 +0100	[thread overview]
Message-ID: <1bfa2b93-301f-22ff-7208-b337b8f3820d@arm.com> (raw)
In-Reply-To: <20190906105523.GR23391@sirena.co.uk>

On 06/09/2019 11:55, Mark Brown wrote:
[...]
>>> However you're probably better off hiding all this stuff with the
>>> generic OPP code rather than open coding it - this already has much
>>> better handling for this, it supports voltage ranges rather than single
>>> voltages and optional regulators already.  I'm not 100% clear why this
>>> is open coded TBH but I might be missing something, if there's some
>>> restriction preventing the generic code being used it seems like those
>>> sohuld be fixed.
> 
>> To be honest I've no idea how to use the generic OPP code to do this. I
>> suspect the original open coding was cargo-culted from another driver:
>> the comments in the function look like they were lifted from
>> drivers/devfreq/rk3399_dmc.c. Any help tidying this up would be appreciated.
> 
> Yes, there's a lot of cargo culting of bad regulator API usage in
> the DRM subsystem for some reason, I keep having to do these
> periodic sweeps and there's always stuff in there.  I think a lot
> of it comes from BSP code that just gets dropped in without
> review and then cut'n'pasted but I've not figured out why DRM is
> so badly affected.

I've been working on tidying up the devfreq usage in Panfrost. From what
I can see your patch is correct and I just needed to work out how to fix
my DT.

Steve

  reply	other threads:[~2019-09-06 14:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 12:30 [PATCH] drm/panfrost: Fix regulator_get_optional() misuse Mark Brown
2019-09-05  8:21 ` Rob Herring
2019-09-05  9:37   ` Steven Price
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 [this message]
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=1bfa2b93-301f-22ff-7208-b337b8f3820d@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=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