openwrtv4/target/linux/brcm2708/patches-4.4/0162-bcm2835-camera-fix-a-bug-in-computation-of-frame-tim.patch
Álvaro Fernández Rojas 2b1c6b21b5 brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.4.y

Also adds support for Raspberry Pi Compute Module 3 (untested).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2016-09-10 14:54:26 +02:00

22 lines
821 B
Diff

From 185f82a6c86933b1df3ba8ec99f82fbcdd77d396 Mon Sep 17 00:00:00 2001
From: Dhiraj Goel <dhiraj.goel@gmail.com>
Date: Thu, 3 Mar 2016 21:10:50 -0800
Subject: [PATCH] bcm2835-camera: fix a bug in computation of frame timestamp
Fixes #1318
---
drivers/media/platform/bcm2835/bcm2835-camera.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/media/platform/bcm2835/bcm2835-camera.c
+++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
@@ -360,8 +360,7 @@ static void buffer_cb(struct vchiq_mmal_
div =
div_u64_rem(runtime_us, USEC_PER_SEC, &rem);
buf->vb.timestamp.tv_sec =
- dev->capture.kernel_start_ts.tv_sec - 1 +
- div;
+ dev->capture.kernel_start_ts.tv_sec + div;
buf->vb.timestamp.tv_usec =
dev->capture.kernel_start_ts.tv_usec + rem;