All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Mikko Perttunen <mperttunen@nvidia.com>
Subject: Re: [PATCH 1/3] drm/tegra: vic: Implement explicit reset support
Date: Thu, 29 Nov 2018 15:51:21 +0100	[thread overview]
Message-ID: <20181129145121.GA23750@ulmo> (raw)
In-Reply-To: <67b69475-7bfe-afaf-8e45-2a3aef01c05e@nvidia.com>


[-- Attachment #1.1: Type: text/plain, Size: 1956 bytes --]

On Thu, Nov 29, 2018 at 01:40:32PM +0000, Jon Hunter wrote:
> 
> On 23/11/2018 12:06, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > Tegra supports generic PM domains on 64-bit ARM, and if that is enabled,
> > the power domain code will make sure that resets are asserted and
> > deasserted at appropriate points in time.
> > 
> > If generic PM domains are not implemented, such as on 32-bit Tegra, the
> > resets need to be asserted and deasserted explicitly by the driver.
> > 
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> >  drivers/gpu/drm/tegra/vic.c | 35 ++++++++++++++++++++++++++++++++++-
> >  1 file changed, 34 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c
> > index 9fa77405db01..23f530db45ad 100644
> > --- a/drivers/gpu/drm/tegra/vic.c
> > +++ b/drivers/gpu/drm/tegra/vic.c
> > @@ -38,6 +38,7 @@ struct vic {
> >  	struct iommu_domain *domain;
> >  	struct device *dev;
> >  	struct clk *clk;
> > +	struct reset_control *rst;
> >  
> >  	/* Platform configuration */
> >  	const struct vic_config *config;
> > @@ -56,13 +57,37 @@ static void vic_writel(struct vic *vic, u32 value, unsigned int offset)
> >  static int vic_runtime_resume(struct device *dev)
> >  {
> >  	struct vic *vic = dev_get_drvdata(dev);
> > +	int err;
> > +
> > +	err = clk_prepare_enable(vic->clk);
> > +	if (err < 0)
> > +		return err;
> > +
> > +	usleep_range(2000, 4000);
> 
> The Tegra genpd code has a usleep_range(10, 20), is that not sufficient
> here? If it is, it would be good to be consistent.

Yeah, I think that's enough. The Tegra DRM driver uses these ranges in
many places, so that's where I copied them from. None of these are part
of a hot path or anything, so whether this sleeps for 10 ns or 4 ms is
not going to matter much.

With that changed, can I consider this R-b you?

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-11-29 14:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-23 12:06 [PATCH 1/3] drm/tegra: vic: Implement explicit reset support Thierry Reding
2018-11-23 12:06 ` [PATCH 2/3] drm/tegra: falcon: Fix error handling Thierry Reding
2018-11-23 12:06 ` [PATCH 3/3] drm/tegra: falcon: Wait for memory scrubbing to complete Thierry Reding
2018-11-29 13:40 ` [PATCH 1/3] drm/tegra: vic: Implement explicit reset support Jon Hunter
2018-11-29 14:51   ` Thierry Reding [this message]
2018-11-29 15:11     ` Jon Hunter

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=20181129145121.GA23750@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.