Re: UVC with continuous video buffers.

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

 



On Wed, Nov 2, 2011 at 11:49 AM, javier Martin
<javier.martin@xxxxxxxxxxxxxxxxx> wrote:
> Hi,
> we have a system with a UVC camera connected to USB to acquire video
> images and a hardware processor which needs continuous memory buffers
> to process them.
>
> I've been looking at the current version of UVC drivers and it seems
> it allocates buffers using vmalloc_32() call:
> http://lxr.linux.no/#linux+v3.1/drivers/media/video/uvc/uvc_queue.c#L135
>
> I am interested to extend the driver to support contiguous memory
> buffers and send it to mainline. What is the right way to achieve
> this? Can anyone please point me to a video driver example where
> continuous memory allocation is used?

I've actually got a very similar issue and have been looking into it
(an em28xx device on OMAP requiring contiguous physical memory for the
hardware H.264 encoder).  One thing you may definitely want to check
out is the patch sent earlier today with subject:

[PATCH] media: vb2: vmalloc-based allocator user pointer handling
				
While that patch is intended for videobuf2, you might be able to copy
the core logic into videobuf-vmalloc.

There are other drivers which use USERPTR provided buffers (which are
allocated as contiguous memory from userland [i.e. vfpe_capture
accepting buffers from cmemk on the OMAP platform]), but they
typically do DMA so it's not really useful as an example where you
have a USB based device.

If you get it working, by all means send the code to the ML so others
can benefit.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux