[Intel-gfx] [PATCH v2 1/4] drm/i915/perf: reuse timestamp frequency from device info
Chris Wilson
chris at chris-wilson.co.uk
Mon Nov 13 21:12:32 UTC 2017
Quoting Ville Syrjälä (2017-11-13 20:53:39)
> On Mon, Nov 13, 2017 at 07:03:30PM +0000, Matthew Auld wrote:
> > On 13 November 2017 at 18:18, Lionel Landwerlin
> > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> > > index 00be015e01df..292ad3e2c307 100644
> > > --- a/drivers/gpu/drm/i915/i915_perf.c
> > > +++ b/drivers/gpu/drm/i915/i915_perf.c
> > > @@ -2692,7 +2692,7 @@ i915_perf_open_ioctl_locked(struct drm_i915_private *dev_priv,
> > > static u64 oa_exponent_to_ns(struct drm_i915_private *dev_priv, int exponent)
> > > {
> > > return div_u64(1000000000ULL * (2ULL << exponent),
> > > - dev_priv->perf.oa.timestamp_frequency);
> > > + INTEL_INFO(dev_priv)->cs_timestamp_frequency);
> > s/div_u64/div64_u64/
>
> I wonder if these u64/u64 divisisions are actually necessary.
> Is u32 not good enough for the timestamp frequency? I see a lot
> of trailing zeroes on the values below...
Especially when the new ABI introduced to expose the frequency is a
s32... I suspect we may want to change that to KHz to have sufficient
headroom for wacky GPUs?
-Chris
More information about the Intel-gfx
mailing list