summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-06-08 17:51:33 +0100
committerLionel Landwerlin <[email protected]>2019-04-17 14:10:42 +0100
commit2be07fc7517c624b0048e512f50280696e3f069c (patch)
treecb1575d492e6e8d4d7498d1b51e567b573d56ab1 /src/intel
parent41b54b5faf27632d1a70145880b474fbaeabbb2d (diff)
i965: move brw_timebase_scale to device info
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Mark Janes <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/dev/gen_device_info.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/dev/gen_device_info.h b/src/intel/dev/gen_device_info.h
index a5ab14b3663..af13615be2b 100644
--- a/src/intel/dev/gen_device_info.h
+++ b/src/intel/dev/gen_device_info.h
@@ -275,6 +275,13 @@ void gen_device_info_update_from_masks(struct gen_device_info *devinfo,
void gen_device_info_update_from_topology(struct gen_device_info *devinfo,
const struct drm_i915_query_topology_info *topology);
+static inline uint64_t
+gen_device_info_timebase_scale(const struct gen_device_info *devinfo,
+ uint64_t gpu_timestamp)
+{
+ return (1000000000ull * gpu_timestamp) / devinfo->timestamp_frequency;
+}
+
#ifdef __cplusplus
}
#endif