i915: wait for fence in mmio_flip_work_func
authorAlex Goins <agoins@nvidia.com>
Thu, 26 Nov 2015 02:43:38 +0000 (18:43 -0800)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 3 Dec 2015 15:10:11 +0000 (16:10 +0100)
commitfd8e058a27f319d4560529d54bcbf8aec2d72017
tree1f7a76f36dfd82f853d7b01bbe8a9f27a5a709d4
parent6d65ba943a2d1e4292a07ca7ddb6c5138b9efa5d
i915: wait for fence in mmio_flip_work_func

If a buffer is backed by dmabuf, wait on its reservation object's exclusive
fence before flipping.

v2: First commit
v3: Remove object_name_lock acquire
v4: Move wait ahead of mark_page_flip_active
    Use crtc->primary->fb to get GEM object instead of pending_flip_obj
    use_mmio_flip() return true when exclusive fence is attached
    Wait only on exclusive fences, interruptible with no timeout
v5: Move wait from do_mmio_flip to mmio_flip_work_func
    Style tweaks to more closely match rest of file
v6: Change back to unintteruptible wait to match __i915_wait_request due to
    inability to properly handle interrupted wait.
    Warn on error code from waiting.
v7: No change
v8: Test for !reservation_object_signaled_rcu(test_all=FALSE) instead of
    obj->base.dma_buf->resv->fence_excl

Link: https://patchwork.kernel.org/patch/7704181/
Signed-off-by: Alex Goins <agoins@nvidia.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/i915/intel_display.c