[Intel-gfx] [PATCH 7/7] drm/i915/perf: reuse timestamp frequency from device info

Chris Wilson chris at chris-wilson.co.uk
Mon Nov 13 15:28:31 UTC 2017


Quoting Lionel Landwerlin (2017-11-13 15:19:28)
> On 10/11/17 21:00, Chris Wilson wrote:
> > Quoting Lionel Landwerlin (2017-11-10 19:08:45)
> >> @@ -3528,7 +3502,7 @@ void i915_perf_init(struct drm_i915_private *dev_priv)
> >>                  spin_lock_init(&dev_priv->perf.oa.oa_buffer.ptr_lock);
> >>   
> >>                  oa_sample_rate_hard_limit =
> >> -                       dev_priv->perf.oa.timestamp_frequency / 2;
> >> +                       INTEL_INFO(dev_priv)->cs_timestamp_frequency / 2;
> > 32-bit builds may complain, as this is ostensibly now a 64b division.
> > Right?
> > -Chris
> >
> Well, we already store cs_timestamp_frequency in the getparam value.
> The assumption is that we'll stay well below the INT_MAX.
> So that should be fine.

Do you want to risk kbuild complaining? :)

> The following didn't raise a warning on the division with 
> gcc7.2.0/clang3.8.1 -m32 -Wall -Wextra :

You have to also use -standalone to avoid the libgcc fixups, iirc.
-Chris


More information about the Intel-gfx mailing list