> > - V4L2_MEMORY_USERPTR allows applications to pass in pointers to
> > random userspace memory (userptr+length).
>
> If you do this, please keep in mind that some scatter-gather DMA engines
> (especially the philips saa7146, don't know about the saa7134) can only
> deal with page aligned boundaries.
The saa7134 doesn't need a page-aligned buffer start, and I doubt the
saa7146 does.
The saa7134 has a iommu which wants a page list in physical memory.
That forms a virtual, 4MB sized I/O space. The saa7146 does the same
as far I know.
For DMA transfer you have some control registers (start offset, line
padding, ...) for each field. The start offset is needed to fill a
buffer with an interlaced image and to place the overlay at a random
location on the screen, thus I expect the saa7146 has this too.
The start offset can also be used to let the capture buffer start
at non-page-aligned addresses.
> Alternatively, the user application may provide an already page aligned
> memory, but I don't think that this is a good idea (and if it's possible
> for a user application to request this).
If page-alignment is really needed I'd prefeare this way. If you
allocate memory by mapping anonymous memory it will be page aligned.
shared memory is also page-aligned. And applications can figure the
page size with the "getpagesize()" call, so they have a chance to
do the page-alignment thing themself even for memory allocated via
malloc().
Gerd
--
You can't please everybody. And usually if you _try_ to please
everybody, the end result is one big mess.
-- Linus Torvalds, 2002-04-20
_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list