Mesa (master): i965: add a debug option to disable oa config loading

Lionel Landwerlin llandwerlin at kemper.freedesktop.org
Tue Nov 28 13:36:19 UTC 2017


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

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Tue Aug 29 10:41:27 2017 +0100

i965: add a debug option to disable oa config loading

This provides a good way to verify we haven't broken using the perf
driver on older kernels (which don't have the oa config loading
mechanism).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/intel/common/gen_debug.c                      | 1 +
 src/intel/common/gen_debug.h                      | 2 +-
 src/mesa/drivers/dri/i965/brw_performance_query.c | 3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/intel/common/gen_debug.c b/src/intel/common/gen_debug.c
index f58c593c44..a978f2f581 100644
--- a/src/intel/common/gen_debug.c
+++ b/src/intel/common/gen_debug.c
@@ -69,6 +69,7 @@ static const struct debug_control debug_control[] = {
    { "optimizer",   DEBUG_OPTIMIZER },
    { "ann",         DEBUG_ANNOTATION },
    { "no8",         DEBUG_NO8 },
+   { "no-oaconfig", DEBUG_NO_OACONFIG },
    { "spill_fs",    DEBUG_SPILL_FS },
    { "spill_vec4",  DEBUG_SPILL_VEC4 },
    { "cs",          DEBUG_CS },
diff --git a/src/intel/common/gen_debug.h b/src/intel/common/gen_debug.h
index e418e3fb16..ad62054ff2 100644
--- a/src/intel/common/gen_debug.h
+++ b/src/intel/common/gen_debug.h
@@ -69,7 +69,7 @@ extern uint64_t INTEL_DEBUG;
 #define DEBUG_OPTIMIZER           (1ull << 25)
 #define DEBUG_ANNOTATION          (1ull << 26)
 #define DEBUG_NO8                 (1ull << 27)
-/* Hole - feel free to reuse      (1ull << 28) */
+#define DEBUG_NO_OACONFIG         (1ull << 28)
 #define DEBUG_SPILL_FS            (1ull << 29)
 #define DEBUG_SPILL_VEC4          (1ull << 30)
 #define DEBUG_CS                  (1ull << 31)
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index cdae18c627..9a5117c46c 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -2144,7 +2144,8 @@ brw_init_perf_query_info(struct gl_context *ctx)
        */
       oa_register(brw);
 
-      if (kernel_has_dynamic_config_support(brw, sysfs_dev_dir))
+      if (likely((INTEL_DEBUG & DEBUG_NO_OACONFIG) == 0) &&
+          kernel_has_dynamic_config_support(brw, sysfs_dev_dir))
          init_oa_configs(brw, sysfs_dev_dir);
       else
          enumerate_sysfs_metrics(brw, sysfs_dev_dir);




More information about the mesa-commit mailing list