Skip to contentSkip to conversation

rcar-vin: use monotonic timestamps

PATCH In review Hans Verkuil 2 participants 3 messages May 7, 2015 – May 11, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcar-vin: use monotonic timestamps

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.

drivers/media/platform/soc_camera/rcar_vin.c +1 -1
index 35deed8..b64dfea 100644
@@ -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;
 
#1 lore raw
Quoted 3 lines · Hans Verkuil

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:

Quoted 18 lines
drivers/media/platform/soc_camera/rcar_vin.c +1 -2
index 35deed8..b64dfea 100644
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi Hans,

Quoted 8 lines · On Thursday 07 May 2015 08:32:51 Hans Verkuil wrote:
Quoted 3 lines · Hans Verkuil

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:

And my

Quoted 15 lines
Quoted 15 lines
(quoted diff) +0 -0

b/drivers/media/platform/soc_camera/rcar_vin.c index 35deed8..b64dfea 100644

drivers/media/platform/soc_camera/rcar_vin.c +1 -1
@@ -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;

Signature · 3 lines
Regards,

Laurent Pinchart