brcm2708: update against latest rpi-3.10.y branch
[openwrt.git] / target / linux / brcm2708 / patches-3.10 / 0138-V4L2-Fix-information-advertised-through-g_vidfmt.patch
1 From afd8800a96b940049ac37fb90cc24deeeea5c57e Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dsteve@broadcom.com>
3 Date: Mon, 9 Dec 2013 17:29:39 +0000
4 Subject: [PATCH 138/174] V4L2: Fix information advertised through g_vidfmt
5
6 Width and height were being stored based on incorrect
7 values.
8
9 Signed-off-by: Dave Stevenson <dsteve@broadcom.com>
10 ---
11  drivers/media/platform/bcm2835/bcm2835-camera.c | 10 ++++++++--
12  1 file changed, 8 insertions(+), 2 deletions(-)
13
14 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c
15 +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
16 @@ -1028,13 +1028,19 @@ static int mmal_setup_components(struct
17                 if (!ret) {
18                         dev->capture.fmt = mfmt;
19                         dev->capture.stride = f->fmt.pix.bytesperline;
20 -                       dev->capture.width = port->es.video.crop.width;
21 -                       dev->capture.height = port->es.video.crop.height;
22 +                       dev->capture.width = camera_port->es.video.crop.width;
23 +                       dev->capture.height = camera_port->es.video.crop.height;
24  
25                         /* select port for capture */
26                         dev->capture.port = port;
27                         dev->capture.camera_port = camera_port;
28                         dev->capture.encode_component = encode_component;
29 +                       v4l2_dbg(1, bcm2835_v4l2_debug,
30 +                                &dev->v4l2_dev,
31 +                               "Set dev->capture.fmt %08X, %dx%d, stride %d",
32 +                               port->format.encoding,
33 +                               dev->capture.width, dev->capture.height,
34 +                               dev->capture.stride);
35                 }
36         }
37