[Intel-gfx] [PATCH 5/6] drm/i915: Use ktime to calculate rc0 residency

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 15 15:57:38 UTC 2017


On Wed, Mar 15, 2017 at 05:43:03PM +0200, Mika Kuoppala wrote:
> We have used cz timestamp register to gain a reference time wrt
> to residency calculations. The residency counts are in cz clk ticks
> (333Mhz clock) but for some reason the cz timestamp register gives
> 100us units. Perhaps for some other usage, the base-ten based values
> are easier, but in residency calculations raw units would have been
> the easiest.
> 
> As there is not much advantage of using base-ten clock through
> a more costly punit access, take our reference times directly from
> kernel clock.
> 
> v2: use ktime (Chris, Ville)
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list