[PATCH v1 02/13] media: tegra-video: vi: Drop controls consolidation into VI device
From: Svyatoslav Ryhel
Date: Wed Nov 25 2026 - 06:08:39 EST
Like any video-centric video input pipeline, Tegra VI combines all
controls from linked devices into a /dev/video*. This behavior is no
longer desired, since it causes conflicts when controls are duplicated and
does not allow including controls from auxiliary devices such as a VCM or
flash LEDs. Remove consolidation of all devices in the pipe into the VI
device.
Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
---
.../media/platform/nvidia/tegra-video/vi.c | 24 ++-----------------
1 file changed, 2 insertions(+), 22 deletions(-)
diff --git a/drivers/media/platform/nvidia/tegra-video/vi.c b/drivers/media/platform/nvidia/tegra-video/vi.c
index fa6114f4b9c8b..71921931457be 100644
--- a/drivers/media/platform/nvidia/tegra-video/vi.c
+++ b/drivers/media/platform/nvidia/tegra-video/vi.c
@@ -960,9 +960,6 @@ static int tegra_channel_setup_ctrl_handler(struct tegra_vi_channel *chan)
return chan->ctrl_handler.error;
}
#else
- struct v4l2_subdev *subdev;
- struct v4l2_ctrl *hflip, *vflip;
-
/* custom control */
v4l2_ctrl_new_custom(&chan->ctrl_handler, &syncpt_timeout_ctrl, NULL);
if (chan->ctrl_handler.error) {
@@ -973,27 +970,10 @@ static int tegra_channel_setup_ctrl_handler(struct tegra_vi_channel *chan)
return chan->ctrl_handler.error;
}
- subdev = tegra_channel_get_remote_source_subdev(chan);
- if (!subdev)
- return -ENODEV;
-
- ret = v4l2_ctrl_add_handler(&chan->ctrl_handler, subdev->ctrl_handler,
- NULL, true);
- if (ret < 0) {
- dev_err(chan->vi->dev,
- "failed to add subdev %s ctrl handler: %d\n",
- subdev->name, ret);
- v4l2_ctrl_handler_free(&chan->ctrl_handler);
- return ret;
- }
-
- hflip = v4l2_ctrl_find(subdev->ctrl_handler, V4L2_CID_HFLIP);
- if (chan->vi->soc->has_h_v_flip && !hflip)
+ if (chan->vi->soc->has_h_v_flip) {
v4l2_ctrl_new_std(&chan->ctrl_handler, &vi_ctrl_ops, V4L2_CID_HFLIP, 0, 1, 1, 0);
-
- vflip = v4l2_ctrl_find(subdev->ctrl_handler, V4L2_CID_VFLIP);
- if (chan->vi->soc->has_h_v_flip && !vflip)
v4l2_ctrl_new_std(&chan->ctrl_handler, &vi_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0);
+ }
#endif
/* setup the controls */
--
2.53.0