]> git.baikalelectronics.ru Git - kernel.git/commit
[media] videobuf-dma-contig: set vm_pgoff to be zero to pass the sanity check in...
authorFancy Fang <chen.fang@freescale.com>
Fri, 10 Oct 2014 02:21:22 +0000 (23:21 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 24 Oct 2014 11:32:41 +0000 (09:32 -0200)
commit1b4d5aa392306abd069547763cbfa4a78e3ce513
treea4b0185ee0b20b2f0953c752ecd55fc66cfc1006
parente53da7d1d08aa7f6a35af6c3a7627ef362c6287a
[media] videobuf-dma-contig: set vm_pgoff to be zero to pass the sanity check in vm_iomap_memory()

When user requests V4L2_MEMORY_MMAP type buffers, the videobuf-core
will assign the corresponding offset to the 'boff' field of the
videobuf_buffer for each requested buffer sequentially. Later, user
may call mmap() to map one or all of the buffers with the 'offset'
parameter which is equal to its 'boff' value. Obviously, the 'offset'
value is only used to find the matched buffer instead of to be the
real offset from the buffer's physical start address as used by
vm_iomap_memory(). So, in some case that if the offset is not zero,
vm_iomap_memory() will fail.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/videobuf-dma-contig.c