diff options
author | Ben Widawsky <[email protected]> | 2017-07-05 17:04:16 -0700 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2017-07-11 16:14:57 +0100 |
commit | 25c1a7cc7aea7e9c95ef70116fafc9a14d837939 (patch) | |
tree | c06e72c7e7493c6454c337e53ef05cd31c8203cb | |
parent | 618be8cc1ad1760103930b69ffbf528d7b861ab3 (diff) |
i965: Use already existing eu_total
Reduces IOCTL calls by 1, and provides a centralized place to override
such configurations if we have a need to do so.
Signed-off-by: Ben Widawsky <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_performance_query.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c index e4e1854bf2e..57feae7245f 100644 --- a/src/mesa/drivers/dri/i965/brw_performance_query.c +++ b/src/mesa/drivers/dri/i965/brw_performance_query.c @@ -1852,7 +1852,6 @@ init_oa_sys_vars(struct brw_context *brw, const char *sysfs_dev_dir) __DRIscreen *screen = brw->screen->driScrnPriv; drm_i915_getparam_t gp; int ret; - int n_eus = 0; int slice_mask = 0; int ss_mask = 0; int s_max = devinfo->num_slices; /* maximum number of slices */ @@ -1878,12 +1877,6 @@ init_oa_sys_vars(struct brw_context *brw, const char *sysfs_dev_dir) } else return false; - gp.param = I915_PARAM_EU_TOTAL; - gp.value = &n_eus; - ret = drmIoctl(screen->fd, DRM_IOCTL_I915_GETPARAM, &gp); - if (ret) - return false; - gp.param = I915_PARAM_SLICE_MASK; gp.value = &slice_mask; ret = drmIoctl(screen->fd, DRM_IOCTL_I915_GETPARAM, &gp); @@ -1896,7 +1889,7 @@ init_oa_sys_vars(struct brw_context *brw, const char *sysfs_dev_dir) if (ret) return false; - brw->perfquery.sys_vars.n_eus = n_eus; + brw->perfquery.sys_vars.n_eus = brw->screen->eu_total; brw->perfquery.sys_vars.n_eu_slices = __builtin_popcount(slice_mask); brw->perfquery.sys_vars.slice_mask = slice_mask; |