[PATCH 12/13] platform/raspberrypi: vchiq-mmal: Add defines for mmal_es_format flags

Jai Luthra posted 13 patches 3 months, 1 week ago
There is a newer version of this series
[PATCH 12/13] platform/raspberrypi: vchiq-mmal: Add defines for mmal_es_format flags
Posted by Jai Luthra 3 months, 1 week ago
From: Dave Stevenson <dave.stevenson@raspberrypi.com>

There is a flags field in struct mmal_es_format, but the defines
for what the bits meant weren't included in the headers.
For V4L2_PIX_FMT_NV12_COL128 support we need them, so add them in.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
---
 drivers/platform/raspberrypi/vchiq-mmal/mmal-msg-format.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/platform/raspberrypi/vchiq-mmal/mmal-msg-format.h b/drivers/platform/raspberrypi/vchiq-mmal/mmal-msg-format.h
index 5569876d8c7d60477893c17f00c2e501b49d364a..e8f5ca85a7c4184320b33996967a7a83e938d79b 100644
--- a/drivers/platform/raspberrypi/vchiq-mmal/mmal-msg-format.h
+++ b/drivers/platform/raspberrypi/vchiq-mmal/mmal-msg-format.h
@@ -53,6 +53,16 @@ union mmal_es_specific_format {
 	struct mmal_subpicture_format subpicture;
 };
 
+/* The elementary stream will already be framed */
+#define MMAL_ES_FORMAT_FLAG_FRAMED				BIT(0)
+/*
+ * For column formats we ideally want to pass in the column stride. This hasn't
+ * been the past behaviour, so require a new flag to be set should
+ * es->video.width be the column stride (in lines) instead of an ignored width
+ * value.
+ */
+#define MMAL_ES_FORMAT_FLAG_COL_FMTS_WIDTH_IS_COL_STRIDE	BIT(1)
+
 /* Definition of an elementary stream format (MMAL_ES_FORMAT_T) */
 struct mmal_es_format_local {
 	u32 type;	/* enum mmal_es_type */

-- 
2.51.0
Re: [PATCH 12/13] platform/raspberrypi: vchiq-mmal: Add defines for mmal_es_format flags
Posted by Krzysztof Kozlowski 3 months, 1 week ago
On 31/10/2025 18:27, Jai Luthra wrote:
> From: Dave Stevenson <dave.stevenson@raspberrypi.com>
> 
> There is a flags field in struct mmal_es_format, but the defines
> for what the bits meant weren't included in the headers.
> For V4L2_PIX_FMT_NV12_COL128 support we need them, so add them in.
> 
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
> ---
>  drivers/platform/raspberrypi/vchiq-mmal/mmal-msg-format.h | 10 ++++++++++

That's pointless change. We don't add unused header pieces. If this is
used, add it with the user in the same commit.


Best regards,
Krzysztof