drm/vc4: Expose dma-buf fences for V3D rendering.
authorEric Anholt <eric@anholt.net>
Wed, 12 Apr 2017 19:12:02 +0000 (12:12 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 13 Apr 2017 18:00:28 +0000 (11:00 -0700)
commitcdec4d3613230fc15723fae206cb17825b914cee
tree42ae87b98a310755a0dbb72bab88c66021ca486c
parentce9971ded5692fad3ecb4098376dcbc589ceae4c
drm/vc4: Expose dma-buf fences for V3D rendering.

This is needed for proper synchronization with display on another DRM
device (pl111 or tinydrm) with buffers produced by vc4 V3D.  Fixes the
new igt vc4_dmabuf_poll testcase, and rendering of one of the glmark2
desktop tests on pl111+vc4.

This doesn't yet introduce waits on another device's fences before
vc4's rendering/display, because I don't have testcases for them.

v2: Reuse dma_fence_free(), retitle commit message to clarify that
    it's not a full dma-buf fencing implementation yet.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170412191202.22740-6-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/vc4/Makefile
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_fence.c [new file with mode: 0644]
drivers/gpu/drm/vc4/vc4_gem.c
drivers/gpu/drm/vc4/vc4_irq.c