[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221101100448.66712-4-randy.li@synaptics.com>
Date: Tue, 1 Nov 2022 18:04:47 +0800
From: Hsia-Jun Li <randy.li@...aptics.com>
To: dri-devel@...ts.freedesktop.org
Cc: airlied@...ux.ie, daniel@...ll.ch, ezequiel@...guardiasur.com.ar,
helen.koike@...labora.com, hverkuil-cisco@...all.nl,
jszhang@...nel.org, laurent.pinchart@...asonboard.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, maarten.lankhorst@...ux.intel.com,
mchehab@...nel.org, mripard@...nel.org, nicolas@...fresne.ca,
ribalda@...omium.org, sakari.ailus@...ux.intel.com,
sebastian.hesselbarth@...il.com, tfiga@...omium.org,
tzimmermann@...e.de, "Hsia-Jun(Randy) Li" <randy.li@...aptics.com>
Subject: [PATCH v3 3/4] media: videodev2.h: add Synaptics tiled modifiers
From: "Hsia-Jun(Randy) Li" <randy.li@...aptics.com>
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@...aptics.com>
---
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
Powered by blists - more mailing lists