On Thu, Dec 10, 2009 at 10:06 PM, Guennadi Liakhovetski <g.liakhovetski@xxxxxx> wrote: > On Wed, 9 Dec 2009, Magnus Damm wrote: > >> From: Magnus Damm <damm@xxxxxxxxxxxxx> >> >> This patch updates the SuperH Mobile CEU driver to >> not page align the frame size. Useful in the case of >> USERPTR with non-page aligned frame sizes and offsets. >> >> Signed-off-by: Magnus Damm <damm@xxxxxxxxxxxxx> > > Please, correct me if I'm wrong. Currently most (all?) sh platforms, using > this driver, and wishing to use V4L2_MEMORY_MMAP, reserve contiguous > memory in their platform code. In this case pcdev->video_limit is set to > the size of that area. videobuf-dma-contig.c::__videobuf_mmap_mapper() > will anyway allocate page-aligned buffers for V4L2_MEMORY_MMAP, so, even > for the case of a platform, not reserving RAM at boot-time, it should > work. Similarly it should work for the V4L2_MEMORY_USERPTR case. So, looks > ok to me, queued, thanks. Correct. On SuperH Mobile the amount of reserved physically contiguous memory for the CEU can be overridden on the kernel command line, and in the case of systems only using USERPTR it is wise to set it to the reserved memory to zero since the memory will be unused anyway when the V4L2 buffers come from elsewhere. If there is no physically contiguous memory reserved for the CEU and V4L2 MMAP is used then there is a risk of physically contiguous memory allocation failure due to memory fragmentation. Nothing out of the ordinary, to play it safe just reserve physically contiguous memory during boot up time and be done with it. / magnus -- 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