On 03/11/2015 05:36 AM, Chris Wilson wrote:
> Currently, we throttle before the user begins preparing commands for the
> next frame when we acquire the draw/read buffers. However, construction
> of the command buffer can itself take significant time relative to the
> frame time. If we move the throttle from the buffer acquire to the
> command submit phase we can allow the user to improve concurrency
> between the CPU and GPU (i.e. reduce the amount of time we waste inside
> the throttle).

Yes, more concurrency please. If Mesa is going to throttle, then throttling 
should
happen definitely immediately before submitting the batch, not immediately 
before
the user wants to use the cpu to build a new batch.

This patch solves my major complaint with the original patches you sent.
Reviewed-by: Chad Versace <chad.vers...@intel.com>

But... please fix the style conventions in my comments below. Either way,
my r-b still stands.

> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vet...@ffwll.ch>
> Cc: Kenneth Graunke <kenn...@whitecape.org>
> Cc: Ben Widawsky <b...@bwidawsk.net>
> Cc: Kristian Høgsberg <k...@bitplanet.net>
> Cc: Chad Versace <chad.vers...@linux.intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_context.c       | 34 ----------------------
>  src/mesa/drivers/dri/i965/intel_batchbuffer.c | 41 
> +++++++++++++++++++++++++++
>  2 files changed, 41 insertions(+), 34 deletions(-)
> 



> @@ -226,6 +229,43 @@ brw_finish_batch(struct brw_context *brw)
>     brw->cache.bo_used_by_gpu = true;
>  }
>  
> +static void throttle(struct brw_context *brw)

Convention in this file is:

static void
throttle(struct brw_context *brw)


>  static int
> @@ -260,6 +300,7 @@ do_flush_locked(struct brw_context *brw)
>        if (ret == 0) {
>           if (unlikely(INTEL_DEBUG & DEBUG_AUB))
>              brw_annotate_aub(brw);
> +      throttle(brw);
>        if (brw->hw_ctx == NULL || batch->ring != RENDER_RING) {
>           ret = drm_intel_bo_mrb_exec(batch->bo, 4 * batch->used, NULL, 0, 0,
>                                       flags);

Please put a newline above and below throttle(). Most i965 code is not so 
compact.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to