[{"id":39854,"web_url":"https://patchwork.libcamera.org/comment/39854/","msgid":"<20260724214259.GB1059400@killaraus.ideasonboard.com>","date":"2026-07-24T21:42:59","subject":"Re: [RFC PATCH 0/1] Add NVIDIA Tegra VI pipeline handler","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Magdum,\n\nOn Fri, Jul 24, 2026 at 07:47:00PM +0200, Magdum wrote:\n> ***\n> I have written a new libcamera pipeline handler for NVIDIA Tegra-based\n> Jetson boards (Nano, TX2, Xavier NX, AGX Xavier, AGX Orin). Before\n> submitting it upstream I need real-hardware test reports.\n> \n> If you have a Jetson board with a CSI camera attached and a mainline\n> kernel, **your help would be greatly appreciated**.\n\nI'm curious, how did you develop this without hardware access ? The\ndiffstat says\n\n5 files changed, 1110 insertions(+), 1 deletion(-)\n\nThat's quite a large amount of new code to be reasonably confident it's\nready for testing by other people if you haven't been able to test it at\nall.\n\n> ---\n> \n> ## What this patch does\n> \n> Adds support for the Tegra VI (Video Input) camera pipeline to libcamera,\n> covering:\n> \n> - Jetson Nano / TX2 / Xavier (tegra-vi driver)\n> - Jetson AGX Orin / Orin NX / Orin Nano (tegra234-vi driver)\n> \n> The pipeline routes raw Bayer frames from the sensor through the CSI\n> bridge into VI capture buffers, then uses libcamera's SoftwareISP to\n> debayer and apply AGC/AWB/CCM so the application receives a usable RGB\n> or YUV frame.\n> \n> ---\n> \n> ## Prerequisites\n> \n> ### Hardware\n> - Any Jetson board (Nano / TX2 / Xavier NX / AGX Xavier / AGX Orin)\n> - A CSI camera module with an upstream kernel sensor driver\n> \n> ### Kernel\n> - **Mainline kernel 6.x** (not NVIDIA's downstream BSP kernel).\n>   The tegra-video driver must be present and the sensor driver loaded.\n> \n>   Verify with:\n>   ```bash\n>   # Should list a tegra-vi or tegra234-vi media device\n>   media-ctl -p\n> \n>   # Should show your sensor as a V4L2 subdevice\n>   v4l2-ctl --list-devices\n>   ```\n> \n> ### Software dependencies\n> ```bash\n> # Ubuntu / Debian\n> sudo apt install \\\n>     meson ninja-build pkg-config \\\n>     libglib2.0-dev libudev-dev libyaml-dev \\\n>     python3-yaml python3-ply python3-jinja2 \\\n>     libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \\\n>     qtbase5-dev  # optional, needed only for qcam GUI\n> ```\n> \n> ---\n> \n> ## Build instructions\n> \n> ```bash\n> git clone https://git.libcamera.org/libcamera/libcamera.git\n> cd libcamera\n> \n> # Apply the provided tegra patch\n> git am 0001-pipeline-Add-NVIDIA-Tegra-VI-pipeline-handler.patch\n> \n> meson setup build \\\n>     -Dpipelines=tegra \\\n>     -Dipas=simple \\\n>     -Ddocumentation=disabled\n> \n> ninja -C build\n> ```\n> \n> ---\n> \n> ## Test procedure\n> \n> ### 1. Verify the camera is detected\n> \n> ```bash\n> ./build/src/apps/cam/cam --list\n> ```\n> \n> Expected output (sensor name will vary):\n> ```\n> Available cameras:\n> 1: /base/soc/cam0_regulator/... (imx219)\n> ```\n> \n> If no cameras are listed, check `dmesg` for errors from `tegra-csi`,\n> `tegra-vi`, or the sensor driver.\n> \n> ---\n> \n> ### 2. Basic capture smoke test\n> \n> ```bash\n> # Capture 30 frames, no output file — just check for errors\n> ./build/src/apps/cam/cam \\\n>     -c 1 \\\n>     -s width=1280,height=720,pixelformat=RGB888 \\\n>     --capture=30\n> ```\n> \n> Expected: no error messages, final line reports 30 frames completed.\n> \n> ---\n> \n> ### 3. Save frames to disk and inspect\n> \n> ```bash\n> ./build/src/apps/cam/cam \\\n>     -c 1 \\\n>     -s width=1920,height=1080,pixelformat=RGB888 \\\n>     --capture=10 \\\n>     --file=/tmp/frame-#.ppm\n> \n> # Open a frame (any image viewer works)\n> eog /tmp/frame-0.ppm\n> ```\n> \n> Expected: a recognisable, correctly-coloured image of the scene.  It may\n> be slightly dark or slightly over-exposed in the first few frames while\n> AGC converges — that is normal.\n> \n> ---\n> \n> ### 4. Live preview (optional, requires Qt)\n> \n> ```bash\n> ./build/src/apps/qcam/qcam\n> ```\n> \n> Expected: a live preview window showing the camera feed.\n> \n> ---\n> \n> ### 5. Stress / reliability test\n> \n> ```bash\n> # 20 start/stop cycles — tests cleanup and resource release\n> for i in $(seq 1 20); do\n>     ./build/src/apps/cam/cam \\\n>         -c 1 \\\n>         -s width=1280,height=720,pixelformat=RGB888 \\\n>         --capture=5\n> done\n> \n> # Check dmesg for warnings or errors after the run\n> dmesg | grep -i \"tegra\\|csi\\|isp\\|cam\" | tail -20\n> ```\n> \n> ---\n> \n> ## What to report back\n> \n> Please reply with the following information:\n> \n> ```\n> Board:        e.g. Jetson Nano 4GB / AGX Orin 32GB\n> Kernel:       e.g. 6.8.0 mainline\n> Camera:       e.g. IMX219 (Raspberry Pi Camera v2)\n> Driver:       tegra-vi  /  tegra234-vi\n> \n> Test 1 – cam --list:          PASS / FAIL\n> Test 2 – 30-frame capture:    PASS / FAIL\n> Test 3 – PPM image quality:   PASS / FAIL / (describe issues)\n> Test 4 – Live preview:        PASS / FAIL / SKIP\n> Test 5 – Stress test:         PASS / FAIL\n> \n> dmesg errors (if any):\n> <paste relevant lines>\n> \n> Additional notes:\n> <anything unusual you observed>\n> ```\n> \n> ---\n> \n> ## Known limitations\n> \n> - Only a single output stream is supported per camera.\n> - Hardware rotation/flip is not supported (Rotate0 only).\n> - Hardware ISP (ISP7 on Tegra234/Orin) is not yet supported — frames are\n>   processed by the CPU-based SoftwareISP.  This means image quality and\n>   CPU load will be lower and higher respectively than a hardware ISP path.\n>   ISP7 support will be added in a follow-up once the upstream kernel driver\n>   is available.\n> \n> ---\n> \n> ## Contact\n> \n> Please send test results to the libcamera mailing list:\n> **libcamera-devel@lists.libcamera.org**\n> \n> Or open a discussion on the libcamera GitLab:\n> **https://gitlab.freedesktop.org/camera/libcamera**\n> \n> Thank you for your time!\n> ***\n> \n> Magdum (1):\n>   pipeline: Add NVIDIA Tegra VI pipeline handler\n> \n>  include/libcamera/ipa/meson.build        |    1 +\n>  meson_options.txt                        |    1 +\n>  src/libcamera/pipeline/tegra/meson.build |    5 +\n>  src/libcamera/pipeline/tegra/tegra.cpp   | 1102 ++++++++++++++++++++++\n>  src/libcamera/software_isp/meson.build   |    2 +-\n>  5 files changed, 1110 insertions(+), 1 deletion(-)\n>  create mode 100644 src/libcamera/pipeline/tegra/meson.build\n>  create mode 100644 src/libcamera/pipeline/tegra/tegra.cpp","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 50DDBC3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Jul 2026 21:43:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6A27667F40;\n\tFri, 24 Jul 2026 23:43:03 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D37A067F22\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Jul 2026 23:43:01 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CA4FC73B;\n\tFri, 24 Jul 2026 23:41:59 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Vb8iBFvI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1784929320;\n\tbh=bvXBo5RmgxfE0r5GHxEFk6EMpR0UWeSJwlLnqfjk7+c=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Vb8iBFvIQclx+KfkkPD7GkAGEAvC1bwy2W0RCeSslRUZry44HjthPnqnnJ3L+i4JK\n\tUlLBPWx4rfGtcH1TDUHsD+j2XKvyYq/TZKpuO+Sho5rRofp5vGO0K1pm0E5A5oafS2\n\twiA6ubDyfy4ckccXgMjFMBp98fFisISzWEai+I/M=","Date":"Sat, 25 Jul 2026 00:42:59 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Magdum <magdum.foss@gmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH 0/1] Add NVIDIA Tegra VI pipeline handler","Message-ID":"<20260724214259.GB1059400@killaraus.ideasonboard.com>","References":"<20260724174705.9411-1-magdum.foss@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260724174705.9411-1-magdum.foss@gmail.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]