diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2017-03-15 17:43:03 +0200 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@intel.com> | 2017-03-16 12:28:28 +0200 |
commit | 679cb6c1320bc0d4b1572a4cf0988c3bba66becf (patch) | |
tree | 36afaf22b92a64102f0cd15f6145610308eedaea /drivers/gpu/drm/i915/i915_drv.h | |
parent | 1362877ed24462520d6de902e58da99def3cb60f (diff) | |
download | lwn-679cb6c1320bc0d4b1572a4cf0988c3bba66becf.tar.gz lwn-679cb6c1320bc0d4b1572a4cf0988c3bba66becf.zip |
drm/i915: Use ktime to calculate rc0 residency
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@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 0374e2e41681..6e14c7d089b8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1323,7 +1323,7 @@ struct vlv_s0ix_state { }; struct intel_rps_ei { - u32 cz_clock; + ktime_t ktime; u32 render_c0; u32 media_c0; }; |