aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_irq.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-04-12 12:12:02 -0700
committerEric Anholt <eric@anholt.net>2017-04-13 11:00:28 -0700
commitcdec4d3613230fc15723fae206cb17825b914cee (patch)
tree42ae87b98a310755a0dbb72bab88c66021ca486c /drivers/gpu/drm/vc4/vc4_irq.c
parentdrm/bridge: sii902x: Add missing \n to the end of some dev_err messages (diff)
downloadlinux-dev-cdec4d3613230fc15723fae206cb17825b914cee.tar.xz
linux-dev-cdec4d3613230fc15723fae206cb17825b914cee.zip
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>
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_irq.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_irq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c
index cdc6e6760705..1384af9fc987 100644
--- a/drivers/gpu/drm/vc4/vc4_irq.c
+++ b/drivers/gpu/drm/vc4/vc4_irq.c
@@ -142,6 +142,10 @@ vc4_irq_finish_render_job(struct drm_device *dev)
vc4->finished_seqno++;
list_move_tail(&exec->head, &vc4->job_done_list);
+ if (exec->fence) {
+ dma_fence_signal_locked(exec->fence);
+ exec->fence = NULL;
+ }
vc4_submit_next_render_job(dev);
wake_up_all(&vc4->job_wait_queue);