[Intel-gfx] [PATCH] drm/i915: Change context lifecycle

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 10 00:49:34 PST 2015


On Mon, Nov 09, 2015 at 04:18:20PM +0000, Nick Hoath wrote:
> Use the first retired request on a new context to unpin
> the old context. This ensures that the hw context remains
> bound until it has been saved.
> Now that the context is pinned until later in the request/context
> lifecycle, it no longer needs to be pinned from context_queue to
> retire_requests.
> The refcount on the context also has to be extended to cover this
> new longer period.

Still not right. You were closer with the active tracking. The code I
sent last year fixed this by unifying the pin/active tracking of legacy
and execlists by calling engine->pin_context() in i915_gem_request_alloc(),
and then in the request commit we released the pin on the
engine->last_context and replaced it with active tracking (or just unpinned
the new context in request cancel).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list