9625f9604d7b5f9e3ede370442d640f35b9336ad
[openwrt/staging/thess.git] /
1 From bcb6e267ca61ce685ed2debc0cee327527cea20d Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Thu, 11 Jul 2019 14:58:35 +0100
4 Subject: [PATCH 752/806] staging: bcm2835-codec: Correct bytesperline on
5 format changed
6
7 The handling of format changed events incorrectly set bytesperline
8 to the cropped width, which ignored padding and formats with
9 more than 8bpp.
10 Fix these.
11
12 Reported by: zillevdr <zillevdr@gmx.de>
13 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
14 ---
15 .../staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 4 +++-
16 1 file changed, 3 insertions(+), 1 deletion(-)
17
18 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
19 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
20 @@ -759,7 +759,9 @@ static void handle_fmt_changed(struct bc
21
22 q_data->crop_width = format->es.video.crop.width;
23 q_data->crop_height = format->es.video.crop.height;
24 - q_data->bytesperline = format->es.video.crop.width;
25 + q_data->bytesperline = get_bytesperline(format->es.video.width,
26 + q_data->fmt);
27 +
28 q_data->height = format->es.video.height;
29 q_data->sizeimage = format->buffer_size_min;
30 if (format->es.video.color_space)