Module: Mesa
Branch: master
Commit: 0b69e8b16f4cb23c748252e14d9dc48d2e8db655
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b69e8b16f4cb23c748252e14d9dc48d2e8db655

Author: Lionel Landwerlin <[email protected]>
Date:   Wed Feb 10 12:25:49 2021 +0200

anv: print out perf permission warning only once

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

Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8955>

---

 src/intel/vulkan/anv_perf.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/intel/vulkan/anv_perf.c b/src/intel/vulkan/anv_perf.c
index 1a80793e571..4cdf3a4df29 100644
--- a/src/intel/vulkan/anv_perf.c
+++ b/src/intel/vulkan/anv_perf.c
@@ -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;
    }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to