aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_query.c3
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c4
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.h3
3 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index e592b8d3c76..7676b2bdd6b 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -2017,7 +2017,6 @@ init_oa_sys_vars(struct brw_context *brw)
{
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;
@@ -2045,7 +2044,7 @@ init_oa_sys_vars(struct brw_context *brw)
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;
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 47a822f5d9b..d84793f71f8 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -2416,7 +2416,7 @@ set_max_gl_versions(struct intel_screen *screen)
* 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;
@@ -2521,6 +2521,8 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen)
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;
diff --git a/src/mesa/drivers/dri/i965/intel_screen.h b/src/mesa/drivers/dri/i965/intel_screen.h
index 2a21d4e19ee..d0ebab4bbd5 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.h
+++ b/src/mesa/drivers/dri/i965/intel_screen.h
@@ -139,9 +139,6 @@ double get_time(void);
const int*
intel_supported_msaa_modes(const struct intel_screen *screen);
-int
-intel_device_get_revision(int fd);
-
static inline bool
can_do_pipelined_register_writes(const struct intel_screen *screen)
{