drm/i915/perf: reuse timestamp frequency from device info
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 27 Oct 2017 14:59:31 +0000 (15:59 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 20 Nov 2017 16:09:04 +0000 (16:09 +0000)
commit9f9b2792b6d38fbc8028f31b41ebd38a3f28a401
tree9d099910414fc701fec590fbd436ef74af7093cf
parent3fef5cda970124a15c553c1672d800e40fc08a9e
drm/i915/perf: reuse timestamp frequency from device info

Now that we have this stored in the device info, we can drop it from perf
part of the driver.

Note that this requires to init perf after we've computed the frequency,
hence why we move i915_perf_init() from i915_driver_init_early() to after
intel_device_info_runtime_init().

v2: Use div_u64 (Chris)

v3: Drop u64 divs by switching to kHz (Chris/Ville)
    Move i915_perf_fini to i915_driver_cleanup_hw (Matthew)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171113181902.12411-2-lionel.g.landwerlin@intel.com
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_perf.c