[Intel-gfx] [PATCH 2/2] intel: Add .aub file output support.

Yuanhan Liu yuanhan.liu at linux.intel.com
Fri Mar 9 04:53:06 CET 2012


On Thu, Mar 08, 2012 at 11:14:27AM -0800, Kenneth Graunke wrote:
> On 03/07/2012 06:51 PM, Yuanhan Liu wrote:
> >On Wed, Mar 07, 2012 at 11:21:07AM -0800, Eric Anholt wrote:
> >>From: Kenneth Graunke<kenneth at whitecape.org>
> >>
> >>This will allow the driver to capture all of its execution state to a
> >>file for later debugging.  intel_gpu_dump is limited in that it only
> >>captures batchbuffers, and Mesa's captures, while more complete, still
> >>capture only a portion of the state involved in execution.
> >>
> >>It also enables us to load traces in our internal simulator.
> >>
> >>Signed-off-by: Eric Anholt<eric at anholt.net>
> >>Signed-off-by: Yuanhan Liu<yuanhan.liu at linux.intel.com>
> >>Signed-off-by: Kenneth Graunke<kenneth at whitecape.org>
> >>---
> >>  intel/Makefile.am        |    1 +
> >>  intel/intel_aub.h        |  123 ++++++++++++++++++
> >>  intel/intel_bufmgr.h     |   14 ++
> >>  intel/intel_bufmgr_gem.c |  315 ++++++++++++++++++++++++++++++++++++++++++++++
> >>  4 files changed, 453 insertions(+), 0 deletions(-)
> >>  create mode 100644 intel/intel_aub.h
> >>
[snip]...
> >>+	/* MI_FLUSH enable */
> >>+	if (bufmgr_gem->gen>= 6) {
> >>+		aub_out(bufmgr_gem, CMD_AUB_TRACE_HEADER_BLOCK | (5 - 2));
> >>+		aub_out(bufmgr_gem, AUB_TRACE_OP_MMIO_WRITE);
> >>+		aub_out(bufmgr_gem, 0);
> >>+		aub_out(bufmgr_gem, 0x209c);  /* reg addr */
> >>+		aub_out(bufmgr_gem, 0x04);    /* Length in byte */
> >>+		aub_out(bufmgr_gem, ((1<<  12)<<  16) | (1<<  12));
> >>+	}
> >
> >Zhenyu and me came to an agreement that it's the driver side to do the
> >MI_FLUSH enable stuff. Since using MI_FLUSH is deprecated, and if you still
> >use it, it is your job to set up the MI_FLUSH enable bit.
> 
> Oh...yeah, we should definitely drop that.
> 
> >>+}
> >>+
> >>+/**
> >>   * Initializes the GEM buffer manager, which uses the kernel to allocate, map,
> >>   * and manage map buffer objections.
> >>   *
> >>--
> >>1.7.9.1
> 
> Otherwise,
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> 
> Please set yourself as the author, though - I just squashed this and
> fixed up a few minor things.

Eric wrote the original code, I just made it work. But, of course, feel
free to set it if you think it's a need ;)

Thanks,
Yuanhan Liu



More information about the Intel-gfx mailing list