summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_query.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index c10108f38f3..dfbf9759f5b 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -1848,23 +1848,10 @@ static bool
kernel_has_dynamic_config_support(struct brw_context *brw)
{
__DRIscreen *screen = brw->screen->driScrnPriv;
+ uint64_t invalid_config_id = UINT64_MAX;
- hash_table_foreach(brw->perfquery.oa_metrics_table, entry) {
- struct brw_perf_query_info *query = entry->data;
- char config_path[280];
- uint64_t config_id;
-
- snprintf(config_path, sizeof(config_path), "%s/metrics/%s/id",
- brw->perfquery.sysfs_dev_dir, query->guid);
-
- /* Look for the test config, which we know we can't replace. */
- if (read_file_uint64(config_path, &config_id) && config_id == 1) {
- return drmIoctl(screen->fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG,
- &config_id) < 0 && errno == ENOENT;
- }
- }
-
- return false;
+ return drmIoctl(screen->fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG,
+ &invalid_config_id) < 0 && errno == ENOENT;
}
static void