public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
	Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Subject: Re: [PATCH] rcar-vin: use monotonic timestamps
Date: Thu, 07 May 2015 08:32:51 +0200	[thread overview]
Message-ID: <554B0713.6060003@xs4all.nl> (raw)
In-Reply-To: <554B058D.2040001@xs4all.nl>

On 05/07/2015 08:26 AM, Hans Verkuil wrote:
> Even though the rcar-vin driver tells userspace that it will give a monotonic
> timestamp, it is actually using gettimeofday. Replace this with a proper
> monotonic timestamp.

It was clearly too early in the day for me, but here is my Signed-off-by:

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

> diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c
> index 35deed8..b64dfea 100644
> --- a/drivers/media/platform/soc_camera/rcar_vin.c
> +++ b/drivers/media/platform/soc_camera/rcar_vin.c
> @@ -894,7 +894,7 @@ static irqreturn_t rcar_vin_irq(int irq, void *data)
>  
>  		priv->queue_buf[slot]->v4l2_buf.field = priv->field;
>  		priv->queue_buf[slot]->v4l2_buf.sequence = priv->sequence++;
> -		do_gettimeofday(&priv->queue_buf[slot]->v4l2_buf.timestamp);
> +		v4l2_get_timestamp(&priv->queue_buf[slot]->v4l2_buf.timestamp);
>  		vb2_buffer_done(priv->queue_buf[slot], VB2_BUF_STATE_DONE);
>  		priv->queue_buf[slot] = NULL;
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2015-05-07  6:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  6:26 [PATCH] rcar-vin: use monotonic timestamps Hans Verkuil
2015-05-07  6:32 ` Hans Verkuil [this message]
2015-05-11 12:45   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554B0713.6060003@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.kernel.org \
    --cc=nobuhiro.iwamatsu.yj@renesas.com \
    --cc=sakari.ailus@iki.fi \
    --cc=vladimir.barinov@cogentembedded.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox