[Intel-gfx] [CI 10/21] drm/i915: Add hooks for (per-engine) context allocation/update/free
Chris Wilson
chris at chris-wilson.co.uk
Wed Aug 29 20:44:19 UTC 2018
Quoting Michal Wajdeczko (2018-08-29 20:36:23)
> In upcoming GuC patch we will require notification per engine context
> allocation/update/free to correctly setup GuC stage descriptors.
I'm cringing at this. I've a plan that is basically to do
ce = engine->context_create(engine, gem_context); or _get();
...
rq = i915_request_alloc(ce);
...
/* implicit ce->put(), ownership transferred to rq */
So you already own both the alloc/destroy ops, and we can take control
of engine->context_pin as well for the update hook. Doubling up on them
seems silly.
-Chris
More information about the Intel-gfx
mailing list