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

Chris Wilson chris at chris-wilson.co.uk
Thu May 5 10:33:46 UTC 2016


On Thu, May 05, 2016 at 11:18:41AM +0100, Tvrtko Ursulin wrote:
> 
> Hi,
> 
> On 05/05/16 10:15, 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
> >together.
> >v3: Sanitize the engine's IMR to disable any potential interrupt before
> >we are ready (enabled in init_hw).
> 
> Same as before - I don't like hardware access in this code path
> since we otherwise have it split into a later init_hw phase. And I
> don't like engine->dev being used for intel_engine_initialized.

I think you raised a good point on the last round! It is an oversight
that we have not explicitly sanitized the per-engine registers as is our
mo. This gives us the symmetry with the init_hw phase where they are
enabled.

> On retrospect, interrupt vs engine->irq_queue race is already there
> now, for the render ring at least. So maybe just drop the IMR bit
> which would make the patch pure refactoring and can have my R-b
> then.

And this closes a race with a potential interrupt pending from takeover.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list