drm/i915/perf: per-gen timebase for checking sample freq
authorRobert Bragg <robert@sixbynine.org>
Tue, 13 Jun 2017 11:23:05 +0000 (12:23 +0100)
committerBen Widawsky <ben@bwidawsk.net>
Wed, 14 Jun 2017 19:31:57 +0000 (12:31 -0700)
commit155e941f49289fe73157f1c9b3c93450a2e40175
tree62b808555d34ecefb8444bfe73764f4e88a65a96
parentfc59921178fd63f1dbe445c2fc86e6ca997a4744
drm/i915/perf: per-gen timebase for checking sample freq

An oa_exponent_to_ns() utility and per-gen timebase constants where
recently removed when updating the tail pointer race condition WA, and
this restores those so we can update the _PROP_OA_EXPONENT validation
done in read_properties_unlocked() to not assume we have a 12.5MHz
timebase as we did for Haswell.

Accordingly the oa_sample_rate_hard_limit value that's referenced by
proc_dointvec_minmax defining the absolute limit for the OA sampling
frequency is now initialized to (timestamp_frequency / 2) instead of the
6.25MHz constant for Haswell.

v2:
    Specify frequency of 19.2MHz for BXT (Ville)
    Initialize oa_sample_rate_hard_limit per-gen too (Lionel)

Signed-off-by: Robert Bragg <robert@sixbynine.org>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_perf.c