[PATCH v12 42/86] media: uapi: Add more media bus codes for generic raw formats

Sakari Ailus
2026-04-09T20:15:40Z

Add new generic raw media bus codes for serial buses at bit depths or 16,
20, 24 and 28.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
Documentation/userspace-api/media/v4l/subdev-formats.rst | 8 ++++++++
include/uapi/linux/media-bus-format.h | 6 +++++-
2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index b207119415f1..4b832118060a 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -3890,6 +3890,14 @@ affect the pattern is conveyed via the :ref:`V4L2_CID_CFA_PATTERN_FLIP
- 12
* - MEDIA_BUS_FMT_RAW_14
- 14
+ * - MEDIA_BUS_FMT_RAW_16
+ - 16
+ * - MEDIA_BUS_FMT_RAW_20
+ - 20
+ * - MEDIA_BUS_FMT_RAW_24
+ - 24
+ * - MEDIA_BUS_FMT_RAW_28
+ - 28

Packed YUV Formats
^^^^^^^^^^^^^^^^^^
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index 83feeae6a31e..40912155c741 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -190,10 +190,14 @@
#define MEDIA_BUS_FMT_META_20 0x8006
#define MEDIA_BUS_FMT_META_24 0x8007

-/* Generic (CFA independent) pixel data formats. Next is 0x9005. */
+/* Generic (CFA independent) pixel data formats. Next is 0x9009. */
#define MEDIA_BUS_FMT_RAW_8 0x9001
#define MEDIA_BUS_FMT_RAW_10 0x9002
#define MEDIA_BUS_FMT_RAW_12 0x9003
#define MEDIA_BUS_FMT_RAW_14 0x9004
+#define MEDIA_BUS_FMT_RAW_16 0x9005
+#define MEDIA_BUS_FMT_RAW_20 0x9006
+#define MEDIA_BUS_FMT_RAW_24 0x9007
+#define MEDIA_BUS_FMT_RAW_28 0x9008

#endif /* __LINUX_MEDIA_BUS_FORMAT_H */
--
2.47.3