On Tue Sep 8 12:10:39 2026 +0200, Hans Verkuil wrote:
> The vim2m driver has two driver-specific controls, but the
> control IDs were never reserved in v4l2-control.h.
>
> While these control IDs clash with the range reserved for
> the old meye driver, since that meye driver has been removed
> from the kernel quite a long time ago we just officially claim
> that range for the vim2m driver.
>
> Signed-off-by: Hans Verkuil <[email protected]>
> Reported-by: Nicolas Dufresne <[email protected]>
> Closes:
> https://lore.kernel.org/linux-media/[email protected]/
> Reviewed-by: Nicolas Dufresne <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/test-drivers/vim2m.c | 4 ++--
include/uapi/linux/v4l2-controls.h | 9 +++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/drivers/media/test-drivers/vim2m.c
b/drivers/media/test-drivers/vim2m.c
index f4a2c4083829..459fd4aedf30 100644
--- a/drivers/media/test-drivers/vim2m.c
+++ b/drivers/media/test-drivers/vim2m.c
@@ -150,8 +150,8 @@ enum {
V4L2_M2M_DST = 1,
};
-#define V4L2_CID_TRANS_TIME_MSEC (V4L2_CID_USER_BASE + 0x1000)
-#define V4L2_CID_TRANS_NUM_BUFS (V4L2_CID_USER_BASE + 0x1001)
+#define V4L2_CID_TRANS_TIME_MSEC (V4L2_CID_USER_VIM2M_BASE + 0)
+#define V4L2_CID_TRANS_NUM_BUFS (V4L2_CID_USER_VIM2M_BASE + 1)
static struct vim2m_fmt *find_format(u32 fourcc)
{
diff --git a/include/uapi/linux/v4l2-controls.h
b/include/uapi/linux/v4l2-controls.h
index 3a2c0a7ba5e2..d17e41d51d2e 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -123,6 +123,15 @@ enum v4l2_colorfx {
#define V4L2_CID_USER_MEYE_BASE (V4L2_CID_USER_BASE +
0x1000)
#endif
+/*
+ * The base for the vim2m driver controls.
+ * We reserve 16 controls for this driver.
+ * The vim2m control range clashed with the meye control range, which was not
+ * intended, but since the meye driver has been removed, we can just keep the
+ * vim2m control range.
+ */
+#define V4L2_CID_USER_VIM2M_BASE (V4L2_CID_USER_BASE + 0x1000)
+
/* The base for the bttv driver controls.
* We reserve 32 controls for this driver. */
#define V4L2_CID_USER_BTTV_BASE (V4L2_CID_USER_BASE +
0x1010)
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]