Gerd Knorr wrote: > bttv gives you a just a shared anonymous mapping, and the kernel > vm will allocate and map these pages on use. It is normal userspace > memory, it is _not_ unswappable kernel memory remapped to userspace. How do you do this? Does the memory appear contiguous to the driver? Can the driver create a buffer this way for its own internal use, or does it not exist until the user calls mmap()? > The problem I see here is that there are many different ways to handle > mmap(). I don't think there is a reasonable way to hide v4l1 and v4l2 > style mmap() differences in the compatibility layer. That's why I'd > like handle v4l2 the same way as v4l1, so the drivers don't need to > handle both. V4L2 has this generalized stream concept, and a driver can have multiple streams that are set up independently. There's no way a single mmap() call will suffice. We could do one mmap() per stream, again with the magic-number-in-the-offset-parameter trick, but that's not so far removed from one mmap() per buffer. Checking the CONTIG flag isn't that big a deal, and you don't do it, you only just degrade v4l1 capture performance. Bill.