Commit babc8110 authored by Stefan Schake's avatar Stefan Schake Committed by Eric Anholt

drm/vc4: Release fence after signalling

We were never releasing the initial fence reference that is obtained
through dma_fence_init.

Link: https://github.com/anholt/linux/issues/122
Fixes: cdec4d36 ("drm/vc4: Expose dma-buf fences for V3D rendering.")
Signed-off-by: default avatarStefan Schake <stschake@gmail.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1512236444-301-1-git-send-email-stschake@gmail.com
parent 90eeb3aa
...@@ -888,8 +888,10 @@ vc4_complete_exec(struct drm_device *dev, struct vc4_exec_info *exec) ...@@ -888,8 +888,10 @@ vc4_complete_exec(struct drm_device *dev, struct vc4_exec_info *exec)
/* If we got force-completed because of GPU reset rather than /* If we got force-completed because of GPU reset rather than
* through our IRQ handler, signal the fence now. * through our IRQ handler, signal the fence now.
*/ */
if (exec->fence) if (exec->fence) {
dma_fence_signal(exec->fence); dma_fence_signal(exec->fence);
dma_fence_put(exec->fence);
}
if (exec->bo) { if (exec->bo) {
for (i = 0; i < exec->bo_count; i++) { for (i = 0; i < exec->bo_count; i++) {
......
...@@ -139,6 +139,7 @@ vc4_irq_finish_render_job(struct drm_device *dev) ...@@ -139,6 +139,7 @@ vc4_irq_finish_render_job(struct drm_device *dev)
list_move_tail(&exec->head, &vc4->job_done_list); list_move_tail(&exec->head, &vc4->job_done_list);
if (exec->fence) { if (exec->fence) {
dma_fence_signal_locked(exec->fence); dma_fence_signal_locked(exec->fence);
dma_fence_put(exec->fence);
exec->fence = NULL; exec->fence = NULL;
} }
vc4_submit_next_render_job(dev); vc4_submit_next_render_job(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment