bcm27xx: switch to kernel v6.1
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0507-staging-bcm2835-codec-Signal-the-firmware-to-stop-on.patch
1 From 672e3f61cf8bfd8eb578e19a87bc1ce4187cd546 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 16 Sep 2021 16:39:07 +0100
4 Subject: [PATCH] staging: bcm2835-codec: Signal the firmware to stop
5 on all changes
6
7 The firmware defaults to not stopping video decode if only the
8 pixel aspect ratio or colourspace change. V4L2 requires us
9 to stop decoding on any change, therefore tell the firmware
10 of the desire for this alternate behaviour.
11
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 ---
14 .../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 10 ++++++++++
15 .../staging/vc04_services/vchiq-mmal/mmal-parameters.h | 3 +++
16 2 files changed, 13 insertions(+)
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 @@ -2483,6 +2483,16 @@ static int bcm2835_codec_create_componen
21 MMAL_PARAMETER_VIDEO_VALIDATE_TIMESTAMPS,
22 &enable,
23 sizeof(enable));
24 + /*
25 + * Enable firmware option to stop on colourspace and pixel
26 + * aspect ratio changed
27 + */
28 + enable = 1;
29 + vchiq_mmal_port_parameter_set(dev->instance,
30 + &ctx->component->control,
31 + MMAL_PARAMETER_VIDEO_STOP_ON_PAR_COLOUR_CHANGE,
32 + &enable,
33 + sizeof(enable));
34 } else if (dev->role == DEINTERLACE) {
35 /* Select the default deinterlace algorithm. */
36 int half_framerate = 0;
37 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h
38 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h
39 @@ -682,6 +682,9 @@ enum mmal_parameter_video_type {
40
41 /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T */
42 MMAL_PARAMETER_VIDEO_VALIDATE_TIMESTAMPS,
43 +
44 + /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
45 + MMAL_PARAMETER_VIDEO_STOP_ON_PAR_COLOUR_CHANGE,
46 };
47
48 /** Valid mirror modes */