[Libva] [PATCH 1/2] Add new debug option for aub dump

Zhenyu Wang zhenyuw at linux.intel.com
Thu Dec 25 23:04:10 PST 2014


New VA debug option to dump aub file.

Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
---
 src/intel_driver.h | 1 +
 src/intel_memman.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/src/intel_driver.h b/src/intel_driver.h
index f45c787..3715210 100644
--- a/src/intel_driver.h
+++ b/src/intel_driver.h
@@ -80,6 +80,7 @@ struct intel_batchbuffer;
 extern uint32_t g_intel_debug_option_flags;
 #define VA_INTEL_DEBUG_OPTION_ASSERT    (1 << 0)
 #define VA_INTEL_DEBUG_OPTION_BENCH     (1 << 1)
+#define VA_INTEL_DEBUG_OPTION_DUMP_AUB  (1 << 2)
 
 #define ASSERT_RET(value, fail_ret) do {    \
         if (!(value)) {                     \
diff --git a/src/intel_memman.c b/src/intel_memman.c
index 7d56e96..03ed216 100644
--- a/src/intel_memman.c
+++ b/src/intel_memman.c
@@ -38,6 +38,12 @@ intel_memman_init(struct intel_driver_data *intel)
     assert(intel->bufmgr);
     intel_bufmgr_gem_enable_reuse(intel->bufmgr);
 
+    if (g_intel_debug_option_flags & VA_INTEL_DEBUG_OPTION_DUMP_AUB) {
+	drm_intel_bufmgr_gem_set_aub_filename(intel->bufmgr,
+					      "va.aub");
+	drm_intel_bufmgr_gem_set_aub_dump(intel->bufmgr, 1);
+    }
+
     return True;
 }
 
-- 
2.1.4



More information about the Libva mailing list