[igt-dev] [PATCH i-g-t 4/7] tools/aubdump: add legacy submission option

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu Jun 14 10:32:49 UTC 2018


Previous patches introduced the execlists submission mode as well as
page tables writing which is useful when working with a similator.

This new legacy option will keep using the previous behavior if
requested by submitting to the ring buffer and not using page tables.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 tools/aubdump.c        | 5 ++++-
 tools/intel_aubdump.in | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/tools/aubdump.c b/tools/aubdump.c
index 61bf5b09..99ec4be2 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -252,6 +252,7 @@ static int verbose = 0;
 static bool device_override;
 static uint32_t device;
 static int addr_bits = 0;
+static bool legacy_submission = false;
 
 #define MAX_BO_COUNT 64 * 1024
 
@@ -299,7 +300,7 @@ struct drm_i915_gem_userptr {
 
 static inline bool use_execlists(void)
 {
-	return gen >= 8;
+	return gen >= 8 && !legacy_submission;
 }
 
 static void __attribute__ ((format(__printf__, 2, 3)))
@@ -1112,6 +1113,8 @@ maybe_init(void)
 			fail_if(files[1] == NULL,
 				"intel_aubdump: failed to launch command '%s'\n",
 				value);
+		} else if (!strcmp(key,  "legacy")) {
+			legacy_submission = true;
 		} else {
 			fprintf(stderr, "intel_aubdump: unknown option '%s'\n", key);
 		}
diff --git a/tools/intel_aubdump.in b/tools/intel_aubdump.in
index 977fe951..bfdb426f 100755
--- a/tools/intel_aubdump.in
+++ b/tools/intel_aubdump.in
@@ -15,6 +15,9 @@ contents and execution of the GEM application.
 
       --device=ID    Override PCI ID of the reported device
 
+      --legacy       Emit legacy ring buffer submission (instead of writing
+                     pagetables & using execlists submissions)
+
   -v                 Enable verbose output
 
       --help         Display this help message and exit
@@ -79,6 +82,10 @@ while true; do
 	      add_arg "device=${1##--device=}"
 	      shift
 	      ;;
+	  --legacy)
+	      add_arg "legacy=1"
+	      shift
+	      ;;
 	  --help)
 	      show_help
 	      ;;
-- 
2.17.1



More information about the igt-dev mailing list