Re: [Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-02 Thread Chris Wilson
On Tue, Aug 02, 2016 at 10:42:47AM +0100, Dave Gordon wrote: > On 01/08/16 17:32, Chris Wilson wrote: > >On Mon, Aug 01, 2016 at 05:28:34PM +0300, Joonas Lahtinen wrote: > >>On ma, 2016-08-01 at 11:15 +0100, Chris Wilson wrote: > >>>On Mon, Aug 01, 2016 at 01:07:55PM +0300, Joonas Lahtinen wrote: >

Re: [Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-02 Thread Dave Gordon
On 01/08/16 17:32, Chris Wilson wrote: On Mon, Aug 01, 2016 at 05:28:34PM +0300, Joonas Lahtinen wrote: On ma, 2016-08-01 at 11:15 +0100, Chris Wilson wrote: On Mon, Aug 01, 2016 at 01:07:55PM +0300, Joonas Lahtinen wrote: On ma, 2016-08-01 at 10:10 +0100, Chris Wilson wrote: Space reservat

Re: [Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-01 Thread Chris Wilson
On Mon, Aug 01, 2016 at 05:28:34PM +0300, Joonas Lahtinen wrote: > On ma, 2016-08-01 at 11:15 +0100, Chris Wilson wrote: > > On Mon, Aug 01, 2016 at 01:07:55PM +0300, Joonas Lahtinen wrote: > > > > > > On ma, 2016-08-01 at 10:10 +0100, Chris Wilson wrote: > > > > > > > > Space reservation is alre

Re: [Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-01 Thread Chris Wilson
On Mon, Aug 01, 2016 at 05:17:51PM +0100, Chris Wilson wrote: > Following that reasoning, if we just: > > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c > b/drivers/gpu/drm/i915/intel_ringbuffer.c > index 15acaf6..d54c210 100644 > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c > +++ b/driver

Re: [Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-01 Thread Chris Wilson
On Mon, Aug 01, 2016 at 05:28:34PM +0300, Joonas Lahtinen wrote: > On ma, 2016-08-01 at 11:15 +0100, Chris Wilson wrote: > > On Mon, Aug 01, 2016 at 01:07:55PM +0300, Joonas Lahtinen wrote: > > > > > > On ma, 2016-08-01 at 10:10 +0100, Chris Wilson wrote: > > > > > > > > Space reservation is alre

Re: [Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-01 Thread Joonas Lahtinen
On ma, 2016-08-01 at 11:15 +0100, Chris Wilson wrote: > On Mon, Aug 01, 2016 at 01:07:55PM +0300, Joonas Lahtinen wrote: > > > > On ma, 2016-08-01 at 10:10 +0100, Chris Wilson wrote: > > > > > > Space reservation is already safe with respect to the ring->size > > > modulus, but hardware only expe

Re: [Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-01 Thread Chris Wilson
On Mon, Aug 01, 2016 at 01:07:55PM +0300, Joonas Lahtinen wrote: > On ma, 2016-08-01 at 10:10 +0100, Chris Wilson wrote: > > Space reservation is already safe with respect to the ring->size > > modulus, but hardware only expects to see values in the range > > 0...ring->size-1 (inclusive) and so req

Re: [Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-01 Thread Chris Wilson
On Mon, Aug 01, 2016 at 01:07:55PM +0300, Joonas Lahtinen wrote: > On ma, 2016-08-01 at 10:10 +0100, Chris Wilson wrote: > > Space reservation is already safe with respect to the ring->size > > modulus, but hardware only expects to see values in the range > > 0...ring->size-1 (inclusive) and so req

Re: [Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-01 Thread Joonas Lahtinen
On ma, 2016-08-01 at 10:10 +0100, Chris Wilson wrote: > Space reservation is already safe with respect to the ring->size > modulus, but hardware only expects to see values in the range > 0...ring->size-1 (inclusive) and so requires the modulus to prevent us > writing the value ring->size instead of

[Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

2016-08-01 Thread Chris Wilson
Space reservation is already safe with respect to the ring->size modulus, but hardware only expects to see values in the range 0...ring->size-1 (inclusive) and so requires the modulus to prevent us writing the value ring->size instead of 0. As this is only required for the register itself, we can d