aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQi Liu <[email protected]>2020-07-21 18:16:47 +0800
committerGerd Hoffmann <[email protected]>2020-08-07 13:55:54 +0200
commit8b6ec999b198b59ae61e86e70f5e9df73fe4754f (patch)
treef93e07c3ed1c26b76e0a41c1fed2b72dab384ab7
parentb5ac98cbb8e5e30c34ebc837d1e5a3982d2b5f5c (diff)
drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl()
We should put the reference count of the fence after calling virtio_gpu_cmd_submit(). So add the missing dma_fence_put(). Fixes: 2cd7b6f08bc4 ("drm/virtio: add in/out fence support for explicit synchronization") Co-developed-by: Xin He <[email protected]> Signed-off-by: Xin He <[email protected]> Signed-off-by: Qi Liu <[email protected]> Reviewed-by: Muchun Song <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Gerd Hoffmann <[email protected]>
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
index 5df722072ba0..19c5bc01eb79 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
@@ -179,6 +179,7 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
virtio_gpu_cmd_submit(vgdev, buf, exbuf->size,
vfpriv->ctx_id, buflist, out_fence);
+ dma_fence_put(&out_fence->f);
virtio_gpu_notify(vgdev);
return 0;