diff mbox

[5/5] intel/bdw: Update MI_BATCH_BUFFER_START for aub dumps

Message ID 1383758132-28273-6-git-send-email-benjamin.widawsky@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky Nov. 6, 2013, 5:15 p.m. UTC
From: Damien Lespiau <damien.lespiau@intel.com>

The command now takes a 48bits address and is thus 1 byte longer.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 intel/intel_bufmgr_gem.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Comments

Eric Anholt Nov. 6, 2013, 11:04 p.m. UTC | #1
Ben Widawsky <benjamin.widawsky@intel.com> writes:

> From: Damien Lespiau <damien.lespiau@intel.com>
>
> The command now takes a 48bits address and is thus 1 byte longer.

I think you mean "1 dword"

Other than that, patches 2-5 are

Reviewed-by: Eric Anholt <eric@anholt.net>

(patch 1, I don't know anything about the set of PCI IDs so I've skipped
it).
diff mbox

Patch

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 3eb6e2e..029ca5d 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2028,8 +2028,14 @@  aub_build_dump_ringbuffer(drm_intel_bufmgr_gem *bufmgr_gem,
 
 	/* Make a ring buffer to execute our batchbuffer. */
 	memset(ringbuffer, 0, sizeof(ringbuffer));
-	ringbuffer[ring_count++] = AUB_MI_BATCH_BUFFER_START;
-	ringbuffer[ring_count++] = batch_buffer;
+	if (bufmgr_gem->gen >= 8) {
+		ringbuffer[ring_count++] = AUB_MI_BATCH_BUFFER_START | (3 - 2);
+		ringbuffer[ring_count++] = batch_buffer;
+		ringbuffer[ring_count++] = 0;
+	} else {
+		ringbuffer[ring_count++] = AUB_MI_BATCH_BUFFER_START;
+		ringbuffer[ring_count++] = batch_buffer;
+	}
 
 	/* Write out the ring.  This appears to trigger execution of
 	 * the ring in the simulator.