]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Disable EXEC_OBJECT_ASYNC when doing relocations
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 16 Jun 2017 14:05:18 +0000 (15:05 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 26 Jun 2017 08:43:26 +0000 (10:43 +0200)
commit0b37c3ed929fc4d664f7b46570d881b21e0c92f0
treeb25b091e31a3c8725a78a64356c3c32dac7d8f21
parent77841f7848c84cc988cd815216bfcd875bab6c58
drm/i915: Disable EXEC_OBJECT_ASYNC when doing relocations

If we write a relocation into the buffer, we require our own implicit
synchronisation added after the start of the execbuf, outside of the
user's control. As we may end up clflushing, or doing the patch itself
on the GPU, asynchronously we need to look at the implicit serialisation
on obj->resv and hence need to disable EXEC_OBJECT_ASYNC for this
object.

If the user does trigger a stall for relocations, we make sure the stall
is complete enough so that the batch is not submitted before we complete
those relocations.

Fixes: f71f6eb5b3e0 ("drm/i915: Enable userspace to opt-out of implicit fencing")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
(cherry picked from commit 071750e550af46b5d3a84ad56c2a108c3e136284)
[danvet: Resolve conflicts, resolution reviewed by Tvrtko on irc.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_execbuffer.c