anv: print out perf permission warning only once

This warning is bothering a number of people and rightfully so.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8955>
This commit is contained in:
Lionel Landwerlin 2021-02-10 12:25:49 +02:00
parent b20e08fadd
commit 0b69e8b16f
1 changed files with 9 additions and 3 deletions

View File

@ -51,9 +51,15 @@ anv_physical_device_init_perf(struct anv_physical_device *device, int fd)
gen_perf_init_metrics(perf, &device->info, fd, false /* pipeline statistics */);
if (!perf->n_queries) {
if (perf->platform_supported)
mesa_logw("Performance support disabled, "
"consider sysctl dev.i915.perf_stream_paranoid=0\n");
if (perf->platform_supported) {
static bool warned_once = false;
if (!warned_once) {
mesa_logw("Performance support disabled, "
"consider sysctl dev.i915.perf_stream_paranoid=0\n");
warned_once = true;
}
}
goto err;
}