Lines Matching refs:uvc_urb
1148 static int uvc_submit_urb(struct uvc_urb *uvc_urb, gfp_t mem_flags) in uvc_submit_urb() argument
1151 dma_sync_sgtable_for_device(uvc_stream_to_dmadev(uvc_urb->stream), in uvc_submit_urb()
1152 uvc_urb->sgt, in uvc_submit_urb()
1153 uvc_stream_dir(uvc_urb->stream)); in uvc_submit_urb()
1154 return usb_submit_urb(uvc_urb->urb, mem_flags); in uvc_submit_urb()
1165 struct uvc_urb *uvc_urb = container_of(work, struct uvc_urb, work); in uvc_video_copy_data_work() local
1169 for (i = 0; i < uvc_urb->async_operations; i++) { in uvc_video_copy_data_work()
1170 struct uvc_copy_op *op = &uvc_urb->copy_operations[i]; in uvc_video_copy_data_work()
1178 ret = uvc_submit_urb(uvc_urb, GFP_KERNEL); in uvc_video_copy_data_work()
1180 dev_err(&uvc_urb->stream->intf->dev, in uvc_video_copy_data_work()
1184 static void uvc_video_decode_data(struct uvc_urb *uvc_urb, in uvc_video_decode_data() argument
1187 unsigned int active_op = uvc_urb->async_operations; in uvc_video_decode_data()
1188 struct uvc_copy_op *op = &uvc_urb->copy_operations[active_op]; in uvc_video_decode_data()
1208 uvc_dbg(uvc_urb->stream->dev, FRAME, in uvc_video_decode_data()
1214 uvc_urb->async_operations++; in uvc_video_decode_data()
1392 static void uvc_video_decode_isoc(struct uvc_urb *uvc_urb, in uvc_video_decode_isoc() argument
1395 struct urb *urb = uvc_urb->urb; in uvc_video_decode_isoc()
1396 struct uvc_streaming *stream = uvc_urb->stream; in uvc_video_decode_isoc()
1426 uvc_video_decode_data(uvc_urb, buf, mem + ret, in uvc_video_decode_isoc()
1438 static void uvc_video_decode_bulk(struct uvc_urb *uvc_urb, in uvc_video_decode_bulk() argument
1441 struct urb *urb = uvc_urb->urb; in uvc_video_decode_bulk()
1442 struct uvc_streaming *stream = uvc_urb->stream; in uvc_video_decode_bulk()
1488 uvc_video_decode_data(uvc_urb, buf, mem, len); in uvc_video_decode_bulk()
1508 static void uvc_video_encode_bulk(struct uvc_urb *uvc_urb, in uvc_video_encode_bulk() argument
1511 struct urb *urb = uvc_urb->urb; in uvc_video_encode_bulk()
1512 struct uvc_streaming *stream = uvc_urb->stream; in uvc_video_encode_bulk()
1556 struct uvc_urb *uvc_urb = urb->context; in uvc_video_complete() local
1557 struct uvc_streaming *stream = uvc_urb->stream; in uvc_video_complete()
1598 uvc_urb->async_operations = 0; in uvc_video_complete()
1601 dma_sync_sgtable_for_cpu(uvc_stream_to_dmadev(uvc_urb->stream), in uvc_video_complete()
1602 uvc_urb->sgt, uvc_stream_dir(stream)); in uvc_video_complete()
1603 invalidate_kernel_vmap_range(uvc_urb->buffer, in uvc_video_complete()
1604 uvc_urb->stream->urb_size); in uvc_video_complete()
1610 stream->decode(uvc_urb, buf, buf_meta); in uvc_video_complete()
1613 if (!uvc_urb->async_operations) { in uvc_video_complete()
1614 ret = uvc_submit_urb(uvc_urb, GFP_ATOMIC); in uvc_video_complete()
1621 queue_work(stream->async_wq, &uvc_urb->work); in uvc_video_complete()
1630 struct uvc_urb *uvc_urb; in uvc_free_urb_buffers() local
1632 for_each_uvc_urb(uvc_urb, stream) { in uvc_free_urb_buffers()
1633 if (!uvc_urb->buffer) in uvc_free_urb_buffers()
1636 dma_vunmap_noncontiguous(dma_dev, uvc_urb->buffer); in uvc_free_urb_buffers()
1637 dma_free_noncontiguous(dma_dev, stream->urb_size, uvc_urb->sgt, in uvc_free_urb_buffers()
1640 uvc_urb->buffer = NULL; in uvc_free_urb_buffers()
1641 uvc_urb->sgt = NULL; in uvc_free_urb_buffers()
1648 struct uvc_urb *uvc_urb, gfp_t gfp_flags) in uvc_alloc_urb_buffer() argument
1652 uvc_urb->sgt = dma_alloc_noncontiguous(dma_dev, stream->urb_size, in uvc_alloc_urb_buffer()
1655 if (!uvc_urb->sgt) in uvc_alloc_urb_buffer()
1657 uvc_urb->dma = uvc_urb->sgt->sgl->dma_address; in uvc_alloc_urb_buffer()
1659 uvc_urb->buffer = dma_vmap_noncontiguous(dma_dev, stream->urb_size, in uvc_alloc_urb_buffer()
1660 uvc_urb->sgt); in uvc_alloc_urb_buffer()
1661 if (!uvc_urb->buffer) { in uvc_alloc_urb_buffer()
1663 uvc_urb->sgt, in uvc_alloc_urb_buffer()
1665 uvc_urb->sgt = NULL; in uvc_alloc_urb_buffer()
1705 struct uvc_urb *uvc_urb = &stream->uvc_urb[i]; in uvc_alloc_urb_buffers() local
1707 if (!uvc_alloc_urb_buffer(stream, uvc_urb, gfp_flags)) { in uvc_alloc_urb_buffers()
1712 uvc_urb->stream = stream; in uvc_alloc_urb_buffers()
1735 struct uvc_urb *uvc_urb; in uvc_video_stop_transfer() local
1744 for_each_uvc_urb(uvc_urb, stream) in uvc_video_stop_transfer()
1745 usb_poison_urb(uvc_urb->urb); in uvc_video_stop_transfer()
1749 for_each_uvc_urb(uvc_urb, stream) { in uvc_video_stop_transfer()
1750 usb_free_urb(uvc_urb->urb); in uvc_video_stop_transfer()
1751 uvc_urb->urb = NULL; in uvc_video_stop_transfer()
1792 struct uvc_urb *uvc_urb; in uvc_init_video_isoc() local
1806 for_each_uvc_urb(uvc_urb, stream) { in uvc_init_video_isoc()
1814 urb->context = uvc_urb; in uvc_init_video_isoc()
1818 urb->transfer_dma = uvc_urb->dma; in uvc_init_video_isoc()
1820 urb->transfer_buffer = uvc_urb->buffer; in uvc_init_video_isoc()
1830 uvc_urb->urb = urb; in uvc_init_video_isoc()
1844 struct uvc_urb *uvc_urb; in uvc_init_video_bulk() local
1869 for_each_uvc_urb(uvc_urb, stream) { in uvc_init_video_bulk()
1876 usb_fill_bulk_urb(urb, stream->dev->udev, pipe, uvc_urb->buffer, in uvc_init_video_bulk()
1877 size, uvc_video_complete, uvc_urb); in uvc_init_video_bulk()
1879 urb->transfer_dma = uvc_urb->dma; in uvc_init_video_bulk()
1881 uvc_urb->urb = urb; in uvc_init_video_bulk()
1895 struct uvc_urb *uvc_urb; in uvc_video_start_transfer() local
1990 for_each_uvc_urb(uvc_urb, stream) { in uvc_video_start_transfer()
1991 ret = uvc_submit_urb(uvc_urb, gfp_flags); in uvc_video_start_transfer()
1995 uvc_urb_index(uvc_urb), ret); in uvc_video_start_transfer()
2085 struct uvc_urb *uvc_urb; in uvc_video_init() local
2173 for_each_uvc_urb(uvc_urb, stream) in uvc_video_init()
2174 INIT_WORK(&uvc_urb->work, uvc_video_copy_data_work); in uvc_video_init()