From: Xu Yang <xu.yang_2@nxp.com>
To: gregkh@linuxfoundation.org, stern@rowland.harvard.edu,
laurent.pinchart@ideasonboard.com, hdegoede@redhat.com,
mchehab@kernel.org, jeff.johnson@oss.qualcomm.com
Cc: linux-media@vger.kernel.org, linux-usb@vger.kernel.org,
jun.li@nxp.com, imx@lists.linux.dev
Subject: [PATCH 2/2] media: uvcvideo: add URB_USBMON_NEED_SYNC urb flag
Date: Sat, 14 Jun 2025 21:24:46 +0800 [thread overview]
Message-ID: <20250614132446.251218-2-xu.yang_2@nxp.com> (raw)
In-Reply-To: <20250614132446.251218-1-xu.yang_2@nxp.com>
Since commit "20e1dbf2bbe2 media: uvcvideo: Use dma_alloc_noncontiguous
API", the driver is allocating non-coherent buffer for urb. This will
add URB_USBMON_NEED_SYNC flag to inform usb monitor needs do dma sync
when record data.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
drivers/media/usb/uvc/uvc_video.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index e3567aeb0007..446b3f16545d 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1946,7 +1946,8 @@ static int uvc_init_video_isoc(struct uvc_streaming *stream,
urb->context = uvc_urb;
urb->pipe = usb_rcvisocpipe(stream->dev->udev,
ep->desc.bEndpointAddress);
- urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
+ urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP |
+ URB_USBMON_NEED_SYNC;
urb->transfer_dma = uvc_urb->dma;
urb->interval = ep->desc.bInterval;
urb->transfer_buffer = uvc_urb->buffer;
--
2.34.1
next prev parent reply other threads:[~2025-06-14 13:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-14 13:24 [PATCH 1/2] usbmon: do dma sync for cpu read if the buffer is not dma coherent Xu Yang
2025-06-14 13:24 ` Xu Yang [this message]
2025-06-16 13:43 ` [PATCH 2/2] media: uvcvideo: add URB_USBMON_NEED_SYNC urb flag Hans de Goede
2025-06-14 14:16 ` [PATCH 1/2] usbmon: do dma sync for cpu read if the buffer is not dma coherent Laurent Pinchart
2025-06-16 14:20 ` Alan Stern
2025-06-27 3:13 ` Xu Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250614132446.251218-2-xu.yang_2@nxp.com \
--to=xu.yang_2@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=imx@lists.linux.dev \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=jun.li@nxp.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox