a8fbeaf06261d94b55406f98be49b82520e65cbd
[openwrt/staging/linusw.git] /
1 From 43fa967811484afde0bbbee182ff8f29dc0550c2 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 5 Jul 2024 15:57:25 +0100
4 Subject: [PATCH 1186/1215] staging: bcm2835-codec: Disable HEADER_ON_OPEN for
5 video encode
6
7 Video encode can defer generating the header until the first
8 frame is presented, which allows it to take the colourspace
9 information from the frame rather than just the format.
10
11 Enable that for the V4L2 driver now that the firmware populates
12 all the parameters.
13
14 https://github.com/raspberrypi/firmware/issues/1885
15
16 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
17 ---
18 .../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 7 +++++++
19 1 file changed, 7 insertions(+)
20
21 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
22 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
23 @@ -2731,6 +2731,13 @@ static int bcm2835_codec_create_componen
24 &params,
25 sizeof(params));
26
27 + } else if (dev->role == ENCODE) {
28 + enable = 0;
29 + vchiq_mmal_port_parameter_set(dev->instance,
30 + &ctx->component->control,
31 + MMAL_PARAMETER_VIDEO_ENCODE_HEADER_ON_OPEN,
32 + &enable,
33 + sizeof(enable));
34 } else if (dev->role == ENCODE_IMAGE) {
35 enable = 0;
36 vchiq_mmal_port_parameter_set(dev->instance,