diff options
author | Stefan Schake <stschake@gmail.com> | 2017-12-02 12:40:39 -0500 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2017-12-08 16:02:22 -0500 |
commit | babc8110057cb9ca542c3c1666cbda4e8ccf9250 (patch) | |
tree | fdb52bace4d24e5ff23d99f306c933df4a84e52f | |
parent | 90eeb3aa34831ff3d031589c0c24892eb8a07e51 (diff) |
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: cdec4d361323 ("drm/vc4: Expose dma-buf fences for V3D rendering.")
Signed-off-by: Stefan Schake <stschake@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1512236444-301-1-git-send-email-stschake@gmail.com
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_gem.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_irq.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index 6c32c89a83a9..638540943c61 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c | |||
@@ -888,8 +888,10 @@ vc4_complete_exec(struct drm_device *dev, struct vc4_exec_info *exec) | |||
888 | /* If we got force-completed because of GPU reset rather than | 888 | /* If we got force-completed because of GPU reset rather than |
889 | * through our IRQ handler, signal the fence now. | 889 | * through our IRQ handler, signal the fence now. |
890 | */ | 890 | */ |
891 | if (exec->fence) | 891 | if (exec->fence) { |
892 | dma_fence_signal(exec->fence); | 892 | dma_fence_signal(exec->fence); |
893 | dma_fence_put(exec->fence); | ||
894 | } | ||
893 | 895 | ||
894 | if (exec->bo) { | 896 | if (exec->bo) { |
895 | for (i = 0; i < exec->bo_count; i++) { | 897 | for (i = 0; i < exec->bo_count; i++) { |
diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c index 61b2e5377993..26eddbb62893 100644 --- a/drivers/gpu/drm/vc4/vc4_irq.c +++ b/drivers/gpu/drm/vc4/vc4_irq.c | |||
@@ -139,6 +139,7 @@ vc4_irq_finish_render_job(struct drm_device *dev) | |||
139 | list_move_tail(&exec->head, &vc4->job_done_list); | 139 | list_move_tail(&exec->head, &vc4->job_done_list); |
140 | if (exec->fence) { | 140 | if (exec->fence) { |
141 | dma_fence_signal_locked(exec->fence); | 141 | dma_fence_signal_locked(exec->fence); |
142 | dma_fence_put(exec->fence); | ||
142 | exec->fence = NULL; | 143 | exec->fence = NULL; |
143 | } | 144 | } |
144 | vc4_submit_next_render_job(dev); | 145 | vc4_submit_next_render_job(dev); |