Quoting Mika Kuoppala (2017-10-19 15:39:42)
> From: Mika Kuoppala <mika.kuopp...@intel.com>
> 
> As all our access to execlist ports are through head and tail
> helpers, we can now move the head instead of memmoving the array.
> 
> Cc: Michał Winiarski <michal.winiar...@intel.com>
> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com>
> Cc: Chris Wilson <ch...@chris-wilson.co.uk>
> Signed-off-by: Mika Kuoppala <mika.kuopp...@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.h | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h 
> b/drivers/gpu/drm/i915/intel_ringbuffer.h
> index cfec73400d0f..27f5c42ae7c8 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> @@ -573,12 +573,13 @@ static inline void
>  execlists_port_complete(struct intel_engine_execlists * const execlists,
>                         struct execlist_port * const port)
>  {
> -       const unsigned int m = execlists->port_mask;
> +       GEM_BUG_ON(port_index(port, execlists) != execlists->port_head);
> +       GEM_BUG_ON(!port_isset(port));
>  
> -       GEM_BUG_ON(port_index(port, execlists) != 0);
> +       port->request_count = NULL;
> +       GEM_DEBUG_DECL(port->context_id = 0);
memset(port, 0, sizeof(*port));

In my ring, we no longer needed the memset, but the tradeoff is tracking
the last_port.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to