1 From 226d10bbfa79e92aaca8bdf64ec2e0aebbfe7610 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Sun, 10 Jan 2021 19:05:17 +0000
4 Subject: [PATCH] staging/vchiq-mmal: Add buffer flags for interlaced
7 Add the buffer flags that the firmware uses to identify fields
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 .../vc04_services/vchiq-mmal/mmal-msg.h | 19 +++++++++++++++++++
13 1 file changed, 19 insertions(+)
15 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h
16 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h
17 @@ -253,6 +253,25 @@ struct mmal_msg_port_action_reply {
18 /* Signals that a buffer failed to be transmitted */
19 #define MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED BIT(10)
21 +/* Video buffer header flags
22 + * videobufferheaderflags
23 + * The following flags describe properties of a video buffer header.
24 + * As there is no collision with the MMAL_BUFFER_HEADER_FLAGS_ defines, these
25 + * flags will also be present in the MMAL_BUFFER_HEADER_T flags field.
27 +#define MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START_BIT 16
28 +#define MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START \
29 + (1 << MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START_BIT)
30 +/* Signals an interlaced video frame */
31 +#define MMAL_BUFFER_HEADER_VIDEO_FLAG_INTERLACED \
32 + (MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START << 0)
34 + * Signals that the top field of the current interlaced frame should be
37 +#define MMAL_BUFFER_HEADER_VIDEO_FLAG_TOP_FIELD_FIRST \
38 + (MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START << 1)
40 struct mmal_driver_buffer {