diff options
-rw-r--r-- | drivers/media/pci/meye/meye.c | 4 | ||||
-rw-r--r-- | drivers/media/pci/zoran/zoran_driver.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/omap3isp/ispqueue.c | 1 | ||||
-rw-r--r-- | drivers/media/platform/vino.c | 3 | ||||
-rw-r--r-- | drivers/media/usb/cpia2/cpia2_v4l.c | 5 | ||||
-rw-r--r-- | drivers/media/usb/sn9c102/sn9c102_core.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/stkwebcam/stk-webcam.c | 1 | ||||
-rw-r--r-- | drivers/media/usb/usbvision/usbvision-video.c | 5 | ||||
-rw-r--r-- | drivers/media/v4l2-core/videobuf-core.c | 2 | ||||
-rw-r--r-- | drivers/media/v4l2-core/videobuf2-core.c | 10 |
10 files changed, 23 insertions, 12 deletions
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c index 288adea55e33..ac7ab6edb06d 100644 --- a/drivers/media/pci/meye/meye.c +++ b/drivers/media/pci/meye/meye.c | |||
@@ -1426,7 +1426,7 @@ static int vidioc_querybuf(struct file *file, void *fh, struct v4l2_buffer *buf) | |||
1426 | return -EINVAL; | 1426 | return -EINVAL; |
1427 | 1427 | ||
1428 | buf->bytesused = meye.grab_buffer[index].size; | 1428 | buf->bytesused = meye.grab_buffer[index].size; |
1429 | buf->flags = V4L2_BUF_FLAG_MAPPED; | 1429 | buf->flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; |
1430 | 1430 | ||
1431 | if (meye.grab_buffer[index].state == MEYE_BUF_USING) | 1431 | if (meye.grab_buffer[index].state == MEYE_BUF_USING) |
1432 | buf->flags |= V4L2_BUF_FLAG_QUEUED; | 1432 | buf->flags |= V4L2_BUF_FLAG_QUEUED; |
@@ -1499,7 +1499,7 @@ static int vidioc_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf) | |||
1499 | 1499 | ||
1500 | buf->index = reqnr; | 1500 | buf->index = reqnr; |
1501 | buf->bytesused = meye.grab_buffer[reqnr].size; | 1501 | buf->bytesused = meye.grab_buffer[reqnr].size; |
1502 | buf->flags = V4L2_BUF_FLAG_MAPPED; | 1502 | buf->flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; |
1503 | buf->field = V4L2_FIELD_NONE; | 1503 | buf->field = V4L2_FIELD_NONE; |
1504 | buf->timestamp = meye.grab_buffer[reqnr].timestamp; | 1504 | buf->timestamp = meye.grab_buffer[reqnr].timestamp; |
1505 | buf->sequence = meye.grab_buffer[reqnr].sequence; | 1505 | buf->sequence = meye.grab_buffer[reqnr].sequence; |
diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index 53f12c7466b0..33521a4f23a7 100644 --- a/drivers/media/pci/zoran/zoran_driver.c +++ b/drivers/media/pci/zoran/zoran_driver.c | |||
@@ -1334,7 +1334,7 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh, | |||
1334 | struct zoran *zr = fh->zr; | 1334 | struct zoran *zr = fh->zr; |
1335 | unsigned long flags; | 1335 | unsigned long flags; |
1336 | 1336 | ||
1337 | buf->flags = V4L2_BUF_FLAG_MAPPED; | 1337 | buf->flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; |
1338 | 1338 | ||
1339 | switch (fh->map_mode) { | 1339 | switch (fh->map_mode) { |
1340 | case ZORAN_MAP_MODE_RAW: | 1340 | case ZORAN_MAP_MODE_RAW: |
diff --git a/drivers/media/platform/omap3isp/ispqueue.c b/drivers/media/platform/omap3isp/ispqueue.c index 15bf3eab2224..6599963cdd9b 100644 --- a/drivers/media/platform/omap3isp/ispqueue.c +++ b/drivers/media/platform/omap3isp/ispqueue.c | |||
@@ -674,6 +674,7 @@ static int isp_video_queue_alloc(struct isp_video_queue *queue, | |||
674 | buf->vbuf.index = i; | 674 | buf->vbuf.index = i; |
675 | buf->vbuf.length = size; | 675 | buf->vbuf.length = size; |
676 | buf->vbuf.type = queue->type; | 676 | buf->vbuf.type = queue->type; |
677 | buf->vbuf.flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
677 | buf->vbuf.field = V4L2_FIELD_NONE; | 678 | buf->vbuf.field = V4L2_FIELD_NONE; |
678 | buf->vbuf.memory = memory; | 679 | buf->vbuf.memory = memory; |
679 | 680 | ||
diff --git a/drivers/media/platform/vino.c b/drivers/media/platform/vino.c index 28350e78b564..eb5d6f955709 100644 --- a/drivers/media/platform/vino.c +++ b/drivers/media/platform/vino.c | |||
@@ -3410,6 +3410,9 @@ static void vino_v4l2_get_buffer_status(struct vino_channel_settings *vcs, | |||
3410 | if (fb->map_count > 0) | 3410 | if (fb->map_count > 0) |
3411 | b->flags |= V4L2_BUF_FLAG_MAPPED; | 3411 | b->flags |= V4L2_BUF_FLAG_MAPPED; |
3412 | 3412 | ||
3413 | b->flags &= ~V4L2_BUF_FLAG_TIMESTAMP_MASK; | ||
3414 | b->flags |= V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
3415 | |||
3413 | b->index = fb->id; | 3416 | b->index = fb->id; |
3414 | b->memory = (vcs->fb_queue.type == VINO_MEMORY_MMAP) ? | 3417 | b->memory = (vcs->fb_queue.type == VINO_MEMORY_MMAP) ? |
3415 | V4L2_MEMORY_MMAP : V4L2_MEMORY_USERPTR; | 3418 | V4L2_MEMORY_MMAP : V4L2_MEMORY_USERPTR; |
diff --git a/drivers/media/usb/cpia2/cpia2_v4l.c b/drivers/media/usb/cpia2/cpia2_v4l.c index aeb9d2275725..d5d42b6e94be 100644 --- a/drivers/media/usb/cpia2/cpia2_v4l.c +++ b/drivers/media/usb/cpia2/cpia2_v4l.c | |||
@@ -825,6 +825,8 @@ static int cpia2_querybuf(struct file *file, void *fh, struct v4l2_buffer *buf) | |||
825 | else | 825 | else |
826 | buf->flags = 0; | 826 | buf->flags = 0; |
827 | 827 | ||
828 | buf->flags |= V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
829 | |||
828 | switch (cam->buffers[buf->index].status) { | 830 | switch (cam->buffers[buf->index].status) { |
829 | case FRAME_EMPTY: | 831 | case FRAME_EMPTY: |
830 | case FRAME_ERROR: | 832 | case FRAME_ERROR: |
@@ -943,7 +945,8 @@ static int cpia2_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf) | |||
943 | 945 | ||
944 | buf->index = frame; | 946 | buf->index = frame; |
945 | buf->bytesused = cam->buffers[buf->index].length; | 947 | buf->bytesused = cam->buffers[buf->index].length; |
946 | buf->flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_DONE; | 948 | buf->flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_DONE |
949 | | V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
947 | buf->field = V4L2_FIELD_NONE; | 950 | buf->field = V4L2_FIELD_NONE; |
948 | buf->timestamp = cam->buffers[buf->index].timestamp; | 951 | buf->timestamp = cam->buffers[buf->index].timestamp; |
949 | buf->sequence = cam->buffers[buf->index].seq; | 952 | buf->sequence = cam->buffers[buf->index].seq; |
diff --git a/drivers/media/usb/sn9c102/sn9c102_core.c b/drivers/media/usb/sn9c102/sn9c102_core.c index 8dbf0c721c4a..6bda81aebf87 100644 --- a/drivers/media/usb/sn9c102/sn9c102_core.c +++ b/drivers/media/usb/sn9c102/sn9c102_core.c | |||
@@ -173,7 +173,7 @@ sn9c102_request_buffers(struct sn9c102_device* cam, u32 count, | |||
173 | cam->frame[i].buf.sequence = 0; | 173 | cam->frame[i].buf.sequence = 0; |
174 | cam->frame[i].buf.field = V4L2_FIELD_NONE; | 174 | cam->frame[i].buf.field = V4L2_FIELD_NONE; |
175 | cam->frame[i].buf.memory = V4L2_MEMORY_MMAP; | 175 | cam->frame[i].buf.memory = V4L2_MEMORY_MMAP; |
176 | cam->frame[i].buf.flags = 0; | 176 | cam->frame[i].buf.flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; |
177 | } | 177 | } |
178 | 178 | ||
179 | return cam->nbuffers; | 179 | return cam->nbuffers; |
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c index bf56904decb4..52296f7ec966 100644 --- a/drivers/media/usb/stkwebcam/stk-webcam.c +++ b/drivers/media/usb/stkwebcam/stk-webcam.c | |||
@@ -466,6 +466,7 @@ static int stk_setup_siobuf(struct stk_camera *dev, int index) | |||
466 | buf->dev = dev; | 466 | buf->dev = dev; |
467 | buf->v4lbuf.index = index; | 467 | buf->v4lbuf.index = index; |
468 | buf->v4lbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 468 | buf->v4lbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
469 | buf->v4lbuf.flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
469 | buf->v4lbuf.field = V4L2_FIELD_NONE; | 470 | buf->v4lbuf.field = V4L2_FIELD_NONE; |
470 | buf->v4lbuf.memory = V4L2_MEMORY_MMAP; | 471 | buf->v4lbuf.memory = V4L2_MEMORY_MMAP; |
471 | buf->v4lbuf.m.offset = 2*index*buf->v4lbuf.length; | 472 | buf->v4lbuf.m.offset = 2*index*buf->v4lbuf.length; |
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index 5c36a57e6590..c6bc8ce67375 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c | |||
@@ -761,7 +761,7 @@ static int vidioc_querybuf(struct file *file, | |||
761 | if (vb->index >= usbvision->num_frames) | 761 | if (vb->index >= usbvision->num_frames) |
762 | return -EINVAL; | 762 | return -EINVAL; |
763 | /* Updating the corresponding frame state */ | 763 | /* Updating the corresponding frame state */ |
764 | vb->flags = 0; | 764 | vb->flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; |
765 | frame = &usbvision->frame[vb->index]; | 765 | frame = &usbvision->frame[vb->index]; |
766 | if (frame->grabstate >= frame_state_ready) | 766 | if (frame->grabstate >= frame_state_ready) |
767 | vb->flags |= V4L2_BUF_FLAG_QUEUED; | 767 | vb->flags |= V4L2_BUF_FLAG_QUEUED; |
@@ -843,7 +843,8 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *vb) | |||
843 | vb->memory = V4L2_MEMORY_MMAP; | 843 | vb->memory = V4L2_MEMORY_MMAP; |
844 | vb->flags = V4L2_BUF_FLAG_MAPPED | | 844 | vb->flags = V4L2_BUF_FLAG_MAPPED | |
845 | V4L2_BUF_FLAG_QUEUED | | 845 | V4L2_BUF_FLAG_QUEUED | |
846 | V4L2_BUF_FLAG_DONE; | 846 | V4L2_BUF_FLAG_DONE | |
847 | V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
847 | vb->index = f->index; | 848 | vb->index = f->index; |
848 | vb->sequence = f->sequence; | 849 | vb->sequence = f->sequence; |
849 | vb->timestamp = f->timestamp; | 850 | vb->timestamp = f->timestamp; |
diff --git a/drivers/media/v4l2-core/videobuf-core.c b/drivers/media/v4l2-core/videobuf-core.c index 5449e8aa984a..fb5ee5dd8fe9 100644 --- a/drivers/media/v4l2-core/videobuf-core.c +++ b/drivers/media/v4l2-core/videobuf-core.c | |||
@@ -340,7 +340,7 @@ static void videobuf_status(struct videobuf_queue *q, struct v4l2_buffer *b, | |||
340 | break; | 340 | break; |
341 | } | 341 | } |
342 | 342 | ||
343 | b->flags = 0; | 343 | b->flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; |
344 | if (vb->map) | 344 | if (vb->map) |
345 | b->flags |= V4L2_BUF_FLAG_MAPPED; | 345 | b->flags |= V4L2_BUF_FLAG_MAPPED; |
346 | 346 | ||
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 9f81be23a81f..85e3c221dadc 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c | |||
@@ -40,9 +40,10 @@ module_param(debug, int, 0644); | |||
40 | #define call_qop(q, op, args...) \ | 40 | #define call_qop(q, op, args...) \ |
41 | (((q)->ops->op) ? ((q)->ops->op(args)) : 0) | 41 | (((q)->ops->op) ? ((q)->ops->op(args)) : 0) |
42 | 42 | ||
43 | #define V4L2_BUFFER_STATE_FLAGS (V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_QUEUED | \ | 43 | #define V4L2_BUFFER_MASK_FLAGS (V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_QUEUED | \ |
44 | V4L2_BUF_FLAG_DONE | V4L2_BUF_FLAG_ERROR | \ | 44 | V4L2_BUF_FLAG_DONE | V4L2_BUF_FLAG_ERROR | \ |
45 | V4L2_BUF_FLAG_PREPARED) | 45 | V4L2_BUF_FLAG_PREPARED | \ |
46 | V4L2_BUF_FLAG_TIMESTAMP_MASK) | ||
46 | 47 | ||
47 | /** | 48 | /** |
48 | * __vb2_buf_mem_alloc() - allocate video memory for the given buffer | 49 | * __vb2_buf_mem_alloc() - allocate video memory for the given buffer |
@@ -401,7 +402,8 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, struct v4l2_buffer *b) | |||
401 | /* | 402 | /* |
402 | * Clear any buffer state related flags. | 403 | * Clear any buffer state related flags. |
403 | */ | 404 | */ |
404 | b->flags &= ~V4L2_BUFFER_STATE_FLAGS; | 405 | b->flags &= ~V4L2_BUFFER_MASK_FLAGS; |
406 | b->flags |= V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
405 | 407 | ||
406 | switch (vb->state) { | 408 | switch (vb->state) { |
407 | case VB2_BUF_STATE_QUEUED: | 409 | case VB2_BUF_STATE_QUEUED: |
@@ -939,7 +941,7 @@ static void __fill_vb2_buffer(struct vb2_buffer *vb, const struct v4l2_buffer *b | |||
939 | 941 | ||
940 | vb->v4l2_buf.field = b->field; | 942 | vb->v4l2_buf.field = b->field; |
941 | vb->v4l2_buf.timestamp = b->timestamp; | 943 | vb->v4l2_buf.timestamp = b->timestamp; |
942 | vb->v4l2_buf.flags = b->flags & ~V4L2_BUFFER_STATE_FLAGS; | 944 | vb->v4l2_buf.flags = b->flags & ~V4L2_BUFFER_MASK_FLAGS; |
943 | } | 945 | } |
944 | 946 | ||
945 | /** | 947 | /** |