{
const struct gen_device_info *devinfo = &brw->screen->devinfo;
uint64_t min_freq_mhz = 0, max_freq_mhz = 0;
- __DRIscreen *screen = brw->screen->driScrnPriv;
if (!read_sysfs_drm_device_file_uint64(brw, "gt_min_freq_mhz", &min_freq_mhz))
return false;
brw->perfquery.sys_vars.gt_min_freq = min_freq_mhz * 1000000;
brw->perfquery.sys_vars.gt_max_freq = max_freq_mhz * 1000000;
brw->perfquery.sys_vars.timestamp_frequency = devinfo->timestamp_frequency;
- brw->perfquery.sys_vars.revision = intel_device_get_revision(screen->fd);
+ brw->perfquery.sys_vars.revision = devinfo->revision;
compute_topology_builtins(brw);
return true;
* Return the revision (generally the revid field of the PCI header) of the
* graphics device.
*/
-int
+static int
intel_device_get_revision(int fd)
{
struct drm_i915_getparam gp;
if (!gen_get_device_info(screen->deviceID, &screen->devinfo))
return NULL;
+ screen->devinfo.revision = intel_device_get_revision(dri_screen->fd);
+
if (!intel_init_bufmgr(screen))
return NULL;