]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Asynchronous cmdparser
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Dec 2019 23:08:57 +0000 (23:08 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 12 Dec 2019 10:43:06 +0000 (10:43 +0000)
commit686c7c35abc2201535e6921f9f5610a0b3c9194a
treefeede8d20b85ffb1e666e696c74aa29f679fb8b2
parent32d94048b988469f8bd62cdc6d934f9f58c2b7c5
drm/i915/gem: Asynchronous cmdparser

Execute the cmdparser asynchronously as part of the submission pipeline.
Using our dma-fences, we can schedule execution after an asynchronous
piece of work, so we move the cmdparser out from under the struct_mutex
inside execbuf as run it as part of the submission pipeline. The same
security rules apply, we copy the user batch before validation and
userspace cannot touch the validation shadow. The only caveat is that we
will do request construction before we complete cmdparsing and so we
cannot know the outcome of the validation step until later -- so the
execbuf ioctl does not report -EINVAL directly, but we must cancel
execution of the request and flag the error on the out-fence.

Closes: https://gitlab.freedesktop.org/drm/intel/issues/611
Closes: https://gitlab.freedesktop.org/drm/intel/issues/412
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191211230858.599030-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_cmd_parser.c