drm/i915/gem: Check that the context wasn't closed during setup
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 3 Mar 2020 08:05:46 +0000 (08:05 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 3 Mar 2020 17:30:20 +0000 (17:30 +0000)
commit61231f6bd0565ad8539e425dc48d547702e40930
treeba8bbb911f6d5e44e14c05137a9bd82b36679064
parent373f27f24c19ad2629e636b699bc76965ca31e4d
drm/i915/gem: Check that the context wasn't closed during setup

As setup takes a long time, the user may close the context during the
construction of the execbuf. In order to make sure we correctly track
all outstanding work with non-persistent contexts, we need to serialise
the submission with the context closure and mop up any leaks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200303080546.1140508-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_request.c