From 2be07fc7517c624b0048e512f50280696e3f069c Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 8 Jun 2018 17:51:33 +0100 Subject: i965: move brw_timebase_scale to device info Signed-off-by: Lionel Landwerlin Reviewed-by: Mark Janes --- src/intel/dev/gen_device_info.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/intel') 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 -- cgit v1.2.3