drm/i915: Defer application of request banning to submission
As we currently do not check on submission whether the context is banned
in a timely manner it is possible for some requests to escape
cancellation after their parent context is banned. By moving the ban
into the request submission under the engine->timeline.lock, we
serialise it with the reset and setting of the context ban.
References: eb8d0f5af4
("drm/i915: Remove GPU reset dependence on struct_mutex")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190213182737.12695-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
This commit is contained in:
@ -366,6 +366,9 @@ void __i915_request_submit(struct i915_request *request)
|
||||
GEM_BUG_ON(!irqs_disabled());
|
||||
lockdep_assert_held(&engine->timeline.lock);
|
||||
|
||||
if (i915_gem_context_is_banned(request->gem_context))
|
||||
i915_request_skip(request, -EIO);
|
||||
|
||||
GEM_BUG_ON(request->global_seqno);
|
||||
|
||||
seqno = next_global_seqno(&engine->timeline);
|
||||
|
Reference in New Issue
Block a user