diff options
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 258668fa0b0..97124154b69 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -371,6 +371,19 @@ anv_physical_device_init(struct anv_physical_device *device, bool swizzled = anv_gem_get_bit6_swizzle(fd, I915_TILING_X); + /* Starting with Gen10, the timestamp frequency of the command streamer may + * vary from one part to another. We can query the value from the kernel. + */ + if (device->info.gen >= 10) { + int timestamp_frequency = + anv_gem_get_param(fd, I915_PARAM_CS_TIMESTAMP_FREQUENCY); + + if (timestamp_frequency < 0) + intel_logw("Kernel 4.16-rc1+ required to properly query CS timestamp frequency"); + else + device->info.timestamp_frequency = timestamp_frequency; + } + /* GENs prior to 8 do not support EU/Subslice info */ if (device->info.gen >= 8) { device->subslice_total = anv_gem_get_param(fd, I915_PARAM_SUBSLICE_TOTAL); |