Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795975663; b=COE+T17sjRfbq2B8Xl7WOag6pmpB1iIwQiLC/szz27iQ2rw91/TXlBR2QC6M/qxwJTlO a7h4/ojsReBgqJaoBxuPnEWvXACsyBVF0oClB9NjFsR3oADCR6ZClUbFw1pO7bzDwu88l X+SZ13cHCtXmGPKRS7FN4/6m77ccEIfcaH/K4Nfd/oRVQjVOvoCKCo3dBp7h54KAs1kKi LJXEgWe1hZyK5z4DjxhltgX+XoFQJcNW/JC9KulcK+pvVAOnrKSAILyNJjEYD5s0Yzv7M Yc8P5e5zp+u00eqr+gzXCqLN078AVwLsXMSlDaUUzs4vOtRVlC0J2ua84Ze2FRmr4nw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795975663; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=VB5bBrVvNVapfYAfkkAr7UxhWjkZZLFqqWRzKsru7Go=; b=Zy6Vb+ttvfPNUevj4WoFYe5BhBVNF0Adc8OGDVemeltL41z9Ska1w+kTjIHe3VSuAChf S9+iIj7u5yfFOtMpf+SLjhas1R2JCWbGTWNrifU3gtVUXxyUZmsoZsurSQQ43d3KzyoZR xz18MkxP4x7xuRGYbbkXITRFS9RxuhjZrYtG/Kk0KPxIjS10FKF+qxa7JQ0It5KX4nDtn 3M0CUyUO1hYmAZT9y01INFOjiZyOL4bznJsmnH/YJgQH7j1OJbfrFoIWkatbVz2egpJi+ pWgCo8MF+DQzpsajEbDV+Wm9AqnWkyAKROEUJilVJS18j2aakAhoz9Mp39UD4JeQrzw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=VqFP3BHP; arc=none smtp.remote-ip=209.85.218.44 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BDA3606A323 for ; Sun, 29 Nov 2026 18:07:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9BDA3606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=VqFP3BHP Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-c506a231b88so1277124666b.3 for ; Sun, 29 Nov 2026 10:07:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795975661; x=1796580461; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=VB5bBrVvNVapfYAfkkAr7UxhWjkZZLFqqWRzKsru7Go=; b=VqFP3BHPIcnuCKAMJJeSJgNGRtcl58zdvJ/3ddGFAD5cPO47OEgCXdle4QBnJPyrty s3y1lGlwzU60aj2CgXWyGnP88mYTR1X+tDcwtUIS2I+AggCoYKXRCe3V1mJbBamNzDY2 zMh+fdiIyYTDIytJwSzOa8Rmp7vuT1vjitzkLPM1aNfpsF/zJJGmLjRNeR4gNuz/nQKV gsn5ZIjuGrTmsT5HCEj9D+mq/hzo3UBDrpkDspC50pKcHgxBmPKKLllhdVyOr7g8pmiL bOOoSI7MY/cY2zUDmIRfH93tvfV6Jp4NR1CrYPjn5xSAWsya3pAFEgRwzeLFQUkpHhIT o9Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795975661; x=1796580461; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=VB5bBrVvNVapfYAfkkAr7UxhWjkZZLFqqWRzKsru7Go=; b=fVBpswNGyJLbng6j1tW0//SLRC0xgNd2RU5gxa6tYVFw4nIZ6l7eg6H2ykzmCuj97+ k9PBirviLiBJKgQw++MEyvGVow4kWDgbcYhvlbGhrG29cqh9uiWHyFYpcz77Yo0km8Y3 vzbr+zxEKH0+WoKX5ZfbeuFVS00lvmQilm5a1YGkzb64W/MQ7Be4wDaDcQyjtUTFdAHJ 4fH/5pV/hh9tJqctMfNM7yxKm7v22CZ6jbQSUWBA+3rNq1jn92Mj6amrSDveuLVkEpqj a5tFlLtEr7XKtjhG9BcgZWLcTdjfjzeeO9orywAAq7d8crCCJjfq7iXxjWmsQM+SMEN7 zLvQ== X-Forwarded-Encrypted: i=1; AL+hErH6gcTTMbiqNol80ssbyl0Nnuwnv6ZeatZrrsK5al5Fiflhwdtl1GC331khL+t3oowaohmZGAHxewtJXg==@vger.kernel.org X-Gm-Message-State: APuU4Z98WEsLmWbIPK5yEfARzh7xuOavIhvNqtp7AJBD0ondlBhnQ1+G xr0FesqkymwLk6X621ZNPyGmPtMQD+WeYVnZmkqFZHwJhQ0JHTYswwvYyXnKYQ== X-Gm-Gg: AZFdTZfFbJGdW+5pj+Nsh8CDvBHOxVqTm6m5MPgbXTlUS3GwFdWC8ARKyPSr6X7BQyN AtgY8op2eMVDGs6giq5IwBRzTzbG5BGwIUCoJ16vsnQZ6Pwq3E/4cei4hBPxPOGhf1gUz1VE2Aw /86mfyZSHOBC2wHuvpzI2PsA6fTkmkdkkup1QXAxoFnTIfyxWJHlnOJowZwejUPXGI0H0MlAFtQ Gukk7tsC0qOsxrrPiSZZcMe/J6jc0xXwAI6fDsx6Lwy0ESMMUaSLdwKbzm1BKiW6nmaGIn273Kx eCMJxzy5Jp62xon3xxVaP0/LaIpIeyasMWeM9tWE/SDIA2jbIB08TNDUvHg8I/sc3JhKBkd1mb7 utkCXgf3o5xQ7boRPQYzDT6ombV7Np5pO3PYOZBity/zXpN9uDmoEEt4vJ0uU+U7k7w9xBRg9/T L6brdjNQ6vnkGkmQJK/CCqU5U6nULknUAJIO0M4rTEBf3fd27RbFbjLtEvi3gFSyiGtKkfMvk1V g7XCy0Oi6YyWcPnl9fAcz/R3XClbS56JytL9UDXVsgqxURMzj55iCVmIqXFVU+O+miyd8Luolyj K1wDu3Nam9uRYh6bT5yMa7Qe1JX1lVhItLh9eADzed7WCkOo2bN54I+jswvscRCwaDT6TMht7Ys ZANHzAM7NVQ== X-Received: by 2002:a17:907:6e90:b0:c2d:fade:e089 with SMTP id a640c23a62f3a-c513a1e6bcemr2458268166b.0.1795975660783; Sun, 29 Nov 2026 10:07:40 -0800 (PST) Received: from xeon ([188.163.112.54]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ae8ce16sm1061518266b.37.2026.11.29.10.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 10:07:40 -0800 (PST) From: Svyatoslav Ryhel To: Mauro Carvalho Chehab , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Greg Kroah-Hartman , Svyatoslav Ryhel , Hans Verkuil , Mikko Perttunen 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 Message-ID: <20261129180722.142186-1-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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