Quoting Tvrtko Ursulin (2017-11-23 09:27:40)
> From: Tvrtko Ursulin <[email protected]>
> 
> 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 <[email protected]>
> Suggested-by: Chris Wilson <[email protected]>

That makes sense (wrt to the sampling),
Reviewed-by: Chris Wilson <[email protected]>

(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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to