Quoting Tvrtko Ursulin (2017-11-23 09:27:40) > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > > When turning off the engines, and the pmu sampling, clear the previous > value as the current measurement should be 0. > > v2: Use a for-loop > v3: > * Move clearing to timer self-dis-arm to avoid race with parking. > * Clear frequency samples as well. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > Suggested-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> That makes sense (wrt to the sampling), Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> (However, for freq.sample we should be using idle-freq not 0, and init sample.prev to idle-freq?) Hmm, actual-freq depends on gt.awake, but we are not including that in pmu_needs_timer. @@ -119,7 +119,8 @@ static bool pmu_needs_timer(struct drm_i915_private *i915, bool gpu_active) * running so clear those bits out. */ if (!gpu_active) - enable &= ~ENGINE_SAMPLE_MASK; + enable &= ~(config_enabled_mask(I915_PMU_ACTUAL_FREQUENCY) | + ENGINE_SAMPLE_MASK); I think. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx