• Chris Wilson's avatar
    drm/i915: Disable EXEC_OBJECT_ASYNC when doing relocations · 611cdf36
    Chris Wilson authored
    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: 77ae9957 ("drm/i915: Enable userspace to opt-out of implicit fencing")
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Jason Ekstrand <jason@jlekstrand.net>
    Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
    (cherry picked from commit 071750e5)
    [danvet: Resolve conflicts, resolution reviewed by Tvrtko on irc.]
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    611cdf36
i915_gem_execbuffer.c 52.9 KB