intel/common: consistently use ifndef guards over pragma once
[mesa.git] / src / intel / common / gen_device_info.h
index f0e8750d0eab24cdf1f37ba2b46ceecdeff1f6d4..80676d0e003b892fad08eb21331664c442de5fb7 100644 (file)
@@ -147,6 +147,30 @@ struct gen_device_info
        */
       unsigned max_entries[4];
    } urb;
+
+   /**
+    * For the longest time the timestamp frequency for Gen's timestamp counter
+    * could be assumed to be 12.5MHz, where the least significant bit neatly
+    * corresponded to 80 nanoseconds.
+    *
+    * Since Gen9 the numbers aren't so round, with a a frequency of 12MHz for
+    * SKL (or scale factor of 83.33333333) and a frequency of 19200123Hz for
+    * BXT.
+    *
+    * For simplicty to fit with the current code scaling by a single constant
+    * to map from raw timestamps to nanoseconds we now do the conversion in
+    * floating point instead of integer arithmetic.
+    *
+    * In general it's probably worth noting that the documented constants we
+    * have for the per-platform timestamp frequencies aren't perfect and
+    * shouldn't be trusted for scaling and comparing timestamps with a large
+    * delta.
+    *
+    * E.g. with crude testing on my system using the 'correct' scale factor I'm
+    * seeing a drift of ~2 milliseconds per second.
+    */
+   double timebase_scale;
+
    /** @} */
 };