Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-05-10 Thread Chris Wilson
On Tue, May 10, 2016 at 09:46:05AM +0200, Daniel Vetter wrote: > On Mon, May 09, 2016 at 11:41:41AM +0100, Chris Wilson wrote: > > On Mon, May 09, 2016 at 09:58:20AM +0200, Daniel Vetter wrote: > > > On Mon, May 09, 2016 at 08:45:16AM +0100, Chris Wilson wrote: > > > > This is sanitize. We do enabl

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-05-10 Thread Daniel Vetter
On Mon, May 09, 2016 at 11:41:41AM +0100, Chris Wilson wrote: > On Mon, May 09, 2016 at 09:58:20AM +0200, Daniel Vetter wrote: > > On Mon, May 09, 2016 at 08:45:16AM +0100, Chris Wilson wrote: > > > This is sanitize. We do enable it in engine->init_hw(), but the point > > > raised by Ville earlier

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-05-09 Thread Chris Wilson
On Mon, May 09, 2016 at 09:58:20AM +0200, Daniel Vetter wrote: > On Mon, May 09, 2016 at 08:45:16AM +0100, Chris Wilson wrote: > > This is sanitize. We do enable it in engine->init_hw(), but the point > > raised by Ville earlier in his review of GT irq handling is that nobody > > currently disables

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-05-09 Thread Daniel Vetter
On Mon, May 09, 2016 at 08:45:16AM +0100, Chris Wilson wrote: > On Mon, May 09, 2016 at 09:02:33AM +0200, Daniel Vetter wrote: > > On Mon, May 02, 2016 at 11:58:38AM +0100, Chris Wilson wrote: > > > On Mon, May 02, 2016 at 10:51:31AM +0200, Daniel Vetter wrote: > > > > Imo the low-level irq clearin

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-05-09 Thread Chris Wilson
On Mon, May 09, 2016 at 09:02:33AM +0200, Daniel Vetter wrote: > On Mon, May 02, 2016 at 11:58:38AM +0100, Chris Wilson wrote: > > On Mon, May 02, 2016 at 10:51:31AM +0200, Daniel Vetter wrote: > > > Imo the low-level irq clearing should all be done in the relevant irq > > > setup code in i915_irq.

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-05-09 Thread Daniel Vetter
On Mon, May 02, 2016 at 11:58:38AM +0100, Chris Wilson wrote: > On Mon, May 02, 2016 at 10:51:31AM +0200, Daniel Vetter wrote: > > Imo the low-level irq clearing should all be done in the relevant irq > > setup code in i915_irq.c. Atm we just forgot to do that. I guess you can > > have a bikeshed w

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-05-02 Thread Chris Wilson
On Mon, May 02, 2016 at 10:51:31AM +0200, Daniel Vetter wrote: > Imo the low-level irq clearing should all be done in the relevant irq > setup code in i915_irq.c. Atm we just forgot to do that. I guess you can > have a bikeshed whether the enginer IMR enable/disable functions should be > together w

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-05-02 Thread Daniel Vetter
On Fri, Apr 29, 2016 at 11:22:59AM +0100, Chris Wilson wrote: > On Fri, Apr 29, 2016 at 11:11:20AM +0100, Tvrtko Ursulin wrote: > > > > On 29/04/16 11:00, Chris Wilson wrote: > > >On Fri, Apr 29, 2016 at 10:50:02AM +0100, Tvrtko Ursulin wrote: > > >> > > >>On 29/04/16 10:39, Chris Wilson wrote: >

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-29 Thread Chris Wilson
On Fri, Apr 29, 2016 at 11:11:20AM +0100, Tvrtko Ursulin wrote: > > On 29/04/16 11:00, Chris Wilson wrote: > >On Fri, Apr 29, 2016 at 10:50:02AM +0100, Tvrtko Ursulin wrote: > >> > >>On 29/04/16 10:39, Chris Wilson wrote: > >>>On Fri, Apr 29, 2016 at 10:25:41AM +0100, Tvrtko Ursulin wrote: > O

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-29 Thread Tvrtko Ursulin
On 29/04/16 11:00, Chris Wilson wrote: On Fri, Apr 29, 2016 at 10:50:02AM +0100, Tvrtko Ursulin wrote: On 29/04/16 10:39, Chris Wilson wrote: On Fri, Apr 29, 2016 at 10:25:41AM +0100, Tvrtko Ursulin wrote: On 29/04/16 10:15, Chris Wilson wrote: diff --git a/drivers/gpu/drm/i915/intel_lrc.c

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-29 Thread Chris Wilson
On Fri, Apr 29, 2016 at 10:50:02AM +0100, Tvrtko Ursulin wrote: > > On 29/04/16 10:39, Chris Wilson wrote: > >On Fri, Apr 29, 2016 at 10:25:41AM +0100, Tvrtko Ursulin wrote: > >>On 29/04/16 10:15, Chris Wilson wrote: > >>>diff --git a/drivers/gpu/drm/i915/intel_lrc.c > >>>b/drivers/gpu/drm/i915/i

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-29 Thread Tvrtko Ursulin
On 29/04/16 10:39, Chris Wilson wrote: On Fri, Apr 29, 2016 at 10:25:41AM +0100, Tvrtko Ursulin wrote: On 29/04/16 10:15, Chris Wilson wrote: diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 2e0eaa9fa240..2c94072ab085 100644 --- a/drivers/gpu/drm/i915/inte

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-29 Thread Chris Wilson
On Fri, Apr 29, 2016 at 10:25:41AM +0100, Tvrtko Ursulin wrote: > Not the most elegant because all the hw access we have so far is in > engine->init_hw. Why can't we just make intel_engine_initialized > return false until the very last thing in engine constructors? The other thing I've been mullin

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-29 Thread Chris Wilson
On Fri, Apr 29, 2016 at 10:25:41AM +0100, Tvrtko Ursulin wrote: > On 29/04/16 10:15, Chris Wilson wrote: > >diff --git a/drivers/gpu/drm/i915/intel_lrc.c > >b/drivers/gpu/drm/i915/intel_lrc.c > >index 2e0eaa9fa240..2c94072ab085 100644 > >--- a/drivers/gpu/drm/i915/intel_lrc.c > >+++ b/drivers/gpu/

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-29 Thread Tvrtko Ursulin
On 29/04/16 10:15, Chris Wilson wrote: On Fri, Apr 29, 2016 at 10:04:35AM +0100, Tvrtko Ursulin wrote: On 28/04/16 18:35, Chris Wilson wrote: Move all of the constant assignments up front and into a common function. This is primarily to ensure the backpointers are set as early as possible for

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-29 Thread Chris Wilson
On Fri, Apr 29, 2016 at 10:04:35AM +0100, Tvrtko Ursulin wrote: > > On 28/04/16 18:35, Chris Wilson wrote: > >Move all of the constant assignments up front and into a common > >function. This is primarily to ensure the backpointers are set as early > >as possible for later use during initialisatio

Re: [Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-29 Thread Tvrtko Ursulin
On 28/04/16 18:35, Chris Wilson wrote: Move all of the constant assignments up front and into a common function. This is primarily to ensure the backpointers are set as early as possible for later use during initialisation. v2: Use a constant struct so that all the similar values are set togeth

[Intel-gfx] [PATCH v2] drm/i915/execlists: Refactor common engine setup

2016-04-28 Thread Chris Wilson
Move all of the constant assignments up front and into a common function. This is primarily to ensure the backpointers are set as early as possible for later use during initialisation. v2: Use a constant struct so that all the similar values are set together. Signed-off-by: Chris Wilson Cc: Tvrt