media: videobuf: use u64 for the timestamp internally
Just like vb2 does, use u64 internally to store the timestamps of the buffers. Only convert to timeval when interfacing with userspace. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
63635b54e0
commit
15a40b27be
@@ -1316,7 +1316,7 @@ static void buffer_copy(struct cx231xx *dev, char *data, int len, struct urb *ur
|
||||
|
||||
buf->vb.state = VIDEOBUF_DONE;
|
||||
buf->vb.field_count++;
|
||||
v4l2_get_timestamp(&buf->vb.ts);
|
||||
buf->vb.ts = ktime_get_ns();
|
||||
list_del(&buf->vb.queue);
|
||||
wake_up(&buf->vb.done);
|
||||
dma_q->mpeg_buffer_completed = 0;
|
||||
@@ -1347,7 +1347,7 @@ static void buffer_filled(char *data, int len, struct urb *urb,
|
||||
memcpy(vbuf, data, len);
|
||||
buf->vb.state = VIDEOBUF_DONE;
|
||||
buf->vb.field_count++;
|
||||
v4l2_get_timestamp(&buf->vb.ts);
|
||||
buf->vb.ts = ktime_get_ns();
|
||||
list_del(&buf->vb.queue);
|
||||
wake_up(&buf->vb.done);
|
||||
}
|
||||
|
@@ -528,7 +528,7 @@ static inline void vbi_buffer_filled(struct cx231xx *dev,
|
||||
|
||||
buf->vb.state = VIDEOBUF_DONE;
|
||||
buf->vb.field_count++;
|
||||
v4l2_get_timestamp(&buf->vb.ts);
|
||||
buf->vb.ts = ktime_get_ns();
|
||||
|
||||
dev->vbi_mode.bulk_ctl.buf = NULL;
|
||||
|
||||
|
@@ -182,7 +182,7 @@ static inline void buffer_filled(struct cx231xx *dev,
|
||||
cx231xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i);
|
||||
buf->vb.state = VIDEOBUF_DONE;
|
||||
buf->vb.field_count++;
|
||||
v4l2_get_timestamp(&buf->vb.ts);
|
||||
buf->vb.ts = ktime_get_ns();
|
||||
|
||||
if (dev->USE_ISO)
|
||||
dev->video_mode.isoc_ctl.buf = NULL;
|
||||
|
Reference in New Issue
Block a user