Re: [PATCH] drm/vc4: Release fence after signalling

2017-12-08 Thread Eric Anholt
Stefan Schake  writes:

> 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 

Your commit message was more detailed and had the fixes and link tags,
so I took yours over Maarten's.  Thanks, it's reviewed and applied to
-fixes.


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/vc4: Release fence after signalling

2017-12-02 Thread Chris Wilson
Quoting Stefan Schake (2017-12-02 17:40:39)
> 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 

Maarten wrote an identical patch,
20171130150253.17200-1-maarten.lankho...@linux.intel.com, if you could
coordinate between yourselves to deliver a reviewed patch to Eric that
would be great.
-Chris
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/vc4: Release fence after signalling

2017-12-02 Thread Stefan Schake
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 
---
 drivers/gpu/drm/vc4/vc4_gem.c | 4 +++-
 drivers/gpu/drm/vc4/vc4_irq.c | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index 6c32c89..6385409 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -888,8 +888,10 @@ struct vc4_hang_state {
/* If we got force-completed because of GPU reset rather than
 * through our IRQ handler, signal the fence now.
 */
-   if (exec->fence)
+   if (exec->fence) {
dma_fence_signal(exec->fence);
+   dma_fence_put(exec->fence);
+   }
 
if (exec->bo) {
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 61b2e53..26eddbb 100644
--- a/drivers/gpu/drm/vc4/vc4_irq.c
+++ b/drivers/gpu/drm/vc4/vc4_irq.c
@@ -139,6 +139,7 @@
list_move_tail(&exec->head, &vc4->job_done_list);
if (exec->fence) {
dma_fence_signal_locked(exec->fence);
+   dma_fence_put(exec->fence);
exec->fence = NULL;
}
vc4_submit_next_render_job(dev);
-- 
1.9.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel