5a1fd59aed1cb17a0d0a714670aa0dc38bc86fd8
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0412-staging-vc04_services-isp-Set-the-YUV420-YVU420-form.patch
1 From c60a791052d1b3c2dcbd619ba7f4f0af75435e84 Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Tue, 29 Jun 2021 12:50:58 +0100
4 Subject: [PATCH] staging: vc04_services: isp: Set the YUV420/YVU420
5 format stride to 64 bytes
6
7 The bcm2835 ISP requires the base address of all input/output planes to have 32
8 byte alignment. Using a Y stride of 32 bytes would not guarantee that the V
9 plane would fulfil this, e.g. a height of 650 lines would mean the V plane
10 buffer is not 32 byte aligned for YUV420 formats.
11
12 Having a Y stride of 64 bytes would ensure both U and V planes have a 32 byte
13 alignment, as the luma height will always be an even number of lines.
14
15 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
16 ---
17 drivers/staging/vc04_services/bcm2835-isp/bcm2835-isp-fmts.h | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20 --- a/drivers/staging/vc04_services/bcm2835-isp/bcm2835-isp-fmts.h
21 +++ b/drivers/staging/vc04_services/bcm2835-isp/bcm2835-isp-fmts.h
22 @@ -48,7 +48,7 @@ static const struct bcm2835_isp_fmt supp
23 /* YUV formats */
24 .fourcc = V4L2_PIX_FMT_YUV420,
25 .depth = 8,
26 - .bytesperline_align = 32,
27 + .bytesperline_align = 64,
28 .mmal_fmt = MMAL_ENCODING_I420,
29 .size_multiplier_x2 = 3,
30 .colorspace_mask = V4L2_COLORSPACE_MASK_YUV,
31 @@ -57,7 +57,7 @@ static const struct bcm2835_isp_fmt supp
32 }, {
33 .fourcc = V4L2_PIX_FMT_YVU420,
34 .depth = 8,
35 - .bytesperline_align = 32,
36 + .bytesperline_align = 64,
37 .mmal_fmt = MMAL_ENCODING_YV12,
38 .size_multiplier_x2 = 3,
39 .colorspace_mask = V4L2_COLORSPACE_MASK_YUV,