summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-02-06 23:28:24 +0000
committerLionel Landwerlin <[email protected]>2018-02-08 10:52:14 +0000
commite8436677339d65449bdabefd3ed8bb5a65f13d46 (patch)
tree06805a71cdf3e72510dddb78054fb019b72e551c /src
parentbd6c0cab606fa0a3b821e50542ba06ff714292bf (diff)
i965: perf: cleanup detection of kernel support for loadable configs
The initial revision of the patch adding loadable configs was testing the feature's availability by adding a new config successfully and then removing it. A second version tested the availability just by exercising the removal. But some unused code remained. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_query.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index f4ff858bd5d..c0bb4442bec 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -1832,21 +1832,8 @@ kernel_has_dynamic_config_support(struct brw_context *brw,
/* Look for the test config, which we know we can't replace. */
if (read_file_uint64(config_path, &config_id) && config_id == 1) {
- uint32_t mux_regs[] = { 0x9888 /* NOA_WRITE */, 0x0 };
- struct drm_i915_perf_oa_config config;
-
- memset(&config, 0, sizeof(config));
-
- memcpy(config.uuid, query->guid, sizeof(config.uuid));
-
- config.n_mux_regs = 1;
- config.mux_regs_ptr = (uintptr_t) mux_regs;
-
- if (drmIoctl(screen->fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, &config_id) < 0 &&
- errno == ENOENT)
- return true;
-
- break;
+ return drmIoctl(screen->fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG,
+ &config_id) < 0 && errno == ENOENT;
}
}