mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
media: uvcvideo: Enable VB2_DMABUF for metadata stream
The UVC driver has two video streams, one for the frames and another one
for the metadata. Both streams share most of the codebase, but only the
data stream declares support for DMABUF transfer mode.
I have tried the DMABUF transfer mode with CONFIG_DMABUF_HEAPS_SYSTEM
and the frames looked correct.
This patch announces the support for DMABUF for the metadata stream.
This is useful for apps/HALs that only want to support DMABUF.
Cc: stable@vger.kernel.org
Fixes: 088ead2552 ("media: uvcvideo: Add a metadata device node")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Link: https://patch.msgid.link/20260309-uvc-metadata-dmabuf-v1-1-fc8b87bd29c5@chromium.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
882ac913e6
commit
fbac03467e
|
|
@ -243,7 +243,7 @@ int uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type)
|
|||
int ret;
|
||||
|
||||
queue->queue.type = type;
|
||||
queue->queue.io_modes = VB2_MMAP | VB2_USERPTR;
|
||||
queue->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
|
||||
queue->queue.drv_priv = queue;
|
||||
queue->queue.buf_struct_size = sizeof(struct uvc_buffer);
|
||||
queue->queue.mem_ops = &vb2_vmalloc_memops;
|
||||
|
|
@ -256,7 +256,6 @@ int uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type)
|
|||
queue->queue.ops = &uvc_meta_queue_qops;
|
||||
break;
|
||||
default:
|
||||
queue->queue.io_modes |= VB2_DMABUF;
|
||||
queue->queue.ops = &uvc_queue_qops;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user