From 373923a8cddb0b1854d3040a6ba0cf016a244128 Mon Sep 17 00:00:00 2001
From: Anil Kumar M <amamidal@xilinx.com>
Date: Mon, 24 Feb 2020 14:45:46 +0530
Subject: [PATCH] v4l-utils: Add support for new media bus codes

Add new media bus format codes for supporting xilinx
specific formats.

Signed-off-by: Anil Kumar M <amamidal@xilinx.com>
---
 include/linux/media-bus-format.h | 12 ++++++++++++
 utils/media-ctl/libv4l2subdev.c  | 11 +++++++++++
 2 files changed, 23 insertions(+)

diff --git a/include/linux/media-bus-format.h b/include/linux/media-bus-format.h
index d6a5a3b..3fb2346 100644
--- a/include/linux/media-bus-format.h
+++ b/include/linux/media-bus-format.h
@@ -108,6 +108,18 @@
 #define MEDIA_BUS_FMT_YUV16_1X48		0x202a
 #define MEDIA_BUS_FMT_UYYVYY16_0_5X48		0x202b

+/* YUV: Xilinx Specific - next is       0x2109 */
+#define MEDIA_BUS_FMT_VYYUYY8_1X24		0x2100
+#define MEDIA_BUS_FMT_VYYUYY10_4X20		0x2101
+#define MEDIA_BUS_FMT_VUY10_1X30		0x2102
+#define MEDIA_BUS_FMT_UYYVYY12_4X24		0x2103
+#define MEDIA_BUS_FMT_VUY12_1X36		0x2104
+#define MEDIA_BUS_FMT_Y16_1X16			0x2105
+#define MEDIA_BUS_FMT_UYYVYY16_4X32		0x2106
+#define MEDIA_BUS_FMT_VUY16_1X48		0x2107
+#define MEDIA_BUS_FMT_UYVY16_2X32		0x2108
+
+
 /* Bayer - next is	0x3021 */
 #define MEDIA_BUS_FMT_SBGGR8_1X8		0x3001
 #define MEDIA_BUS_FMT_SGBRG8_1X8		0x3013
diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index a989efb..a37541f 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -34,6 +34,17 @@

 #include <linux/v4l2-subdev.h>

+/* YUV: Xilinx Specific - next is 0x2109 */
+#define MEDIA_BUS_FMT_VYYUYY8_1X24	(0x2100)
+#define MEDIA_BUS_FMT_VYYUYY10_4X20	(0x2101)
+#define MEDIA_BUS_FMT_VUY10_1X30	(0x2102)
+#define MEDIA_BUS_FMT_UYYVYY12_4X24	(0x2103)
+#define MEDIA_BUS_FMT_VUY12_1X36	(0x2104)
+#define MEDIA_BUS_FMT_Y16_1X16		(0x2105)
+#define MEDIA_BUS_FMT_UYYVYY16_4X32	(0x2106)
+#define MEDIA_BUS_FMT_VUY16_1X48	(0x2107)
+#define MEDIA_BUS_FMT_UYVY16_2X32	(0x2108)
+
 #include "mediactl.h"
 #include "mediactl-priv.h"
 #include "tools.h"
--
2.7.4
