1 From 9f4002165439d02a63760e68948246e3af764318 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 11 Oct 2023 15:05:38 +0100
4 Subject: [PATCH] vc04_services: bcm2835-codec: Correct alignment requirements
7 The firmware wants the YUYV format stride alignment to be to a multiple
8 of 32pixels / 64 bytes. The kernel driver was configuring it to a multiple
9 of 16 pixels / 32 bytes, which then failed when it tried starting to
12 Correct the alignment requirements.
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
16 .../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 8 ++++----
17 1 file changed, 4 insertions(+), 4 deletions(-)
19 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
20 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
21 @@ -206,28 +206,28 @@ static const struct bcm2835_codec_fmt su
23 .fourcc = V4L2_PIX_FMT_YUYV,
25 - .bytesperline_align = { 32, 32, 32, 32, 32 },
26 + .bytesperline_align = { 64, 64, 64, 64, 64 },
28 .mmal_fmt = MMAL_ENCODING_YUYV,
29 .size_multiplier_x2 = 2,
31 .fourcc = V4L2_PIX_FMT_UYVY,
33 - .bytesperline_align = { 32, 32, 32, 32, 32 },
34 + .bytesperline_align = { 64, 64, 64, 64, 64 },
36 .mmal_fmt = MMAL_ENCODING_UYVY,
37 .size_multiplier_x2 = 2,
39 .fourcc = V4L2_PIX_FMT_YVYU,
41 - .bytesperline_align = { 32, 32, 32, 32, 32 },
42 + .bytesperline_align = { 64, 64, 64, 64, 64 },
44 .mmal_fmt = MMAL_ENCODING_YVYU,
45 .size_multiplier_x2 = 2,
47 .fourcc = V4L2_PIX_FMT_VYUY,
49 - .bytesperline_align = { 32, 32, 32, 32, 32 },
50 + .bytesperline_align = { 64, 64, 64, 64, 64 },
52 .mmal_fmt = MMAL_ENCODING_VYUY,
53 .size_multiplier_x2 = 2,