Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6dd645e authored by Junghak Sung's avatar Junghak Sung Committed by Mauro Carvalho Chehab
Browse files

[media] media: videobuf2: Move timestamp to vb2_buffer



Move timestamp from struct vb2_v4l2_buffer to struct vb2_buffer
for common use, and change its type to u64 in order to handling
y2038 problem. This patch also includes all device drivers' changes related to
this restructuring.

Signed-off-by: default avatarJunghak Sung <jh1009.sung@samsung.com>
Signed-off-by: default avatarGeunyoung Kim <nenggun.kim@samsung.com>
Acked-by: default avatarSeung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: default avatarInki Dae <inki.dae@samsung.com>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 9057bc2b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -444,7 +444,7 @@ static void sur40_process_video(struct sur40_state *sur40)
		goto err_poll;

	/* mark as finished */
	v4l2_get_timestamp(&new_buf->vb.timestamp);
	new_buf->vb.vb2_buf.timestamp = ktime_get_ns();
	new_buf->vb.sequence = sur40->sequence++;
	new_buf->vb.field = V4L2_FIELD_NONE;
	vb2_buffer_done(&new_buf->vb.vb2_buf, VB2_BUF_STATE_DONE);
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ static void rtl2832_sdr_urb_complete(struct urb *urb)
		len = rtl2832_sdr_convert_stream(dev, ptr, urb->transfer_buffer,
				urb->actual_length);
		vb2_set_plane_payload(&fbuf->vb.vb2_buf, 0, len);
		v4l2_get_timestamp(&fbuf->vb.timestamp);
		fbuf->vb.vb2_buf.timestamp = ktime_get_ns();
		fbuf->vb.sequence = dev->sequence++;
		vb2_buffer_done(&fbuf->vb.vb2_buf, VB2_BUF_STATE_DONE);
	}
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ static void cobalt_dma_stream_queue_handler(struct cobalt_stream *s)
		skip = true;
		s->skip_first_frames--;
	}
	v4l2_get_timestamp(&cb->vb.timestamp);
	cb->vb.vb2_buf.timestamp = ktime_get_ns();
	/* TODO: the sequence number should be read from the FPGA so we
	   also know about dropped frames. */
	cb->vb.sequence = s->sequence++;
+1 −1
Original line number Diff line number Diff line
@@ -427,7 +427,7 @@ static void cx23885_wakeup(struct cx23885_tsport *port,
	buf = list_entry(q->active.next,
			 struct cx23885_buffer, queue);

	v4l2_get_timestamp(&buf->vb.timestamp);
	buf->vb.vb2_buf.timestamp = ktime_get_ns();
	buf->vb.sequence = q->count++;
	dprintk(1, "[%p/%d] wakeup reg=%d buf=%d\n", buf,
		buf->vb.vb2_buf.index,
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ void cx23885_video_wakeup(struct cx23885_dev *dev,
			struct cx23885_buffer, queue);

	buf->vb.sequence = q->count++;
	v4l2_get_timestamp(&buf->vb.timestamp);
	buf->vb.vb2_buf.timestamp = ktime_get_ns();
	dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf,
			buf->vb.vb2_buf.index, count, q->count);
	list_del(&buf->queue);
Loading