Re: [Intel-gfx] [PATCH v4] drm/i915/pmu: Use GT parked for estimating RC6 while asleep

2019-09-12 Thread Chris Wilson
Quoting Chris Wilson (2019-09-12 11:13:39) > +#if IS_ENABLED(CONFIG_PM) > + > +static inline s64 ktime_since(const ktime_t kt) > +{ > + return ktime_to_ns(ktime_sub(ktime_get(), kt)); > +} > + > +void i915_pmu_gt_parked(struct drm_i915_private *i915) > +{ > + struct i915_pmu *pmu =

[Intel-gfx] [PATCH v4] drm/i915/pmu: Use GT parked for estimating RC6 while asleep

2019-09-12 Thread Chris Wilson
As we track when we put the GT device to sleep upon idling, we can use that callback to sample the current rc6 counters and record the timestamp for estimating samples after that point while asleep. v2: Stick to using ktime_t v3: Track user_wakerefs that interfere with the new