Re: [Intel-gfx] [PATCH 2/2] drm/i915: Consolidate gen8_emit_pipe_control

2017-02-16 Thread Chris Wilson
On Thu, Feb 16, 2017 at 07:53:13AM +, Tvrtko Ursulin wrote: > > On 15/02/2017 16:33, Chris Wilson wrote: > >On Wed, Feb 15, 2017 at 04:06:34PM +, Tvrtko Ursulin wrote: > >>+static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 > >>offset) > >>+{ > >>+ static const u32 pc6

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Consolidate gen8_emit_pipe_control

2017-02-15 Thread Tvrtko Ursulin
On 15/02/2017 16:33, Chris Wilson wrote: On Wed, Feb 15, 2017 at 04:06:34PM +, Tvrtko Ursulin wrote: +static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 offset) +{ + static const u32 pc6[6] = { GFX_OP_PIPE_CONTROL(6), 0, 0, 0, 0, 0 }; + + memcpy(batch, pc6, siz

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Consolidate gen8_emit_pipe_control

2017-02-15 Thread Chris Wilson
On Wed, Feb 15, 2017 at 04:06:34PM +, Tvrtko Ursulin wrote: > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c > b/drivers/gpu/drm/i915/intel_ringbuffer.c > index f7499829ecc2..a359527948b9 100644 > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c > +++ b/drivers/gpu/drm/i915/intel_ringbuffer

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Consolidate gen8_emit_pipe_control

2017-02-15 Thread Chris Wilson
On Wed, Feb 15, 2017 at 04:06:34PM +, Tvrtko Ursulin wrote: > +static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 offset) > +{ > + static const u32 pc6[6] = { GFX_OP_PIPE_CONTROL(6), 0, 0, 0, 0, 0 }; > + > + memcpy(batch, pc6, sizeof(pc6)); > + > + batch[1] = flags

[Intel-gfx] [PATCH 2/2] drm/i915: Consolidate gen8_emit_pipe_control

2017-02-15 Thread Tvrtko Ursulin
From: Tvrtko Ursulin We have a few open coded instances in the execlists code and an almost suitable helper in intel_ringbuf.c We can consolidate to a single helper if we change the existing helper to emit directly to ring buffer memory and move the space reservation outside it. Signed-off-by: