From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
intel-gfx@lists.freedesktop.org, Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] RFC drm/i915: Emulate 64bit registers for residency counters
Date: Thu, 7 Apr 2016 16:18:16 +0300 [thread overview]
Message-ID: <20160407131816.GK4329@intel.com> (raw)
In-Reply-To: <20160407125944.GC18061@nuc-i3427.alporthouse.com>
On Thu, Apr 07, 2016 at 01:59:44PM +0100, Chris Wilson wrote:
> On Thu, Apr 07, 2016 at 03:49:01PM +0300, Ville Syrjälä wrote:
> > On Thu, Apr 07, 2016 at 01:37:35PM +0100, Chris Wilson wrote:
> > > On Thu, Apr 07, 2016 at 03:13:51PM +0300, Ville Syrjälä wrote:
> > > > On Thu, Apr 07, 2016 at 12:24:13PM +0100, Chris Wilson wrote:
> > > > > +static unsigned long calc_overflow_jiffies(struct drm_device *dev)
> > > > > {
> > > > > - struct drm_i915_private *dev_priv = dev->dev_private;
> > > > > + struct drm_i915_private *dev_priv = to_i915(dev);
> > > > > + u32 overflow_ms;
> > > > > +
> > > > > + /* How many ticks per millisecond? */
> > > > > + if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
> > > > > + overflow_ms = ~0u / dev_priv->czclk_freq;
> > > >
> > > > Needs to account for the high range bit.
> > >
> > > This was the bit I was uncertain about. Does the high range bit imply
> > > that is a 24-bit register? Or that the freq is measured differently?
> >
> > The hardware apparently has a 40bit counter internally. In low range
> > mode the register exposes bits [31:0] of the counter, in high range
> > you get to see bits [39:8].
>
> In that case the frequency would be reduced by >>8.
>
> Can we set that bit ourselves? That puts the overflow into the 1 hour
> mark. Thanks,
I don't know if it's safe to frob the bit. I worry that something
outside our control might depend on it staying put.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-07 13:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 11:24 [PATCH] RFC drm/i915: Emulate 64bit registers for residency counters Chris Wilson
2016-04-07 12:13 ` Ville Syrjälä
2016-04-07 12:37 ` Chris Wilson
2016-04-07 12:49 ` Ville Syrjälä
2016-04-07 12:59 ` Chris Wilson
2016-04-07 13:18 ` Ville Syrjälä [this message]
2016-04-07 13:58 ` Chris Wilson
2016-04-07 14:17 ` Ville Syrjälä
2016-04-07 15:29 ` ✗ Fi.CI.BAT: failure for " Patchwork
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=20160407131816.GK4329@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lenb@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