Re: [PATCH v3] drm/i915/pmu: Clear the previous sample value when parking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux