4c4c0ffa69a83bb2c85cecebdb067a7bdde8723c
[openwrt/staging/ansuel.git] /
1 From 346b7aa8f5b44101fc0c43eca615c26755c89e12 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
5 video
6
7 Add the buffer flags that the firmware uses to identify fields
8 on interlaced video
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 ---
12 .../vc04_services/vchiq-mmal/mmal-msg.h | 19 +++++++++++++++++++
13 1 file changed, 19 insertions(+)
14
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)
20
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.
26 + */
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)
33 +/*
34 + * Signals that the top field of the current interlaced frame should be
35 + * displayed first
36 + */
37 +#define MMAL_BUFFER_HEADER_VIDEO_FLAG_TOP_FIELD_FIRST \
38 + (MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START << 1)
39 +
40 struct mmal_driver_buffer {
41 u32 magic;
42 u32 component_handle;