From patchwork Tue Jul 21 14:59:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 27426 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D764BBDE4C for ; Tue, 21 Jul 2026 15:00:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AA98A67E63; Tue, 21 Jul 2026 17:00:06 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="F/LKO6Zx"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="csBkZ8Ap"; dkim-atps=neutral Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B1ED36601C for ; Tue, 21 Jul 2026 17:00:04 +0200 (CEST) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66LDg6kD1971464 for ; Tue, 21 Jul 2026 15:00:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=fOscw1Wh57sgqsKkzp/30KNYpsC16PRBtJR x7p0NUK8=; b=F/LKO6ZxRjEpltzlLaKF/GpA35NgTF0KdQRwK/Hofjgd7PjmffC /UnP63eGymVN4vr0F/OVsRGjuNwD0BKgbFcaSMGl78tXkEnz2i3mtDaLrcABByHd uL+e9HRHWRkO22xYDErmXsYJX5sA07hessNQaiAqhABVvc1uvPmrujpkclXAfaeo Y0+2Zx9dqmrxlTxpDe+efvBI06Iwxt8nwA1gYYTE/cuPTB90hjChnaHBFlckuhrh 5T6fwOV/FydW5XbYxg7n32l2C4nL2lWafgOdccbjahnj1jUa+3rlEAa7zlX45Phc MB8fQ8ZSYXCbrbPN3BfOuj1Umpps9j1xGpQ== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fj6861fhy-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 21 Jul 2026 15:00:02 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-51c21c01cf3so178059561cf.2 for ; Tue, 21 Jul 2026 08:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784646002; x=1785250802; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=fOscw1Wh57sgqsKkzp/30KNYpsC16PRBtJRx7p0NUK8=; b=csBkZ8ApLfKaZgVfMFHY7swQ6Zl8h0rkGxJ63GMZtiLRpV+C7J1ljZINDZC8e31VJW h3qlY6BXl9VhU2LEeWgxiovJBjBSNVOjHrHMt4NeWJp4bJhiWc+Pa+prYywdDjhBuoZp raixpTVTC7WRrc93XHsCGqx2Dnw2bLsbqPva/CML3FRd8ZG+8kLtp3OFu2BGx1qjMgPn YtvGmcxZSvjtpdOmQdZe1g3vrJvNRftBwwYo9girEayW9Axjx/nHPxyB2mRbOuKMYWve nbmZ600LFzNy/cXsenjaRE5lDhxKXiaianUeIvmWzssowsP4HbLXEqR8twvcxdcI9yOk tf5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784646002; x=1785250802; h=content-transfer-encoding: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=fOscw1Wh57sgqsKkzp/30KNYpsC16PRBtJRx7p0NUK8=; b=FTaepB8g+Au+0mxNLQ88oFAKPF0NPN8FfU+s1TQ+r+pbpPNMD3to2vYBUO/i9gvnHc S3h3w/clz7GYwURY2m9P3FlE7oALL6md9kj0q2ukrWFzyanqcNeKuAerwUUhwIXJEzRP aNI7KYv0Vcr0SlkjzwlL3vKT1Akg2crpoFBUGnYe5apKB419726iTtyOKeMXFdaliQWN Q0fqdFOh7sCjZAD72WqYTQfZb5NArc9IbpjwtV9rR7Jye2OkL4QV7iMfHdDYZ8ItSmh6 eJNPVEqeevCTFmxRbGTwuowO1dFxI2XFcYZ9uRsLxoH+EawNhVJxry6c8JCRH021L74X zXng== X-Gm-Message-State: AOJu0YwuLlgwnQ3+jGuwvXPpBgeA7Ho3NSZmtkc+M6/ebCzn1YPeMrBd qb+HNd07Even+1yeD6V8vUarTWbH2e7sdky8Mj+67GUeA0LBNEuMRE54klThZIhVdwGWW78/qfh /QmrhXQ6bVDqkygNc9Xjc4NSJOJThRyCC5DO4xH+KK2i++hfvPEQyLAlsnRlQHoo3pqqj6cDNKF cl3IiFqlbf X-Gm-Gg: AfdE7cnV7ZQ4f6YWank52b3lUxEI0LJAQ9yegmC1DzoT0qQh/KnpSWze2swqnL04RK2 Zzki6DRN10Y7GxPkQ2KXFJOU8S5M7TtD1ojBzbiPqiq590oHGYKx6csy4x1vG6BCx2/FQjhN5Lk WNjPuhQ3kDoRlPJvLQ24NMdTbzNS/4froqJLgaXGPdRvWo0FzhqJ73nHSjP2waOpkcxS37+DA38 gfyTijPnqejnayRbFkPcvCggp3p5bYrh9nJAr3/zdPePS/5aAbVPTtoxnximvXGzI2DSzuIWtMA jZ6wZruUR3ei6Y5leAfzG4qM3L1N0wKfLUTT8FalM/MVkS+zhtIc9FWqojkMDoegN0VhUD1vepk OjjsZCJJRP6S7O0kYo+WnzJFFkeut+SBvbTxxDb63luOvIZlZh+fR5szWDl7/zfFeF5qem6Efd/ hFSO3JgUw5c3V39V0= X-Received: by 2002:a05:622a:4110:b0:51a:8b64:69e0 with SMTP id d75a77b69052e-5213d2b7109mr176630391cf.11.1784646001705; Tue, 21 Jul 2026 08:00:01 -0700 (PDT) X-Received: by 2002:a05:622a:4110:b0:51a:8b64:69e0 with SMTP id d75a77b69052e-5213d2b7109mr176629721cf.11.1784646000444; Tue, 21 Jul 2026 08:00:00 -0700 (PDT) Received: from shalem (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c1712a5f837sm615968066b.32.2026.07.21.07.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2026 07:59:59 -0700 (PDT) From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Loic Poulain , Hans de Goede Subject: [PATCH v2 0/7] camss: Add CAMSS pipeline handler Date: Tue, 21 Jul 2026 16:59:50 +0200 Message-ID: <20260721145958.68489-1-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIxMDE1OCBTYWx0ZWRfX953/gcDyR6qu icfx14faR8Bk+VEFXGtVTuaYbdaO7rxxzvTh18DzAzr6sXdRcU1E1DoTpAcnSpr2Fpo6NcUEG9g XAlTWehQHc+Y67uLOGEErRPOJPaeIxA= X-Proofpoint-ORIG-GUID: 0c7pXv6p1b7FQ2NsWibsVseFjVE6Vi1w X-Proofpoint-GUID: 0c7pXv6p1b7FQ2NsWibsVseFjVE6Vi1w X-Authority-Analysis: v=2.4 cv=X75i7mTe c=1 sm=1 tr=0 ts=6a5f8972 cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=xqWC_Br6kY4A:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=YAyIRdgMAAAA:8 a=NEAV23lmAAAA:8 a=RVVoqv6p0WQgywuZv4gA:9 a=kacYvNCVWA4VmyqE58fU:22 a=o1rO4XtwZBNj6n05oSJ_:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIxMDE1OCBTYWx0ZWRfXyJGM2cNkxoYZ mikPM4vnsy4RyhdqBsaF9RD4CjUl6ek77/1eQ48Q31ipxBbl30PPZUPnj5OFoNiP4XKjeohUdFp AC3DRXOOtDY9SzrW0vDlNoNMzOmJJx/duCm+kJcnEwepf4hGS0t/n53VRP7peG1IVYs5M5zSGwU aiW3A971Geetch+t4lCmhYMkPQfbQgi9RRnHX6uaaf0ptflqmkCyXXjyaTs0pm1ds5kOhNXeXHw 2DK188FwWzoGE5lini6QTxZVAcKX1nxRXwWHEX0bjBaCmeVtbCsvjVxNWIWiqne+p1NLRAimWhH s5sNBvNbmj6HKVJwNShrCoqa/TqlbOCU9IbKVqCmT42OtRsigV1x8eoOqHbL/5v7cgXSKwMSkzK yrPZQ7YqM7IcuNAVBJbAFP/TIhmE2ptxN1xUD65eISykdB+LCBNOBMIa6yMUayx2tBz8mzbqbAi lXoASLPGd2izugt+ebA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1143, Hydra:6.1.134, FMLib:17.12.100.49 definitions=2026-07-21_03,2026-07-20_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 phishscore=0 adultscore=0 suspectscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607210158 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi All, Add a CAMSS pipeline handler. This series consists of 2 parts: 1. A basic version which basically replaces the simple pipeline handler camss support, while still using the softISP. Compared to the simple pipeline handler this gains us support for streaming from multiple cameras at once (through pipewire) since this assigns unique csid and vfe resources to each camera rather then always using csid0 + vfe0 for all cameras. This consists of patches 1-4 and this is necessary to support simultaneous streaming of multiple cameras on the Arduino UNO Q and the upcoming Arduino VENTUNO Q, as such we would like to get this upstream ASAP (*). 2. Patches 5-7 add support for the Offline Processing Engine (OPE) offline ISP found on the Dragonwing QRB2210 (Agatti) SoC. This is based on the v4 OPE kernel patch-series: https://lore.kernel.org/linux-media/20260710-camss-isp-ope-v4-0-51207a0319d8@oss.qualcomm.com/ This part of the patch series is more in a RFC status, because: a) The kernel patches are not yet accepted so the uAPI might still change b) ATM it (ab)uses the softISP IPA instead of using its own IPA, the plan is to change this for the next version, based on the ongoing libipa rework on the list. Changes since the v1/RFC (**) series: - Drop fine grained locking support. This is replaced with using pipewire to allow simultaneous access to multiple cameras while still having only a single libcamera instance access, removing the need for fine grained locking - Add 2 small preperation patches + a camss_util.cpp file with some helper functions - The OPE pipeline-handling is now based on the v4 kernel series which introduces a proper media-controller centric ISP driver with multiple input queues (raw-frames + parameters) replacing the previous M2M based proof-of-concept kernel driver - Add linux/camss-config.h+camss_params.h using the generic ISP parameters framework (these are subject to change until the kernel driver is merged) Since this will replace the simple pipeline handler support more testing on other platforms with different camera setups, e.g. various phones would be appreciated to avoid e.g. postmarketOS camera support regressing when this lands. Regards, Hans *) This still depends on: https://patchwork.libcamera.org/project/libcamera/list/?series=5940 + https://patchwork.libcamera.org/patch/26750/ A branch with this series + the pre-requisite patches is here: https://github.com/jwrdegoede/libcamera/commits/camss_pipeline_v2/ We really need to get this resolved, I see that Jacopo has also reposted this in: https://patchwork.libcamera.org/project/libcamera/list/?series=6003 Since that series also relies on having a different way to select which IPA to load then matching by the pipeline name. I've an idea to move this closer to what Laurent wants to see without needing to make significant changes to the Rasberry Pi code. I'll to get something posted this week. **) https://lists.libcamera.org/pipermail/libcamera-devel/2026-April/058087.html Hans de Goede (7): libcamera: V4L2Subdevice: Add whence argument to [get|set]Selection() software_isp: Rename simple IPA setIspParams signal to paramsComputed camss: Add cammss utility functions camss: Add camss pipeline handler camss: Add include/linux/camss-config.h camss: Add camss_params.h camss: Add Offline Processing Engine ISP support .../internal/software_isp/software_isp.h | 2 +- include/libcamera/internal/v4l2_subdevice.h | 14 +- include/libcamera/ipa/soft.mojom | 2 +- include/linux/camss-config.h | 161 ++++ meson.build | 1 + meson_options.txt | 1 + src/ipa/meson.build | 1 + src/ipa/simple/soft_simple.cpp | 2 +- src/libcamera/pipeline/camss/camss.cpp | 696 ++++++++++++++++++ src/libcamera/pipeline/camss/camss_csi.cpp | 570 ++++++++++++++ src/libcamera/pipeline/camss/camss_csi.h | 131 ++++ src/libcamera/pipeline/camss/camss_frames.cpp | 155 ++++ src/libcamera/pipeline/camss/camss_frames.h | 71 ++ src/libcamera/pipeline/camss/camss_isp.cpp | 26 + src/libcamera/pipeline/camss/camss_isp.h | 62 ++ .../pipeline/camss/camss_isp_ope.cpp | 679 +++++++++++++++++ src/libcamera/pipeline/camss/camss_isp_ope.h | 120 +++ .../pipeline/camss/camss_isp_soft.cpp | 226 ++++++ src/libcamera/pipeline/camss/camss_isp_soft.h | 56 ++ src/libcamera/pipeline/camss/camss_params.h | 67 ++ src/libcamera/pipeline/camss/camss_util.cpp | 39 + src/libcamera/pipeline/camss/camss_util.h | 19 + src/libcamera/pipeline/camss/meson.build | 13 + src/libcamera/pipeline/simple/simple.cpp | 1 - src/libcamera/software_isp/software_isp.cpp | 4 +- src/libcamera/v4l2_subdevice.cpp | 20 +- 26 files changed, 3121 insertions(+), 18 deletions(-) create mode 100644 include/linux/camss-config.h create mode 100644 src/libcamera/pipeline/camss/camss.cpp create mode 100644 src/libcamera/pipeline/camss/camss_csi.cpp create mode 100644 src/libcamera/pipeline/camss/camss_csi.h create mode 100644 src/libcamera/pipeline/camss/camss_frames.cpp create mode 100644 src/libcamera/pipeline/camss/camss_frames.h create mode 100644 src/libcamera/pipeline/camss/camss_isp.cpp create mode 100644 src/libcamera/pipeline/camss/camss_isp.h create mode 100644 src/libcamera/pipeline/camss/camss_isp_ope.cpp create mode 100644 src/libcamera/pipeline/camss/camss_isp_ope.h create mode 100644 src/libcamera/pipeline/camss/camss_isp_soft.cpp create mode 100644 src/libcamera/pipeline/camss/camss_isp_soft.h create mode 100644 src/libcamera/pipeline/camss/camss_params.h create mode 100644 src/libcamera/pipeline/camss/camss_util.cpp create mode 100644 src/libcamera/pipeline/camss/camss_util.h create mode 100644 src/libcamera/pipeline/camss/meson.build