[PATCH v3 3/4] media: videodev2.h: add Synaptics tiled modifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Hsia-Jun(Randy) Li" <randy.li@xxxxxxxxxxxxx>

These modifiers would have the same values as the one defined
in drm_fourcc.h, they would just be named in v4l2 style.

Signed-off-by: Hsia-Jun(Randy) Li <randy.li@xxxxxxxxxxxxx>
---
 include/uapi/linux/videodev2.h | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index d00b2e9c0c54..71136f29362e 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -820,6 +820,8 @@ struct v4l2_pix_format {
  *  F O R M A T   M O D I F I E S
  */
 /* Vendor Ids: */
+#define V4L2_PIX_FMT_MOD_VENDOR_SYNAPTICS 0x0b
+
 #define V4L2_PIX_FMT_RESERVED           ((1ULL << 56) - 1)
 
 #define fourcc_mod_get_vendor(modifier) \
@@ -835,6 +837,34 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_MOD_INVALID  fourcc_mod_code(NONE, V4L2_PIX_FMT_RESERVED)
 #define V4L2_PIX_FMT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
 
+/* Synaptics VideoSmart modifiers */
+#define V4L2_PIX_FMT_MOD_SYNA_V4_TILED            fourcc_mod_code(SYNAPTICS, 1)
+#define V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(f, m, p, g, h, v, c) \
+	fourcc_mod_code(SYNAPTICS, ((__u64)((f) & 0xff) | \
+				 ((__u64)((m) & 0xff) << 8) | \
+				 ((__u64)((p) & 0xf) << 16) | \
+				 ((__u64)((g) & 0x1) << 20) | \
+				 ((__u64)((h) & 0xf) << 24) | \
+				 ((__u64)((v) & 0xf) << 28) | \
+				 ((__u64)((c) & 0x1) << 36)))
+
+#define V4L2_PIX_FMT_MOD_SYNA_V4H1 \
+	V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 1, 0, 0, 0, 0, 0)
+
+#define V4L2_PIX_FMT_MOD_SYNA_V4H3P8 \
+	V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 3, 8, 0, 0, 0, 0)
+
+#define V4L2_PIX_FMT_MOD_SYNA_V4H1_64L4C \
+	V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 1, 0, 1, 6, 2, 1)
+
+#define V4L2_PIX_FMT_MOD_SYNA_V4H3P8_64L4C \
+	V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 3, 8, 1, 6, 2, 1)
+
+#define V4L2_PIX_FMT_MOD_SYNA_V4H1_128L128C \
+	V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 1, 0, 1, 7, 7, 1)
+
+#define V4L2_PIX_FMT_MOD_SYNA_V4H3P8_128L128C \
+	V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 3, 8, 1, 7, 7, 1)
 
 /*
  *	F O R M A T   E N U M E R A T I O N
-- 
2.17.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux