* [PATCH] intel_aubdump: Default to 64-bit AUBs when the gen is unknown
@ 2017-09-15 0:34 Jordan Justen
2017-10-10 1:17 ` Kenneth Graunke
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jordan Justen @ 2017-09-15 0:34 UTC (permalink / raw)
To: Intel GFX discussion
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
tools/aubdump.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/tools/aubdump.c b/tools/aubdump.c
index 788bed13..893ddf93 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -58,6 +58,7 @@ static int gen = 0;
static int verbose = 0;
static bool device_override;
static uint32_t device;
+static bool use_64bit = false;
static const struct {
const char *name;
@@ -185,7 +186,7 @@ data_out(const void *data, size_t size)
static uint32_t
gtt_entry_size(void)
{
- return gen >= 8 ? 8 : 4;
+ return use_64bit ? 8 : 4;
}
static uint32_t
@@ -224,17 +225,17 @@ write_header(void)
data_out(comment, comment_dwords * 4);
/* Set up the GTT. The max we can handle is 64M */
- dword_out(CMD_AUB_TRACE_HEADER_BLOCK | ((gen >= 8 ? 6 : 5) - 2));
+ dword_out(CMD_AUB_TRACE_HEADER_BLOCK | ((use_64bit ? 6 : 5) - 2));
dword_out(AUB_TRACE_MEMTYPE_GTT_ENTRY |
AUB_TRACE_TYPE_NOTYPE | AUB_TRACE_OP_DATA_WRITE);
dword_out(0); /* subtype */
dword_out(0); /* offset */
dword_out(gtt_size()); /* size */
- if (gen >= 8)
+ if (use_64bit)
dword_out(0);
for (uint32_t i = 0; i * gtt_entry_size() < gtt_size(); i++) {
dword_out(entry + 0x1000 * i);
- if (gen >= 8)
+ if (use_64bit)
dword_out(0);
}
}
@@ -258,13 +259,13 @@ aub_write_trace_block(uint32_t type, void *virtual, uint32_t size, uint64_t gtt_
block_size = 8 * 4096;
dword_out(CMD_AUB_TRACE_HEADER_BLOCK |
- ((gen >= 8 ? 6 : 5) - 2));
+ ((use_64bit ? 6 : 5) - 2));
dword_out(AUB_TRACE_MEMTYPE_GTT |
type | AUB_TRACE_OP_DATA_WRITE);
dword_out(subtype);
dword_out(gtt_offset + offset);
dword_out(align_u32(block_size, 4));
- if (gen >= 8)
+ if (use_64bit)
dword_out((gtt_offset + offset) >> 32);
if (virtual)
@@ -280,7 +281,7 @@ aub_write_trace_block(uint32_t type, void *virtual, uint32_t size, uint64_t gtt_
static void
write_reloc(void *p, uint64_t v)
{
- if (gen >= 8) {
+ if (use_64bit) {
/* From the Broadwell PRM Vol. 2a,
* MI_LOAD_REGISTER_MEM::MemoryAddress:
*
@@ -319,7 +320,7 @@ aub_dump_ringbuffer(uint64_t batch_offset, uint64_t offset, int ring_flag)
/* Make a ring buffer to execute our batchbuffer. */
memset(ringbuffer, 0, sizeof(ringbuffer));
- aub_mi_bbs_len = gen >= 8 ? 3 : 2;
+ aub_mi_bbs_len = use_64bit ? 3 : 2;
ringbuffer[ring_count] = AUB_MI_BATCH_BUFFER_START | (aub_mi_bbs_len - 2);
write_reloc(&ringbuffer[ring_count + 1], batch_offset);
ring_count += aub_mi_bbs_len;
@@ -328,12 +329,12 @@ aub_dump_ringbuffer(uint64_t batch_offset, uint64_t offset, int ring_flag)
* the ring in the simulator.
*/
dword_out(CMD_AUB_TRACE_HEADER_BLOCK |
- ((gen >= 8 ? 6 : 5) - 2));
+ ((use_64bit ? 6 : 5) - 2));
dword_out(AUB_TRACE_MEMTYPE_GTT | ring | AUB_TRACE_OP_COMMAND_WRITE);
dword_out(0); /* general/surface subtype */
dword_out(offset);
dword_out(ring_count * 4);
- if (gen >= 8)
+ if (use_64bit)
dword_out(offset >> 32);
data_out(ringbuffer, ring_count * 4);
@@ -436,6 +437,11 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
filename, device, gen);
}
+ /* If we don't know the device gen, then it probably is a
+ * newer device which supports 64-bit.
+ */
+ use_64bit = gen >= 8 || gen == 0;
+
if (verbose)
printf("Dumping execbuffer2:\n");
--
2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] intel_aubdump: Default to 64-bit AUBs when the gen is unknown
2017-09-15 0:34 [PATCH] intel_aubdump: Default to 64-bit AUBs when the gen is unknown Jordan Justen
@ 2017-10-10 1:17 ` Kenneth Graunke
2017-10-10 23:05 ` [PATCH i-g-t v2] intel_aubdump: Default to 48-bit " Jordan Justen
2017-10-10 23:44 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-11 12:17 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 1 reply; 6+ messages in thread
From: Kenneth Graunke @ 2017-10-10 1:17 UTC (permalink / raw)
To: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 703 bytes --]
On Thursday, September 14, 2017 5:34:24 PM PDT Jordan Justen wrote:
> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
> ---
> tools/aubdump.c | 26 ++++++++++++++++----------
> 1 file changed, 16 insertions(+), 10 deletions(-)
>
> diff --git a/tools/aubdump.c b/tools/aubdump.c
> index 788bed13..893ddf93 100644
> --- a/tools/aubdump.c
> +++ b/tools/aubdump.c
> @@ -58,6 +58,7 @@ static int gen = 0;
> static int verbose = 0;
> static bool device_override;
> static uint32_t device;
> +static bool use_64bit = false;
It might be better to call this use_48bit_addrs, to clarify that this
isn't about 32-bit or 64-bit OSes.
Either way,
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH i-g-t v2] intel_aubdump: Default to 48-bit AUBs when the gen is unknown
2017-10-10 1:17 ` Kenneth Graunke
@ 2017-10-10 23:05 ` Jordan Justen
2017-10-10 23:26 ` Kenneth Graunke
0 siblings, 1 reply; 6+ messages in thread
From: Jordan Justen @ 2017-10-10 23:05 UTC (permalink / raw)
To: Intel GFX discussion; +Cc: Kenneth Graunke
v2:
* Use 48-bit rather than 64-bit (Ken)
* Use 'addr_bits' rather than 'use_64bit'
Cc: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
tools/aubdump.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/tools/aubdump.c b/tools/aubdump.c
index f3efb451..ee378a76 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -59,6 +59,7 @@ static int gen = 0;
static int verbose = 0;
static bool device_override;
static uint32_t device;
+static int addr_bits = 0;
static const struct {
const char *name;
@@ -190,7 +191,7 @@ data_out(const void *data, size_t size)
static uint32_t
gtt_entry_size(void)
{
- return gen >= 8 ? 8 : 4;
+ return addr_bits > 32 ? 8 : 4;
}
static uint32_t
@@ -229,17 +230,17 @@ write_header(void)
data_out(comment, comment_dwords * 4);
/* Set up the GTT. The max we can handle is 64M */
- dword_out(CMD_AUB_TRACE_HEADER_BLOCK | ((gen >= 8 ? 6 : 5) - 2));
+ dword_out(CMD_AUB_TRACE_HEADER_BLOCK | ((addr_bits > 32 ? 6 : 5) - 2));
dword_out(AUB_TRACE_MEMTYPE_GTT_ENTRY |
AUB_TRACE_TYPE_NOTYPE | AUB_TRACE_OP_DATA_WRITE);
dword_out(0); /* subtype */
dword_out(0); /* offset */
dword_out(gtt_size()); /* size */
- if (gen >= 8)
+ if (addr_bits > 32)
dword_out(0);
for (uint32_t i = 0; i * gtt_entry_size() < gtt_size(); i++) {
dword_out(entry + 0x1000 * i);
- if (gen >= 8)
+ if (addr_bits > 32)
dword_out(0);
}
}
@@ -263,13 +264,13 @@ aub_write_trace_block(uint32_t type, void *virtual, uint32_t size, uint64_t gtt_
block_size = 8 * 4096;
dword_out(CMD_AUB_TRACE_HEADER_BLOCK |
- ((gen >= 8 ? 6 : 5) - 2));
+ ((addr_bits > 32 ? 6 : 5) - 2));
dword_out(AUB_TRACE_MEMTYPE_GTT |
type | AUB_TRACE_OP_DATA_WRITE);
dword_out(subtype);
dword_out(gtt_offset + offset);
dword_out(align_u32(block_size, 4));
- if (gen >= 8)
+ if (addr_bits > 32)
dword_out((gtt_offset + offset) >> 32);
if (virtual)
@@ -285,7 +286,7 @@ aub_write_trace_block(uint32_t type, void *virtual, uint32_t size, uint64_t gtt_
static void
write_reloc(void *p, uint64_t v)
{
- if (gen >= 8) {
+ if (addr_bits > 32) {
/* From the Broadwell PRM Vol. 2a,
* MI_LOAD_REGISTER_MEM::MemoryAddress:
*
@@ -324,7 +325,7 @@ aub_dump_ringbuffer(uint64_t batch_offset, uint64_t offset, int ring_flag)
/* Make a ring buffer to execute our batchbuffer. */
memset(ringbuffer, 0, sizeof(ringbuffer));
- aub_mi_bbs_len = gen >= 8 ? 3 : 2;
+ aub_mi_bbs_len = addr_bits > 32 ? 3 : 2;
ringbuffer[ring_count] = AUB_MI_BATCH_BUFFER_START | (aub_mi_bbs_len - 2);
write_reloc(&ringbuffer[ring_count + 1], batch_offset);
ring_count += aub_mi_bbs_len;
@@ -333,12 +334,12 @@ aub_dump_ringbuffer(uint64_t batch_offset, uint64_t offset, int ring_flag)
* the ring in the simulator.
*/
dword_out(CMD_AUB_TRACE_HEADER_BLOCK |
- ((gen >= 8 ? 6 : 5) - 2));
+ ((addr_bits > 32 ? 6 : 5) - 2));
dword_out(AUB_TRACE_MEMTYPE_GTT | ring | AUB_TRACE_OP_COMMAND_WRITE);
dword_out(0); /* general/surface subtype */
dword_out(offset);
dword_out(ring_count * 4);
- if (gen >= 8)
+ if (addr_bits > 32)
dword_out(offset >> 32);
data_out(ringbuffer, ring_count * 4);
@@ -441,6 +442,11 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
filename, device, gen);
}
+ /* If we don't know the device gen, then it probably is a
+ * newer device which uses 48-bit addresses.
+ */
+ addr_bits = (gen >= 8 || gen == 0) ? 48 : 32;
+
if (verbose)
printf("Dumping execbuffer2:\n");
--
2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH i-g-t v2] intel_aubdump: Default to 48-bit AUBs when the gen is unknown
2017-10-10 23:05 ` [PATCH i-g-t v2] intel_aubdump: Default to 48-bit " Jordan Justen
@ 2017-10-10 23:26 ` Kenneth Graunke
0 siblings, 0 replies; 6+ messages in thread
From: Kenneth Graunke @ 2017-10-10 23:26 UTC (permalink / raw)
To: Jordan Justen; +Cc: Intel GFX discussion
[-- Attachment #1.1: Type: text/plain, Size: 286 bytes --]
On Tuesday, October 10, 2017 4:05:17 PM PDT Jordan Justen wrote:
> v2:
> * Use 48-bit rather than 64-bit (Ken)
> * Use 'addr_bits' rather than 'use_64bit'
>
> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
and pushed.
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✓ Fi.CI.BAT: success for intel_aubdump: Default to 48-bit AUBs when the gen is unknown
2017-09-15 0:34 [PATCH] intel_aubdump: Default to 64-bit AUBs when the gen is unknown Jordan Justen
2017-10-10 1:17 ` Kenneth Graunke
@ 2017-10-10 23:44 ` Patchwork
2017-10-11 12:17 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-10-10 23:44 UTC (permalink / raw)
To: Jordan Justen; +Cc: intel-gfx
== Series Details ==
Series: intel_aubdump: Default to 48-bit AUBs when the gen is unknown
URL : https://patchwork.freedesktop.org/series/31689/
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.
Test chamelium:
Subgroup dp-crc-fast:
pass -> FAIL (fi-kbl-7500u) fdo#102514
fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:458s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:473s
fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:395s
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:285s
fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:525s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:529s
fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:537s
fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:522s
fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:567s
fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:632s
fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:437s
fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:603s
fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:445s
fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:422s
fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:468s
fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:507s
fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:481s
fi-kbl-7500u total:289 pass:263 dwarn:1 dfail:0 fail:1 skip:24 time:495s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:585s
fi-kbl-7567u total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:489s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:591s
fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:665s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:471s
fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:656s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:534s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:516s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:468s
fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:579s
fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:438s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_321/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✓ Fi.CI.IGT: success for intel_aubdump: Default to 48-bit AUBs when the gen is unknown
2017-09-15 0:34 [PATCH] intel_aubdump: Default to 64-bit AUBs when the gen is unknown Jordan Justen
2017-10-10 1:17 ` Kenneth Graunke
2017-10-10 23:44 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-10-11 12:17 ` Patchwork
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-10-11 12:17 UTC (permalink / raw)
To: Jordan Justen; +Cc: intel-gfx
== Series Details ==
Series: intel_aubdump: Default to 48-bit AUBs when the gen is unknown
URL : https://patchwork.freedesktop.org/series/31689/
State : success
== Summary ==
Test kms_setmode:
Subgroup basic:
fail -> PASS (shard-hsw) fdo#99912
Test gem_eio:
Subgroup in-flight-contexts:
pass -> DMESG-WARN (shard-hsw) fdo#102886 +2
Test drv_module_reload:
Subgroup basic-reload:
pass -> DMESG-WARN (shard-hsw) fdo#102707
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
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:2552 pass:1430 dwarn:7 dfail:0 fail:12 skip:1103 time:9681s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_321/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-10-11 12:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-15 0:34 [PATCH] intel_aubdump: Default to 64-bit AUBs when the gen is unknown Jordan Justen
2017-10-10 1:17 ` Kenneth Graunke
2017-10-10 23:05 ` [PATCH i-g-t v2] intel_aubdump: Default to 48-bit " Jordan Justen
2017-10-10 23:26 ` Kenneth Graunke
2017-10-10 23:44 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-11 12:17 ` ✓ Fi.CI.IGT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox