diff options
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/dev/gen_device_info.h | 7 |
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 |