Skip to contentSkip to conversation

intel_aubdump: Add device override names (from Mesa INTEL_DEVID_OVERRIDE)

PATCH New Jordan Justen 2 participants 4 messages Sep 15, 2017 – Oct 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intel_aubdump: Add device override names (from Mesa INTEL_DEVID_OVERRIDE)

This just lets you specify an override like --device=bdw for broadwell.

---
 tools/aubdump.c        | 36 ++++++++++++++++++++++++++++++++----
 tools/intel_aubdump.in |  4 +++-
 2 files changed, 35 insertions(+), 5 deletions(-)
tools/aubdump.c +32 -4
index 4392e589..788bed13 100644
@@ -59,6 +59,24 @@ static int verbose = 0;
 static bool device_override;
 static uint32_t device;
 
+static const struct {
+	const char *name;
+	int pci_id;
+} name_map[] = {
+	{ "brw", 0x2a02 },
+	{ "g4x", 0x2a42 },
+	{ "ilk", 0x0042 },
+	{ "snb", 0x0126 },
+	{ "ivb", 0x016a },
+	{ "hsw", 0x0d2e },
+	{ "byt", 0x0f33 },
+	{ "bdw", 0x162e },
+	{ "skl", 0x1912 },
+	{ "kbl", 0x5912 },
+	{ "cnl", 0x5a52 },
+	/* Note: also update list in intel_aubdump.in */
+};
+
 #define MAX_BO_COUNT 64 * 1024
 
 struct bo {
@@ -563,10 +581,20 @@ maybe_init(void)
 		if (!strcmp(key, "verbose")) {
 			verbose = 1;
 		} else if (!strcmp(key, "device")) {
-			fail_if(sscanf(value, "%i", &device) != 1,
-				"intel_aubdump: failed to parse device id '%s'",
-				value);
-			device_override = true;
+			unsigned i;
+			for (i = 0; i < ARRAY_SIZE(name_map); i++) {
+				if (!strcmp(name_map[i].name, value)) {
+					device = name_map[i].pci_id;
+					device_override = true;
+					break;
+				}
+			}
+			if (i >= ARRAY_SIZE(name_map)) {
+				fail_if(sscanf(value, "%i", &device) != 1,
+					"intel_aubdump: failed to parse device id '%s'",
+					value);
+				device_override = true;
+			}
 		} else if (!strcmp(key, "file")) {
 			filename = strdup(value);
 			files[0] = fopen(filename, "w+");
tools/intel_aubdump.in +3 -1
index 8bc6b19d..09dcf35f 100755
@@ -13,7 +13,9 @@ contents and execution of the GEM application.
   -c, --command=CMD  Execute CMD and write the AUB file's content to its
                      standard input
 
-      --device=ID    Override PCI ID of the reported device
+      --device=ID    Override PCI ID of the reported device. ID may be an
+                     integer, or one of: brw, g4x, ilk, snb, ivb, hsw, byt,
+                     bdw, skl, kbl or cnl
 
   -v                 Enable verbose output
 
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/1 intel_aubdump: Add device override names (from Mesa INTEL_DEVID_OVERRIDE)

This just lets you specify an override like --device=bdw for broadwell.

---
Resend with 'i-g-t' in subject line.

 tools/aubdump.c        | 36 ++++++++++++++++++++++++++++++++----
 tools/intel_aubdump.in |  4 +++-
 2 files changed, 35 insertions(+), 5 deletions(-)
tools/aubdump.c +32 -4
index ee4d99b0..f3efb451 100644
@@ -60,6 +60,24 @@ static int verbose = 0;
 static bool device_override;
 static uint32_t device;
 
+static const struct {
+	const char *name;
+	int pci_id;
+} name_map[] = {
+	{ "brw", 0x2a02 },
+	{ "g4x", 0x2a42 },
+	{ "ilk", 0x0042 },
+	{ "snb", 0x0126 },
+	{ "ivb", 0x016a },
+	{ "hsw", 0x0d2e },
+	{ "byt", 0x0f33 },
+	{ "bdw", 0x162e },
+	{ "skl", 0x1912 },
+	{ "kbl", 0x5912 },
+	{ "cnl", 0x5a52 },
+	/* Note: also update list in intel_aubdump.in */
+};
+
 #define MAX_BO_COUNT 64 * 1024
 
 struct bo {
@@ -570,10 +588,20 @@ maybe_init(void)
 		if (!strcmp(key, "verbose")) {
 			verbose = 1;
 		} else if (!strcmp(key, "device")) {
-			fail_if(sscanf(value, "%i", &device) != 1,
-				"intel_aubdump: failed to parse device id '%s'",
-				value);
-			device_override = true;
+			unsigned i;
+			for (i = 0; i < ARRAY_SIZE(name_map); i++) {
+				if (!strcmp(name_map[i].name, value)) {
+					device = name_map[i].pci_id;
+					device_override = true;
+					break;
+				}
+			}
+			if (i >= ARRAY_SIZE(name_map)) {
+				fail_if(sscanf(value, "%i", &device) != 1,
+					"intel_aubdump: failed to parse device id '%s'",
+					value);
+				device_override = true;
+			}
 		} else if (!strcmp(key, "file")) {
 			filename = strdup(value);
 			files[0] = fopen(filename, "w+");
tools/intel_aubdump.in +3 -1
index 977fe951..f9a92d86 100755
@@ -13,7 +13,9 @@ contents and execution of the GEM application.
   -c, --command=CMD  Execute CMD and write the AUB file's content to its
                      standard input
 
-      --device=ID    Override PCI ID of the reported device
+      --device=ID    Override PCI ID of the reported device. ID may be an
+                     integer, or one of: brw, g4x, ilk, snb, ivb, hsw, byt,
+                     bdw, skl, kbl or cnl
 
   -v                 Enable verbose output
 
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

✓ Fi.CI.BAT: success for intel_aubdump: Add device override names (from Mesa INTEL_DEVID_OVERRIDE)

In reply to Jordan Justen
== Series Details ==

== Series Details ==

Series: intel_aubdump: Add device override names (from Mesa INTEL_DEVID_OVERRIDE)
URL : https://patchwork.freedesktop.org/series/31688/
State : success

== Summary ==

IGT patchset tested on top of latest successful build d7c88290ab6a8393dc341b30c7fb5e27d2952901 syncobj: Add a test for SYNCOBJ_CREATE_SIGNALED

with latest DRM-Tip kernel build CI_DRM_3208
c880c004bb05 drm-tip: 2017y-10m-10d-20h-31m-39s UTC integration manifest

No testlist changes.

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:454s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:476s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:393s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:571s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:286s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:524s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:526s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:546s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:519s
fi-cfl-s         total:289  pass:253  dwarn:4   dfail:0   fail:0   skip:32  time:557s
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:639s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:439s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:601s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:442s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:423s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:467s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:517s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:477s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:498s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:581s
fi-kbl-7567u     total:289  pass:265  dwarn:4   dfail:0   fail:0   skip:20  time:488s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:592s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:681s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:469s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:658s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:530s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:510s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:480s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:585s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:436s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_320/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

✓ Fi.CI.IGT: success for intel_aubdump: Add device override names (from Mesa INTEL_DEVID_OVERRIDE)

In reply to Jordan Justen
== Series Details ==

== Series Details ==

Series: intel_aubdump: Add device override names (from Mesa INTEL_DEVID_OVERRIDE)
URL : https://patchwork.freedesktop.org/series/31688/
State : success

== Summary ==

Test perf:

        Subgroup blocking:
                pass       -> FAIL       (shard-hsw) fdo#102252
Test gem_eio:
        Subgroup in-flight-contexts:
                pass       -> DMESG-WARN (shard-hsw) fdo#102886 +3
Test drv_module_reload:
        Subgroup basic-reload:
                pass       -> DMESG-WARN (shard-hsw) fdo#102707

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102886 https://bugs.freedesktop.org/show_bug.cgi?id=102886
fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707

shard-hsw total:2501 pass:1397 dwarn:6 dfail:0 fail:14 skip:1084 time:9407s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_320/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx