[PATCH 14/17] intel: Add support for parsing gen7 URB packets.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 intel/intel_decode.c              |   44 ++++++++++++++
 intel/tests/gen7-3d.batch-ref.txt |  112 ++++++++++++++++++------------------
 2 files changed, 100 insertions(+), 56 deletions(-)

diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index e1243ee..7b4ed42 100644
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
@@ -2704,6 +2704,46 @@ state_max_out(struct drm_intel_decode *ctx, unsigned int index,
 }
 
 static int
+gen7_3DSTATE_URB_unit(struct drm_intel_decode *ctx, const char *unit)
+{
+    int start_kb = ((ctx->data[1] >> 25) & 0x3f) * 8;
+    /* the field is # of 512-bit rows - 1, we print bytes */
+    int entry_size = (((ctx->data[1] >> 16) & 0x1ff) + 1);
+    int nr_entries = ctx->data[1] & 0xffff;
+
+    instr_out(ctx, 0, "3DSTATE_URB_%s\n", unit);
+    instr_out(ctx, 1,
+	      "%dKB start, size=%d 64B rows, nr_entries=%d, total size %dB\n",
+	      start_kb, entry_size, nr_entries, nr_entries * 64 * entry_size);
+
+    return 2;
+}
+
+static int
+gen7_3DSTATE_URB_VS(struct drm_intel_decode *ctx)
+{
+	return gen7_3DSTATE_URB_unit(ctx, "VS");
+}
+
+static int
+gen7_3DSTATE_URB_HS(struct drm_intel_decode *ctx)
+{
+	return gen7_3DSTATE_URB_unit(ctx, "HS");
+}
+
+static int
+gen7_3DSTATE_URB_DS(struct drm_intel_decode *ctx)
+{
+	return gen7_3DSTATE_URB_unit(ctx, "DS");
+}
+
+static int
+gen7_3DSTATE_URB_GS(struct drm_intel_decode *ctx)
+{
+	return gen7_3DSTATE_URB_unit(ctx, "GS");
+}
+
+static int
 decode_3d_965(struct drm_intel_decode *ctx)
 {
 	uint32_t opcode;
@@ -2750,6 +2790,10 @@ decode_3d_965(struct drm_intel_decode *ctx)
 		{ 0x7816, 0x00ff, 5, 5, "3DSTATE_CONSTANT_GS_STATE" },
 		{ 0x7817, 0x00ff, 5, 5, "3DSTATE_CONSTANT_PS_STATE" },
 		{ 0x7818, 0xffff, 2, 2, "3DSTATE_SAMPLE_MASK" },
+		{ 0x7830, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_URB_VS },
+		{ 0x7831, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_URB_HS },
+		{ 0x7832, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_URB_DS },
+		{ 0x7833, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_URB_GS },
 		{ 0x7900, 0xffff, 4, 4, "3DSTATE_DRAWING_RECTANGLE" },
 		{ 0x7901, 0xffff, 5, 5, "3DSTATE_CONSTANT_COLOR" },
 		{ 0x7905, 0xffff, 5, 7, "3DSTATE_DEPTH_BUFFER" },
diff --git a/intel/tests/gen7-3d.batch-ref.txt b/intel/tests/gen7-3d.batch-ref.txt
index 9c7f7ef..cde910f 100644
--- a/intel/tests/gen7-3d.batch-ref.txt
+++ b/intel/tests/gen7-3d.batch-ref.txt
@@ -26,14 +26,14 @@
 0x12300064:      0x00000008: MI_NOOP
 0x12300068:      0x79160000: 3D UNKNOWN: 3d_965 opcode = 0x7916
 0x1230006c:      0x00080008: MI_NOOP
-0x12300070:      0x78300000: 3D UNKNOWN: 3d_965 opcode = 0x7830
-0x12300074:      0x040002c0: MI_ARB_ON_OFF
-0x12300078:      0x78330000: 3D UNKNOWN: 3d_965 opcode = 0x7833
-0x1230007c:      0x04000000: MI_ARB_ON_OFF
-0x12300080:      0x78310000: 3D UNKNOWN: 3d_965 opcode = 0x7831
-0x12300084:      0x04000000: MI_ARB_ON_OFF
-0x12300088:      0x78320000: 3D UNKNOWN: 3d_965 opcode = 0x7832
-0x1230008c:      0x04000000: MI_ARB_ON_OFF
+0x12300070:      0x78300000: 3DSTATE_URB_VS
+0x12300074:      0x040002c0:    16KB start, size=1 64B rows, nr_entries=704, total size 45056B
+0x12300078:      0x78330000: 3DSTATE_URB_GS
+0x1230007c:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300080:      0x78310000: 3DSTATE_URB_HS
+0x12300084:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300088:      0x78320000: 3DSTATE_URB_DS
+0x1230008c:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
 0x12300090:      0x78240000: 3D UNKNOWN: 3d_965 opcode = 0x7824
 0x12300094:      0x00007f81: MI_NOOP
 Bad length 2 in 3DSTATE_CC_STATE_POINTERS, expeted 4-4
@@ -237,14 +237,14 @@ Bad length 7 in 3DPRIMITIVE, expeted 6-6
 0x1230034c:      0x00000008: MI_NOOP
 0x12300350:      0x79160000: 3D UNKNOWN: 3d_965 opcode = 0x7916
 0x12300354:      0x00080008: MI_NOOP
-0x12300358:      0x78300000: 3D UNKNOWN: 3d_965 opcode = 0x7830
-0x1230035c:      0x040002c0: MI_ARB_ON_OFF
-0x12300360:      0x78330000: 3D UNKNOWN: 3d_965 opcode = 0x7833
-0x12300364:      0x04000000: MI_ARB_ON_OFF
-0x12300368:      0x78310000: 3D UNKNOWN: 3d_965 opcode = 0x7831
-0x1230036c:      0x04000000: MI_ARB_ON_OFF
-0x12300370:      0x78320000: 3D UNKNOWN: 3d_965 opcode = 0x7832
-0x12300374:      0x04000000: MI_ARB_ON_OFF
+0x12300358:      0x78300000: 3DSTATE_URB_VS
+0x1230035c:      0x040002c0:    16KB start, size=1 64B rows, nr_entries=704, total size 45056B
+0x12300360:      0x78330000: 3DSTATE_URB_GS
+0x12300364:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300368:      0x78310000: 3DSTATE_URB_HS
+0x1230036c:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300370:      0x78320000: 3DSTATE_URB_DS
+0x12300374:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
 Bad length 2 in 3DSTATE_CC_STATE_POINTERS, expeted 4-4
 0x12300378:      0x780e0000: 3DSTATE_CC_STATE_POINTERS
 0x1230037c:      0x00007d01:    blend change 1
@@ -445,14 +445,14 @@ Bad length 7 in 3DPRIMITIVE, expeted 6-6
 0x12300620:      0x00000008: MI_NOOP
 0x12300624:      0x79160000: 3D UNKNOWN: 3d_965 opcode = 0x7916
 0x12300628:      0x00080008: MI_NOOP
-0x1230062c:      0x78300000: 3D UNKNOWN: 3d_965 opcode = 0x7830
-0x12300630:      0x040002c0: MI_ARB_ON_OFF
-0x12300634:      0x78330000: 3D UNKNOWN: 3d_965 opcode = 0x7833
-0x12300638:      0x04000000: MI_ARB_ON_OFF
-0x1230063c:      0x78310000: 3D UNKNOWN: 3d_965 opcode = 0x7831
-0x12300640:      0x04000000: MI_ARB_ON_OFF
-0x12300644:      0x78320000: 3D UNKNOWN: 3d_965 opcode = 0x7832
-0x12300648:      0x04000000: MI_ARB_ON_OFF
+0x1230062c:      0x78300000: 3DSTATE_URB_VS
+0x12300630:      0x040002c0:    16KB start, size=1 64B rows, nr_entries=704, total size 45056B
+0x12300634:      0x78330000: 3DSTATE_URB_GS
+0x12300638:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x1230063c:      0x78310000: 3DSTATE_URB_HS
+0x12300640:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300644:      0x78320000: 3DSTATE_URB_DS
+0x12300648:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
 0x1230064c:      0x78260000: 3D UNKNOWN: 3d_965 opcode = 0x7826
 0x12300650:      0x00007a00: MI_NOOP
 0x12300654:      0x782b0000: 3D UNKNOWN: 3d_965 opcode = 0x782b
@@ -628,14 +628,14 @@ Bad length 7 in 3DPRIMITIVE, expeted 6-6
 0x12300860:      0x00000008: MI_NOOP
 0x12300864:      0x79160000: 3D UNKNOWN: 3d_965 opcode = 0x7916
 0x12300868:      0x00080008: MI_NOOP
-0x1230086c:      0x78300000: 3D UNKNOWN: 3d_965 opcode = 0x7830
-0x12300870:      0x040002c0: MI_ARB_ON_OFF
-0x12300874:      0x78330000: 3D UNKNOWN: 3d_965 opcode = 0x7833
-0x12300878:      0x04000000: MI_ARB_ON_OFF
-0x1230087c:      0x78310000: 3D UNKNOWN: 3d_965 opcode = 0x7831
-0x12300880:      0x04000000: MI_ARB_ON_OFF
-0x12300884:      0x78320000: 3D UNKNOWN: 3d_965 opcode = 0x7832
-0x12300888:      0x04000000: MI_ARB_ON_OFF
+0x1230086c:      0x78300000: 3DSTATE_URB_VS
+0x12300870:      0x040002c0:    16KB start, size=1 64B rows, nr_entries=704, total size 45056B
+0x12300874:      0x78330000: 3DSTATE_URB_GS
+0x12300878:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x1230087c:      0x78310000: 3DSTATE_URB_HS
+0x12300880:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300884:      0x78320000: 3DSTATE_URB_DS
+0x12300888:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
 0x1230088c:      0x78260000: 3D UNKNOWN: 3d_965 opcode = 0x7826
 0x12300890:      0x00007a00: MI_NOOP
 0x12300894:      0x782b0000: 3D UNKNOWN: 3d_965 opcode = 0x782b
@@ -806,14 +806,14 @@ Bad length 7 in 3DPRIMITIVE, expeted 6-6
 0x12300abc:      0x00000008: MI_NOOP
 0x12300ac0:      0x79160000: 3D UNKNOWN: 3d_965 opcode = 0x7916
 0x12300ac4:      0x00080008: MI_NOOP
-0x12300ac8:      0x78300000: 3D UNKNOWN: 3d_965 opcode = 0x7830
-0x12300acc:      0x040002c0: MI_ARB_ON_OFF
-0x12300ad0:      0x78330000: 3D UNKNOWN: 3d_965 opcode = 0x7833
-0x12300ad4:      0x04000000: MI_ARB_ON_OFF
-0x12300ad8:      0x78310000: 3D UNKNOWN: 3d_965 opcode = 0x7831
-0x12300adc:      0x04000000: MI_ARB_ON_OFF
-0x12300ae0:      0x78320000: 3D UNKNOWN: 3d_965 opcode = 0x7832
-0x12300ae4:      0x04000000: MI_ARB_ON_OFF
+0x12300ac8:      0x78300000: 3DSTATE_URB_VS
+0x12300acc:      0x040002c0:    16KB start, size=1 64B rows, nr_entries=704, total size 45056B
+0x12300ad0:      0x78330000: 3DSTATE_URB_GS
+0x12300ad4:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300ad8:      0x78310000: 3DSTATE_URB_HS
+0x12300adc:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300ae0:      0x78320000: 3DSTATE_URB_DS
+0x12300ae4:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
 0x12300ae8:      0x78260000: 3D UNKNOWN: 3d_965 opcode = 0x7826
 0x12300aec:      0x00007a00: MI_NOOP
 0x12300af0:      0x782b0000: 3D UNKNOWN: 3d_965 opcode = 0x782b
@@ -989,14 +989,14 @@ Bad length 7 in 3DPRIMITIVE, expeted 6-6
 0x12300cfc:      0x00000008: MI_NOOP
 0x12300d00:      0x79160000: 3D UNKNOWN: 3d_965 opcode = 0x7916
 0x12300d04:      0x00080008: MI_NOOP
-0x12300d08:      0x78300000: 3D UNKNOWN: 3d_965 opcode = 0x7830
-0x12300d0c:      0x040002c0: MI_ARB_ON_OFF
-0x12300d10:      0x78330000: 3D UNKNOWN: 3d_965 opcode = 0x7833
-0x12300d14:      0x04000000: MI_ARB_ON_OFF
-0x12300d18:      0x78310000: 3D UNKNOWN: 3d_965 opcode = 0x7831
-0x12300d1c:      0x04000000: MI_ARB_ON_OFF
-0x12300d20:      0x78320000: 3D UNKNOWN: 3d_965 opcode = 0x7832
-0x12300d24:      0x04000000: MI_ARB_ON_OFF
+0x12300d08:      0x78300000: 3DSTATE_URB_VS
+0x12300d0c:      0x040002c0:    16KB start, size=1 64B rows, nr_entries=704, total size 45056B
+0x12300d10:      0x78330000: 3DSTATE_URB_GS
+0x12300d14:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300d18:      0x78310000: 3DSTATE_URB_HS
+0x12300d1c:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300d20:      0x78320000: 3DSTATE_URB_DS
+0x12300d24:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
 0x12300d28:      0x78260000: 3D UNKNOWN: 3d_965 opcode = 0x7826
 0x12300d2c:      0x00007a00: MI_NOOP
 0x12300d30:      0x782b0000: 3D UNKNOWN: 3d_965 opcode = 0x782b
@@ -1167,14 +1167,14 @@ Bad length 7 in 3DPRIMITIVE, expeted 6-6
 0x12300f58:      0x00000008: MI_NOOP
 0x12300f5c:      0x79160000: 3D UNKNOWN: 3d_965 opcode = 0x7916
 0x12300f60:      0x00080008: MI_NOOP
-0x12300f64:      0x78300000: 3D UNKNOWN: 3d_965 opcode = 0x7830
-0x12300f68:      0x040002c0: MI_ARB_ON_OFF
-0x12300f6c:      0x78330000: 3D UNKNOWN: 3d_965 opcode = 0x7833
-0x12300f70:      0x04000000: MI_ARB_ON_OFF
-0x12300f74:      0x78310000: 3D UNKNOWN: 3d_965 opcode = 0x7831
-0x12300f78:      0x04000000: MI_ARB_ON_OFF
-0x12300f7c:      0x78320000: 3D UNKNOWN: 3d_965 opcode = 0x7832
-0x12300f80:      0x04000000: MI_ARB_ON_OFF
+0x12300f64:      0x78300000: 3DSTATE_URB_VS
+0x12300f68:      0x040002c0:    16KB start, size=1 64B rows, nr_entries=704, total size 45056B
+0x12300f6c:      0x78330000: 3DSTATE_URB_GS
+0x12300f70:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300f74:      0x78310000: 3DSTATE_URB_HS
+0x12300f78:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
+0x12300f7c:      0x78320000: 3DSTATE_URB_DS
+0x12300f80:      0x04000000:    16KB start, size=1 64B rows, nr_entries=0, total size 0B
 0x12300f84:      0x78260000: 3D UNKNOWN: 3d_965 opcode = 0x7826
 0x12300f88:      0x00007a00: MI_NOOP
 0x12300f8c:      0x782b0000: 3D UNKNOWN: 3d_965 opcode = 0x782b
-- 
1.7.7.3



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux