[Intel-gfx] [PATCH 1/6] drm/i915: mark the global default (intel_)context as such

Chris Wilson chris at chris-wilson.co.uk
Tue Dec 22 01:08:45 PST 2015


On Mon, Dec 21, 2015 at 04:04:40PM +0000, Dave Gordon wrote:
> Some of the LRC-specific context-destruction code has to special-case
> the global default context, bacause the HWSP is part of that context. At
> present it deduces it indirectly by checking for the backpointer from
> the engine to the context, but that's an unsafe assumption if the setup
> and teardown code is reorganised. (It could also test ctx->file_priv ==
> NULL, but again that's a detail that might be subject to change).
> 
> So here we explicitly flag the default context at the point of creation,
> and then reorganise the code in intel_lr_context_free() not to rely on
> the ring->default_pointer (still) being set up; to iterate over engines
> in reverse, as this is teardown code; and to reduce the nesting
> level so it's easier to read.

I still strongly disagree with the confusion inherent here.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list