mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Sowjanya Komatineni <skomatineni@nvidia.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Hans Verkuil <hverkuil+cisco@kernel.org>,
	Mikko Perttunen <mperttunen@nvidia.com>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev
Subject: [PATCH v2 00/15] tegra-video: Convert to media-centric pipe
Date: Sun, 29 Nov 2026 20:07:07 +0200	[thread overview]
Message-ID: <20261129180722.142186-1-clamor95@gmail.com> (raw)

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


             reply	other threads:[~2026-11-29 18:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 18:07 Svyatoslav Ryhel [this message]
2026-11-29 18:07 ` [PATCH v2 01/15] staging: media: tegra-video: Move driver to media/platform/nvidia Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 02/15] media: tegra-video: vi: Drop controls consolidation into VI device Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 03/15] media: tegra-video: vi: Expose all sub-devices in the pipeline Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 04/15] media: tegra-video: vi: Drop subdevice passthrough and input ioctls Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 05/15] media: tegra-video: vi: Build bitmap of formats compatible with CSI/VIP instead of source Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 06/15] media: tegra-video: Expose SoC stepwise frame size limits Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 07/15] media: tegra-video: vi: Match fourcc against channel format bitmap Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 08/15] media: tegra-video: vi: Report stepwise frame sizes instead of querying subdev Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 09/15] media: tegra-video: vi: Configure capture format locally without subdev calls Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 10/15] media: tegra-video: vi: Implement link_validate for video entity Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 11/15] media: tegra-video: video: Resolve video device via media graph on notifications Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 12/15] media: tegra-video: Remove remote source subdev helper Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 13/15] media: tegra-video: csi: Scope pad and state ops to TPG mode Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 14/15] media: tegra-video: csi: Add pad and media operations for own CSI channels Svyatoslav Ryhel
2026-11-29 18:07 ` [PATCH v2 15/15] media: tegra-video: vip: Add pad and media operations for VIP Svyatoslav Ryhel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261129180722.142186-1-clamor95@gmail.com \
    --to=clamor95@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil+cisco@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=mchehab@kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=skomatineni@nvidia.com \
    --cc=thierry.reding@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®