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
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.
11 Enable that for the V4L2 driver now that the firmware populates
14 https://github.com/raspberrypi/firmware/issues/1885
16 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
18 .../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 7 +++++++
19 1 file changed, 7 insertions(+)
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
27 + } else if (dev->role == ENCODE) {
29 + vchiq_mmal_port_parameter_set(dev->instance,
30 + &ctx->component->control,
31 + MMAL_PARAMETER_VIDEO_ENCODE_HEADER_ON_OPEN,
34 } else if (dev->role == ENCODE_IMAGE) {
36 vchiq_mmal_port_parameter_set(dev->instance,