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

Commit e9763995 authored by Lad, Prabhakar's avatar Lad, Prabhakar Committed by Mauro Carvalho Chehab
Browse files

[media] media: davinci: vpbe: use v4l2_get_timestamp()



this patch makes use of helper function v4l2_get_timestamp()
to set the timestamp of vb2 buffer.

Signed-off-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 4f26aa17
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -71,15 +71,10 @@ static int venc_is_second_field(struct vpbe_display *disp_dev)
static void vpbe_isr_even_field(struct vpbe_display *disp_obj,
				struct vpbe_layer *layer)
{
	struct timespec timevalue;

	if (layer->cur_frm == layer->next_frm)
		return;
	ktime_get_ts(&timevalue);
	layer->cur_frm->vb.v4l2_buf.timestamp.tv_sec =
		timevalue.tv_sec;
	layer->cur_frm->vb.v4l2_buf.timestamp.tv_usec =
		timevalue.tv_nsec / NSEC_PER_USEC;

	v4l2_get_timestamp(&layer->cur_frm->vb.v4l2_buf.timestamp);
	vb2_buffer_done(&layer->cur_frm->vb, VB2_BUF_STATE_DONE);
	/* Make cur_frm pointing to next_frm */
	layer->cur_frm = layer->next_frm;