f8ae31b33255c7e12f9f9edcebcc1bd810d1167c
[lede.git] / target / linux / brcm2708 / patches-4.4 / 0162-bcm2835-camera-fix-a-bug-in-computation-of-frame-tim.patch
1 From fe490f6183e1a1759abe188d5e83708956c0fbbe Mon Sep 17 00:00:00 2001
2 From: Dhiraj Goel <dhiraj.goel@gmail.com>
3 Date: Thu, 3 Mar 2016 21:10:50 -0800
4 Subject: [PATCH] bcm2835-camera: fix a bug in computation of frame timestamp
5
6 Fixes #1318
7 ---
8  drivers/media/platform/bcm2835/bcm2835-camera.c | 3 +--
9  1 file changed, 1 insertion(+), 2 deletions(-)
10
11 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c
12 +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
13 @@ -360,8 +360,7 @@ static void buffer_cb(struct vchiq_mmal_
14                                 div =
15                                     div_u64_rem(runtime_us, USEC_PER_SEC, &rem);
16                                 buf->vb.timestamp.tv_sec =
17 -                                   dev->capture.kernel_start_ts.tv_sec - 1 +
18 -                                   div;
19 +                                   dev->capture.kernel_start_ts.tv_sec + div;
20                                 buf->vb.timestamp.tv_usec =
21                                     dev->capture.kernel_start_ts.tv_usec + rem;
22