[PATCH v2 00/15] tegra-video: Convert to media-centric pipe
From: Svyatoslav Ryhel
Date: Sun Nov 29 2026 - 13:07:50 EST
A minimal set of changes required to convert video-centric pipe into
media-centric. I know that moving to /media should be last commit,
but it may be beneficial to keep this history in the /media subsystem,
instead of leaving it in staging.
All changes were tested on:
LG Optimus Vu (P895) Tegra30 device:
- MT9M114 front sensor with complex topology and irregular pad mapping
- IMX111 rear sensor which has simple pixel array and a single pad
ASUS Transformer TF701T Tegra114 device:
- same MT9M114 front sensor
- OV5693 rear sensor which has simple pixel array and a single pad
Nvidia Tegra Note 7 (P1988) Tegra114 device:
- OV5693 rear sensor
They all work and produce images.
---
Changes in v2:
- added VIDEO_V4L2_SUBDEV_API selection
- fixed video device and tpg channels remaining if
v4l2_device_register_subdev_nodes() fails
- restore vidioc_enum_input(), vidioc_g_input(), vidioc_s_input()
- dropping bitmap entirely was switched to using it to sync
VI and CSI/VIP bridge formats
- tegra_channel_update_gangports() moved from
tegra_channel_set_subdev_active_fmt() into tegra_channel_init()
- switch to defining v4l2_frmsize_stepwise as part of VI SoC
instead of filling it via vi_fmt_align()
- restored and fixed tegra_get_format_by_fourcc() logic, it
matched only first instance of pixelformat, though it may not be
supported
- updated tegra_channel_enum_framesizes() to use v4l2_frmsize_stepwise
from VI SoC
- upgraded __tegra_channel_try_format() to accept and fill
tegra_video_format struct
- changed to tegra_channel_enum_format() dropped
- updated tegra_channel_link_validate() logic to use active format from
tegra_vi_channel struct
- in tegra_v4l2_dev_notify() use parsing of media tree to get video
device instead of blindly v4l2_get_subdev_hostdata() from subdev
- in tegra_channel_get_remote_csi_subdev() added tegra_csi_tpg_ops check
- updated tegra_csi_enum_bus_code() and tegra_vip_enum_bus_code() logic
---
Jonas Schwöbel (1):
media: tegra-video: vi: Match fourcc against channel format bitmap
Svyatoslav Ryhel (14):
staging: media: tegra-video: Move driver to media/platform/nvidia
media: tegra-video: vi: Drop controls consolidation into VI device
media: tegra-video: vi: Expose all sub-devices in the pipeline
media: tegra-video: vi: Drop subdevice passthrough and input ioctls
media: tegra-video: vi: Build bitmap of formats compatible with
CSI/VIP instead of source
media: tegra-video: Expose SoC stepwise frame size limits
media: tegra-video: vi: Report stepwise frame sizes instead of
querying subdev
media: tegra-video: vi: Configure capture format locally without
subdev calls
media: tegra-video: vi: Implement link_validate for video entity
media: tegra-video: video: Resolve video device via media graph on
notifications
media: tegra-video: Remove remote source subdev helper
media: tegra-video: csi: Scope pad and state ops to TPG mode
media: tegra-video: csi: Add pad and media operations for own CSI
channels
media: tegra-video: vip: Add pad and media operations for VIP
MAINTAINERS | 2 +-
drivers/media/platform/nvidia/Kconfig | 2 +
drivers/media/platform/nvidia/Makefile | 1 +
.../platform/nvidia}/tegra-video/Kconfig | 1 +
.../platform/nvidia}/tegra-video/Makefile | 0
.../platform/nvidia}/tegra-video/csi.c | 299 +++++++---
.../platform/nvidia}/tegra-video/csi.h | 0
.../platform/nvidia}/tegra-video/tegra20.c | 10 +
.../platform/nvidia}/tegra-video/tegra210.c | 10 +
.../platform/nvidia}/tegra-video/vi.c | 548 +++---------------
.../platform/nvidia}/tegra-video/vi.h | 4 +-
.../platform/nvidia}/tegra-video/video.c | 74 ++-
.../platform/nvidia}/tegra-video/video.h | 0
.../platform/nvidia}/tegra-video/vip.c | 94 ++-
.../platform/nvidia}/tegra-video/vip.h | 0
drivers/staging/media/Kconfig | 2 -
drivers/staging/media/Makefile | 1 -
drivers/staging/media/tegra-video/TODO | 5 -
18 files changed, 495 insertions(+), 558 deletions(-)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/Kconfig (94%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/Makefile (100%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/csi.c (75%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/csi.h (100%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/tegra20.c (99%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/tegra210.c (99%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/vi.c (74%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/vi.h (99%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/video.c (78%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/video.h (100%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/vip.c (72%)
rename drivers/{staging/media => media/platform/nvidia}/tegra-video/vip.h (100%)
delete mode 100644 drivers/staging/media/tegra-video/TODO
--
2.53.0