All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott D Phillips <scott.d.phillips@intel.com>
To: Jordan Justen <jordan.l.justen@intel.com>,
	IGT GPU Tools <igt-dev@lists.freedesktop.org>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Subject: Re: [igt-dev] [PATCH i-g-t 3/6] aubdump: For gen10+ support addresses up to 4GB
Date: Wed, 21 Feb 2018 16:58:16 -0800	[thread overview]
Message-ID: <877er53knr.fsf@intel.com> (raw)
In-Reply-To: <20180221231905.15580-3-jordan.l.justen@intel.com>

Jordan Justen <jordan.l.justen@intel.com> writes:

> For gen10, we now add mappings for buffers as they are needed.
>
> Instead of doing this dynamically, we could always map the entire 4GB.
> With 4KB pages, the tables would take up 8MB in every AUB. AUBs are
> often quite huge compared to 8MB, but they can also be just a few
> hundred KB.
>
> This should allow the AUB to create up to about 4GB of allocated
> buffers, whereas before we were limited to about 64MB.
>
> While it is unlikely that we'll try to capture AUBs that generate
> buffers up to 4GB in size, this change also should allow pinned
> buffers to be used anywhere in the first 4GB. (I tested a pinned
> buffer at 0xf0000000.)

Will we need to do PIPE_CONTROL with TLB Invalidate as entries get added
for the simulator to do the right thing with the generated file?

> Cc: Scott D Phillips <scott.d.phillips@intel.com>
> Cc: Kenneth Graunke <kenneth@whitecape.org>
> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
> ---
>  tools/aubdump.c | 20 ++++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/tools/aubdump.c b/tools/aubdump.c
> index 661509e3..560aa50f 100644
> --- a/tools/aubdump.c
> +++ b/tools/aubdump.c
> @@ -484,6 +484,12 @@ gen8_map_range(uint64_t start, uint64_t end)
>  	}
>  }
>  
> +static void
> +gen8_map_base_size(uint64_t base, uint64_t size)
> +{
> +	gen8_map_range(base, base + size);
> +}
> +
>  static void
>  gen10_write_header(void)
>  {
> @@ -504,15 +510,16 @@ gen10_write_header(void)
>  	dword_out(0);		/* version */
>  	data_out(app_name, app_name_len);
>  
> -	gen8_map_range(0, MEMORY_MAP_SIZE);
> -
>  	/* RENDER_RING */
> +	gen8_map_base_size(RENDER_RING_ADDR, RING_SIZE);
>  	mem_trace_memory_write_header_out(RENDER_RING_ADDR, RING_SIZE,
>  					  AUB_MEM_TRACE_MEMORY_ADDRESS_SPACE_LOCAL);
>  	for (uint32_t i = 0; i < RING_SIZE; i += sizeof(uint32_t))
>  		dword_out(0);
>  
>  	/* RENDER_PPHWSP */
> +	gen8_map_base_size(RENDER_CONTEXT_ADDR,
> +	                   PPHWSP_SIZE + sizeof(render_context_init));
>  	mem_trace_memory_write_header_out(RENDER_CONTEXT_ADDR,
>  					  PPHWSP_SIZE +
>  					  sizeof(render_context_init),
> @@ -524,12 +531,15 @@ gen10_write_header(void)
>  	data_out(render_context_init, sizeof(render_context_init));
>  
>  	/* BLITTER_RING */
> +	gen8_map_base_size(BLITTER_RING_ADDR, RING_SIZE);
>  	mem_trace_memory_write_header_out(BLITTER_RING_ADDR, RING_SIZE,
>  					  AUB_MEM_TRACE_MEMORY_ADDRESS_SPACE_LOCAL);
>  	for (uint32_t i = 0; i < RING_SIZE; i += sizeof(uint32_t))
>  		dword_out(0);
>  
>  	/* BLITTER_PPHWSP */
> +	gen8_map_base_size(BLITTER_CONTEXT_ADDR,
> +	                   PPHWSP_SIZE + sizeof(blitter_context_init));
>  	mem_trace_memory_write_header_out(BLITTER_CONTEXT_ADDR,
>  					  PPHWSP_SIZE +
>  					  sizeof(blitter_context_init),
> @@ -541,12 +551,15 @@ gen10_write_header(void)
>  	data_out(blitter_context_init, sizeof(blitter_context_init));
>  
>  	/* VIDEO_RING */
> +	gen8_map_base_size(VIDEO_RING_ADDR, RING_SIZE);
>  	mem_trace_memory_write_header_out(VIDEO_RING_ADDR, RING_SIZE,
>  					  AUB_MEM_TRACE_MEMORY_ADDRESS_SPACE_LOCAL);
>  	for (uint32_t i = 0; i < RING_SIZE; i += sizeof(uint32_t))
>  		dword_out(0);
>  
>  	/* VIDEO_PPHWSP */
> +	gen8_map_base_size(VIDEO_CONTEXT_ADDR,
> +	                   PPHWSP_SIZE + sizeof(video_context_init));
>  	mem_trace_memory_write_header_out(VIDEO_CONTEXT_ADDR,
>  					  PPHWSP_SIZE +
>  					  sizeof(video_context_init),
> @@ -936,6 +949,9 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
>  		if (bo->map == NULL && bo->size > 0)
>  			bo->map = gem_mmap(fd, obj->handle, 0, bo->size);
>  		fail_if(bo->map == MAP_FAILED, "intel_aubdump: bo mmap failed\n");
> +
> +		if (gen >= 10)
> +			gen8_map_range(bo->offset, bo->offset + bo->size);
>  	}
>  
>  	batch_index = (execbuffer2->flags & I915_EXEC_BATCH_FIRST) ? 0 :
> -- 
> 2.16.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-02-22  0:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 23:19 [igt-dev] [PATCH i-g-t 1/6] aubdump: Add gen8_map_range Jordan Justen
2018-02-21 23:19 ` [igt-dev] [PATCH i-g-t 2/6] aubdump: Add bitmap to track gtt pages that have been mapped Jordan Justen
2018-02-22  0:52   ` Scott D Phillips
2018-02-21 23:19 ` [igt-dev] [PATCH i-g-t 3/6] aubdump: For gen10+ support addresses up to 4GB Jordan Justen
2018-02-22  0:58   ` Scott D Phillips [this message]
2018-02-22  1:49     ` Jordan Justen
2018-02-21 23:19 ` [igt-dev] [PATCH i-g-t 4/6] aubdump: Support alignment of BO in execbuffer2 Jordan Justen
2018-02-21 23:19 ` [igt-dev] [PATCH i-g-t 5/6] aubdump: Note pinned BO in verbose output Jordan Justen
2018-02-21 23:19 ` [igt-dev] [PATCH i-g-t 6/6] aubdump: Signal drm sync objects when device override is used Jordan Justen
2018-02-22  1:03   ` Scott D Phillips
2018-02-22  1:06   ` Jason Ekstrand
2018-02-22  0:34 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] aubdump: Add gen8_map_range Patchwork
2018-02-22  0:43 ` [igt-dev] [PATCH i-g-t 1/6] " Scott D Phillips
2018-02-22  5:24 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/6] " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877er53knr.fsf@intel.com \
    --to=scott.d.phillips@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jordan.l.justen@intel.com \
    --cc=kenneth@whitecape.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.