aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorKamil Debski <k.debski@samsung.com>2015-02-23 07:26:16 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-10 08:44:38 -0400
commit06e7a9b638467fddf8f62ca9f07adc7754319461 (patch)
tree97d1e05d23d9b181ff5ec032ee501bef3756f466 /include/media
parentbe8e58d93fba531b12ef2fce4fb33c9c5fb5b69f (diff)
[media] vb2: split the io_flags member of vb2_queue into a bit field
This patch splits the io_flags member of vb2_queue into a bit field. Instead of an enum with flags separate bit fields were introduced. Signed-off-by: Kamil Debski <k.debski@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/videobuf2-core.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index bd2cec2d6c3d..e49dc6b0de81 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -134,17 +134,6 @@ enum vb2_io_modes {
134}; 134};
135 135
136/** 136/**
137 * enum vb2_fileio_flags - flags for selecting a mode of the file io emulator,
138 * by default the 'streaming' style is used by the file io emulator
139 * @VB2_FILEIO_READ_ONCE: report EOF after reading the first buffer
140 * @VB2_FILEIO_WRITE_IMMEDIATELY: queue buffer after each write() call
141 */
142enum vb2_fileio_flags {
143 VB2_FILEIO_READ_ONCE = (1 << 0),
144 VB2_FILEIO_WRITE_IMMEDIATELY = (1 << 1),
145};
146
147/**
148 * enum vb2_buffer_state - current video buffer state 137 * enum vb2_buffer_state - current video buffer state
149 * @VB2_BUF_STATE_DEQUEUED: buffer under userspace control 138 * @VB2_BUF_STATE_DEQUEUED: buffer under userspace control
150 * @VB2_BUF_STATE_PREPARING: buffer is being prepared in videobuf 139 * @VB2_BUF_STATE_PREPARING: buffer is being prepared in videobuf
@@ -346,7 +335,8 @@ struct v4l2_fh;
346 * 335 *
347 * @type: queue type (see V4L2_BUF_TYPE_* in linux/videodev2.h 336 * @type: queue type (see V4L2_BUF_TYPE_* in linux/videodev2.h
348 * @io_modes: supported io methods (see vb2_io_modes enum) 337 * @io_modes: supported io methods (see vb2_io_modes enum)
349 * @io_flags: additional io flags (see vb2_fileio_flags enum) 338 * @fileio_read_once: report EOF after reading the first buffer
339 * @fileio_write_immediately: queue buffer after each write() call
350 * @lock: pointer to a mutex that protects the vb2_queue struct. The 340 * @lock: pointer to a mutex that protects the vb2_queue struct. The
351 * driver can set this to a mutex to let the v4l2 core serialize 341 * driver can set this to a mutex to let the v4l2 core serialize
352 * the queuing ioctls. If the driver wants to handle locking 342 * the queuing ioctls. If the driver wants to handle locking
@@ -396,7 +386,9 @@ struct v4l2_fh;
396struct vb2_queue { 386struct vb2_queue {
397 enum v4l2_buf_type type; 387 enum v4l2_buf_type type;
398 unsigned int io_modes; 388 unsigned int io_modes;
399 unsigned int io_flags; 389 unsigned fileio_read_once:1;
390 unsigned fileio_write_immediately:1;
391
400 struct mutex *lock; 392 struct mutex *lock;
401 struct v4l2_fh *owner; 393 struct v4l2_fh *owner;
402 394