[Intel-gfx] [PATCH 4/8] drm/i915: Make execlist port count variable

Chris Wilson chris at chris-wilson.co.uk
Tue Sep 12 08:55:24 UTC 2017


Quoting Mika Kuoppala (2017-09-12 09:36:14)
>  static inline void
>  execlist_port_complete(struct intel_engine_execlist * const el,
>                        struct execlist_port * const port)
>  {
> -       struct execlist_port * const port1 = &el->port[1];
> +       const unsigned int m = el->port_mask;
>  
>         GEM_DEBUG_BUG_ON(port_index(port, el) != 0);
>  
> -       *port = *port1;
> -       memset(port1, 0, sizeof(struct execlist_port));
> +       memmove(port, port + 1, m * sizeof(struct execlist_port));
> +       memset(port + m, 0, sizeof(struct execlist_port));

Ah I was going to suggest you keep the port[0] = port[1] in the earlier
patch, then remember there will be magic later on. But if we go through
this step, we may as not cut out the meander.
-Chris


More information about the Intel-gfx mailing list