summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlain Volmat <alain.volmat@foss.st.com>2026-08-21 08:38:12 +0200
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-09-09 09:16:32 +0200
commite31bd1eb17f927d067e40916abb17c4ce5f95ece (patch)
tree6b85e0699b3a750b126f443f5e333da885bd1eca
parenta231ed57976e32d2f9c8d93904803023a65824e9 (diff)
downloadlinux-next-e31bd1eb17f927d067e40916abb17c4ce5f95ece.tar.gz
linux-next-e31bd1eb17f927d067e40916abb17c4ce5f95ece.zip
media: uapi: Add controls for ST DCMIPP Driver
Add definitions and documentation for the custom control provided by the DCMIPP driver in order to control the pixelproc gamma correction. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
-rw-r--r--Documentation/userspace-api/media/drivers/dcmipp.rst14
-rw-r--r--Documentation/userspace-api/media/drivers/index.rst1
-rw-r--r--include/uapi/linux/media/st/dcmipp_config.h16
-rw-r--r--include/uapi/linux/v4l2-controls.h6
4 files changed, 37 insertions, 0 deletions
diff --git a/Documentation/userspace-api/media/drivers/dcmipp.rst b/Documentation/userspace-api/media/drivers/dcmipp.rst
new file mode 100644
index 000000000000..ed4272da4b68
--- /dev/null
+++ b/Documentation/userspace-api/media/drivers/dcmipp.rst
@@ -0,0 +1,14 @@
+.. SPDX-License-Identifier: GPL-2.0-only
+
+ST DCMIPP driver
+================
+
+The ST DCMIPP driver implements a driver specific control as part of its
+pixelproc subdev.
+
+``V4L2_CID_DCMIPP_PIXELPROC_GAMMA_CORRECTION_ENABLE (boolean)``
+ Enable / disable the gamma correction block.
+
+ The DCMIPP PixelProc stage implements a gamma compression on each R, G, B
+ component, using a static gamma exponent 2.2.
+ The gamma is implemented as a 7-segment linear curve.
diff --git a/Documentation/userspace-api/media/drivers/index.rst b/Documentation/userspace-api/media/drivers/index.rst
index 02967c9b18d6..8d2c489b8453 100644
--- a/Documentation/userspace-api/media/drivers/index.rst
+++ b/Documentation/userspace-api/media/drivers/index.rst
@@ -30,6 +30,7 @@ For more details see the file COPYING in the source distribution of Linux.
camera-sensor
ccs
cx2341x-uapi
+ dcmipp
dw100
imx-uapi
mali-c55
diff --git a/include/uapi/linux/media/st/dcmipp_config.h b/include/uapi/linux/media/st/dcmipp_config.h
new file mode 100644
index 000000000000..ad8d146820ea
--- /dev/null
+++ b/include/uapi/linux/media/st/dcmipp_config.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * ST DCMIPP Driver - Userspace API
+ *
+ * Copyright (C) STMicroelectronics SA 2026
+ */
+
+#ifndef __UAPI_DCMIPP_CONFIG_H
+#define __UAPI_DCMIPP_CONFIG_H
+
+#include <linux/types.h>
+#include <linux/v4l2-controls.h>
+
+#define V4L2_CID_DCMIPP_PIXELPROC_GAMMA_CORRECTION_ENABLE (V4L2_CID_USER_DCMIPP_BASE + 0x0)
+
+#endif /* __UAPI_DCMIPP_CONFIG_H */
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index affec0ab4781..42b4f82afeb8 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -234,6 +234,12 @@ enum v4l2_colorfx {
*/
#define V4L2_CID_USER_MALI_C55_BASE (V4L2_CID_USER_BASE + 0x1230)
+/*
+ * The base for the ST DCMIPP driver controls.
+ * We reserve 16 controls for this driver
+ */
+#define V4L2_CID_USER_DCMIPP_BASE (V4L2_CID_USER_BASE + 0x1240)
+
/* MPEG-class control IDs */
/* The MPEG controls are applicable to all codec controls
* and the 'MPEG' part of the define is historical */