aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2010-12-06 05:56:55 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 20:31:34 -0300
commitb25748fe612626d6c9e344482bb028d76c1e11f2 (patch)
treedc4b9029f15af23d2d2648274b0fddc8afe60e96 /init
parent5ba3f757f0592ca001266b4a6214d0332349909c (diff)
downloadkernel_samsung_tuna-b25748fe612626d6c9e344482bb028d76c1e11f2.zip
kernel_samsung_tuna-b25748fe612626d6c9e344482bb028d76c1e11f2.tar.gz
kernel_samsung_tuna-b25748fe612626d6c9e344482bb028d76c1e11f2.tar.bz2
[media] v4l: videobuf2: add read() and write() emulator
Add a generic file io (read and write) emulator for videobuf2. It uses MMAP memory type buffers and generic vb2 calls: req_bufs, qbuf and dqbuf. Video date is being copied from mmap buffers to userspace with standard copy_to_user() function. To add support for file io the driver needs to provide an additional callback - read_setup or write_setup. It should provide the default number of buffers used by emulator and flags. With these flags one can detemine the style of read() or write() emulation. By default 'streaming' style is used. With VB2_FILEIO_READ_ONCE flag one can select 'one shot' mode for read() emulator. With VB2_FILEIO_WRITE_IMMEDIATE flag one can select immediate conversion of write calls to qbuf for write() emulator, so the vb2 will not wait until each buffer is filled completely before queueing it to the driver. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Pawel Osciak <pawel@osciak.com> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions