7b5529194fa848f929905649d5c762d5c7aaf3d2
[openwrt/staging/hauke.git] /
1 From 18277c9cdbb9d3595d442c97ee80b2c10303aeb9 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 26 Nov 2021 16:46:22 +0000
4 Subject: [PATCH] staging/bcm2835-codec: bytesperline for YUV420/YVU420
5 needs to be 64
6
7 Matching https://github.com/raspberrypi/linux/pull/4419, the ISP
8 block (which is also used on the input of the encoder, and output
9 of the decoder) needs the base address of all planes to be aligned
10 to multiples of 32. This includes the chroma planes of YUV420 and
11 YVU420.
12 If the height is only a multiple of 2 (not 4), then you get an odd
13 number of lines in the second plane, which means the 3rd plane
14 starts at a multiple of bytesperline/2.
15
16 Set the minimum bytesperline alignment to 64 for those formats
17 so that the plane alignment is always right.
18
19 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
20 ---
21 .../staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 4 ++--
22 1 file changed, 2 insertions(+), 2 deletions(-)
23
24 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
25 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
26 @@ -157,14 +157,14 @@ static const struct bcm2835_codec_fmt su
27 /* YUV formats */
28 .fourcc = V4L2_PIX_FMT_YUV420,
29 .depth = 8,
30 - .bytesperline_align = 32,
31 + .bytesperline_align = 64,
32 .flags = 0,
33 .mmal_fmt = MMAL_ENCODING_I420,
34 .size_multiplier_x2 = 3,
35 }, {
36 .fourcc = V4L2_PIX_FMT_YVU420,
37 .depth = 8,
38 - .bytesperline_align = 32,
39 + .bytesperline_align = 64,
40 .flags = 0,
41 .mmal_fmt = MMAL_ENCODING_YV12,
42 .size_multiplier_x2 = 3,