mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
usb: gadget: uvc: prepare buffer with data offset for rockchip platform
For some Rockchip platforms (e.g. RV1106 UVC), it needs to get the offset in the plane which used for the start of data in the uvc buffer. Signed-off-by: William Wu <william.wu@rock-chips.com> Change-Id: I0144709f33b1d3ca955779be487134901468923f
This commit is contained in:
@@ -70,7 +70,11 @@ static int uvc_buffer_prepare(struct vb2_buffer *vb)
|
||||
return -ENODEV;
|
||||
|
||||
buf->state = UVC_BUF_STATE_QUEUED;
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
buf->mem = vb2_plane_vaddr(vb, 0) + vb2_plane_data_offset(vb, 0);
|
||||
#else
|
||||
buf->mem = vb2_plane_vaddr(vb, 0);
|
||||
#endif
|
||||
buf->length = vb2_plane_size(vb, 0);
|
||||
if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
buf->bytesused = 0;
|
||||
|
||||
Reference in New Issue
Block a user