Re: usb video capture issue due to uvc_complete callback spends more time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Mar 28, 2013 at 08:53:03PM +0800, Ming Lei wrote:
> On Thu, Mar 28, 2013 at 8:30 PM, B, Ravi <ravibabu@xxxxxx> wrote:
> >
> > For example, in one iteration I have observed, the time taken by
> > uvc_video_decode_isoc() was 2175 usec. In this maximum amount of
> > time was consumed by uvc_video_decode_data() around 1792 usec.
> 
> uvc_video_decode_data() is basically a memcpy() from coherent buffer to
> normal buffer.

if that's the case, this should show, right ?

diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index 3394c34..fdba0b7 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1490,12 +1490,7 @@ static int uvc_init_video_isoc(struct uvc_streaming *stream,
 		urb->context = stream;
 		urb->pipe = usb_rcvisocpipe(stream->dev->udev,
 				ep->desc.bEndpointAddress);
-#ifndef CONFIG_DMA_NONCOHERENT
-		urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
-		urb->transfer_dma = stream->urb_dma[i];
-#else
 		urb->transfer_flags = URB_ISO_ASAP;
-#endif
 		urb->interval = ep->desc.bInterval;
 		urb->transfer_buffer = stream->urb_buffer[i];
 		urb->complete = uvc_video_complete;
@@ -1555,10 +1550,6 @@ static int uvc_init_video_bulk(struct uvc_streaming *stream,
 		usb_fill_bulk_urb(urb, stream->dev->udev, pipe,
 			stream->urb_buffer[i], size, uvc_video_complete,
 			stream);
-#ifndef CONFIG_DMA_NONCOHERENT
-		urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
-		urb->transfer_dma = stream->urb_dma[i];
-#endif
 
 		stream->urb[i] = urb;
 	}

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux