Re: [Intel-gfx] [PATCH 4/5] drm/i915: Tidy workaround batch buffer emission

2017-02-16 Thread Tvrtko Ursulin
On 16/02/2017 13:28, Chris Wilson wrote: On Thu, Feb 16, 2017 at 01:23:51PM +, Tvrtko Ursulin wrote: On 16/02/2017 13:20, Chris Wilson wrote: On Thu, Feb 16, 2017 at 12:23:24PM +, Tvrtko Ursulin wrote: + /* +* Emit the two workaround batch buffers, recording the offset

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Tidy workaround batch buffer emission

2017-02-16 Thread Chris Wilson
On Thu, Feb 16, 2017 at 01:23:51PM +, Tvrtko Ursulin wrote: > > On 16/02/2017 13:20, Chris Wilson wrote: > >On Thu, Feb 16, 2017 at 12:23:24PM +, Tvrtko Ursulin wrote: > >>+ /* > >>+* Emit the two workaround batch buffers, recording the offset from the > >>+* start of the workaro

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Tidy workaround batch buffer emission

2017-02-16 Thread Tvrtko Ursulin
On 16/02/2017 13:20, Chris Wilson wrote: On Thu, Feb 16, 2017 at 12:23:24PM +, Tvrtko Ursulin wrote: + /* +* Emit the two workaround batch buffers, recording the offset from the +* start of the workaround batch buffer object for each and their +* respective siz

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Tidy workaround batch buffer emission

2017-02-16 Thread Chris Wilson
On Thu, Feb 16, 2017 at 12:23:24PM +, Tvrtko Ursulin wrote: > + /* > + * Emit the two workaround batch buffers, recording the offset from the > + * start of the workaround batch buffer object for each and their > + * respective sizes. > + */ > + for (i = 0; i < ARRAY

[Intel-gfx] [PATCH 4/5] drm/i915: Tidy workaround batch buffer emission

2017-02-16 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the "*batch++ = " style as in the ring emission for better readability and also simplify the logic a bit by consolidating the offset and size calculations and overflow checking. The latter is a programming error so it is not required to check for it after each write to th