summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf2-core.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] vb2: Handle return value from start_streaming callbackPawel Osciak2011-03-221-3/+8
| | | | | | | Fix vb2 not handling return value from start_streaming() callback. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] vb2: vb2_poll() fix return values for file I/O modePawel Osciak2011-03-221-3/+3
| | | | | | | poll() should be returning poll-specific error values, not E* errors. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Update Pawel Osciak's e-mail addressPawel Osciak2011-03-221-2/+2
| | | | | Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: vb2: simplify __vb2_queue_free functionMarek Szyprowski2011-03-221-6/+2
| | | | | | | | | __vb2_queue_free function doesn't really return anything useful. This patch removes support for the return value to simplify the code. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: vb2: one more fix for REQBUFS()Marek Szyprowski2011-03-221-0/+7
| | | | | | | | | Return immediately if the target number of buffers is the same as the current one and memory access type doesn't change. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: vb2: fix queue reallocation and REQBUFS(0) caseMarek Szyprowski2011-03-221-1/+8
| | | | | | | | | | | | This patch fixes 2 minor bugs in videobuf2 core: 1. Queue should be reallocated if one change the memory access method without changing the number of buffers. 2. In case of REQBUFS(0), the request should not be passed to the driver. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] vb2 core: Fix a few printk warningsMauro Carvalho Chehab2011-03-211-3/+3
| | | | | | | | | drivers/media/video/videobuf2-core.c: In function ‘__vb2_perform_fileio’: drivers/media/video/videobuf2-core.c:1638: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘size_t’ drivers/media/video/videobuf2-core.c:1697: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘size_t’ drivers/media/video/videobuf2-core.c:1703: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘size_t’ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l: videobuf2: add read() and write() emulatorMarek Szyprowski2011-03-211-0/+399
| | | | | | | | | | | | | | | | | | | | | | | 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>
* [media] v4l: add videobuf2 Video for Linux 2 driver frameworkPawel Osciak2011-03-211-0/+1405
Videobuf2 is a Video for Linux 2 API-compatible driver framework for multimedia devices. It acts as an intermediate layer between userspace applications and device drivers. It also provides low-level, modular memory management functions for drivers. Videobuf2 eases driver development, reduces drivers' code size and aids in proper and consistent implementation of V4L2 API in drivers. Videobuf2 memory management backend is fully modular. This allows custom memory management routines for devices and platforms with non-standard memory management requirements to be plugged in, without changing the high-level buffer management functions and API. The framework provides: - implementations of streaming I/O V4L2 ioctls and file operations - high-level video buffer, video queue and state management functions - video buffer memory allocation and management Signed-off-by: Pawel Osciak <p.osciak@samsung.com> 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>
OpenPOWER on IntegriCloud