]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit68c8e8fa9d9eeb433603451f38a14e801a682852
tree9d099910414fc701fec590fbd436ef74af7093cf
parentf0227f32a2986ba5bc9c9a984dcd19a8c035cdb2
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