Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8061309 authored by Qi Liu's avatar Qi Liu Committed by Lee Jones
Browse files

BACKPORT: 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().

Bug: 254441685
Fixes: 2cd7b6f08bc4 ("drm/virtio: add in/out fence support for explicit synchronization")
Co-developed-by: default avatarXin He <hexin.op@bytedance.com>
Signed-off-by: default avatarXin He <hexin.op@bytedance.com>
Signed-off-by: default avatarQi Liu <liuqi.16@bytedance.com>
Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200721101647.42653-1-hexin.op@bytedance.com


Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 8b6ec999b198b59ae61e86e70f5e9df73fe4754f)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I5c7ab5a1895bae14a0e120372d27243dc6b0f6bf
parent 02c86d47
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -221,6 +221,7 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,

	virtio_gpu_cmd_submit(vgdev, buf, exbuf->size,
			      vfpriv->ctx_id, out_fence);
	dma_fence_put(&out_fence->f);

	ttm_eu_fence_buffer_objects(&ticket, &validate_list, &out_fence->f);