drm/i915: Defer application of request banning to submission
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Feb 2019 18:27:37 +0000 (18:27 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 15 Feb 2019 12:59:26 +0000 (12:59 +0000)
commitd9e61b66a5d305bbf052a70a853b3be680d911ba
tree844fd1334d53b561bb00b687167f31467b4af698
parentc836eb79c033c2be13aa8b41729b28d2ab1f72ab
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: eb8d0f5af4ec ("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>
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/i915_reset.c