From patchwork Tue Aug 2 10:29:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 16899 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 74E2FC3275 for ; Tue, 2 Aug 2022 10:29:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E033763313; Tue, 2 Aug 2022 12:29:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659436191; bh=gmPcUf/WTjJUtQzI3vi2sQN9uFn2NvhOporx9tZhYNw=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=RN3+Wi1cyxbDqKNOKkoI+Av/z2ZLRmYu2VUssdQMcJd0fXAEWZeNNj4SpcjDyhKc4 /mhORCdHwIa/7CSuaKPy9QHRdpNbRlw4dFEnO/xOPRfhwZrTFFtP4ZsqgWYl5lHXPk cvfP12R5Wh7sOTdUXUQRdBAR2dTGkFY7ogxmqVCGKx1Sfqytke9O5LfSW4BgVCuiwF ssWfbjMXSDHL8J7oo/vEluqu1tFYySRHUEQx8bUSu+72hfx1BC4wPIHliX8P2pEhOY 6mg5qhUN7lOE86X91i3bpiglxjKDDpCd45VLY3YbQ9Ax2yuGRqm832G/8TOeGEvsQF 1a4L3E1zJV/nQ== Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A67E603E7 for ; Tue, 2 Aug 2022 12:29:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZmznFKbg"; dkim-atps=neutral Received: by mail-pl1-x636.google.com with SMTP id v18so13031783plo.8 for ; Tue, 02 Aug 2022 03:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SEovkI/ab0PVUcFUMnFVDJZKY+pryMW6Lc+GC5iPO/U=; b=ZmznFKbgL66xxUCAkDpIqx9pbPBBV8n8HV/e9BM2ZgCiV9JbNXIiNuCAwlzF1RHFBR SAqm+EUBvONOBNzyY+k8dMe05lo/5AOra/ge/4uB8YXLzFTZHxS19LMdf66bL7vOM8QV Tq8D0rwh9gHRyNr6NsplZQxBWqmBnBqmHpmVA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SEovkI/ab0PVUcFUMnFVDJZKY+pryMW6Lc+GC5iPO/U=; b=DtuPu7tmySvi3Fr+LuWodpiZi4qNMZ3iWxFBMd5YN9c/OvL5Hu0qi+DdynwGtUceDw TABMNcfR2j9a5elgJFLtmpdk4mElcFELlUlaG0xR9ief2iKgNmLA8C6/bhUOoh4u9saB hhUgR99lKObUxuc8T2EYmL/tGJpxrEY7Vx29R+lpZ2wjihUpW/yaNrpTiIXuXow9O36o heKxOScGG/J3LKaCfa5ff3hlCLQ8fQlMXlXobXZTJI1+jHz+ycKKNxcq+l+FUo+qak4f 48TwIjhXd/XMzqU16jlrZqQhgKUpDkxTemK8SovajDwOZe5WTpguxs5XihU/oZtpwb2n 7KEA== X-Gm-Message-State: ACgBeo1XJs8RSLpmqNLvkguGZxt5xJZ3fPy/UHLvP2i9sQXwd3H/0V4E sSVyORu2qju4dVxDoYQCfrcfXw35TvA3+w== X-Google-Smtp-Source: AA6agR5z7Nb779fuMshU/aYIL3sWI3u5UUJSXa6yRUYhrnwhT9aBh/V5NR/U9UOZSsPrTFGqv9iQNw== X-Received: by 2002:a17:90a:9412:b0:1f2:59ad:1f4 with SMTP id r18-20020a17090a941200b001f259ad01f4mr24192871pjo.147.1659436188979; Tue, 02 Aug 2022 03:29:48 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (231.137.80.34.bc.googleusercontent.com. [34.80.137.231]) by smtp.gmail.com with ESMTPSA id t15-20020a170902e84f00b0016db88f69a2sm1955128plg.141.2022.08.02.03.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 03:29:48 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Tue, 2 Aug 2022 10:29:34 +0000 Message-Id: <20220802102943.3221109-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.37.1.455.g008518b4e5-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/9] Use two imgus in ipu3 pipeline handler 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: , X-Patchwork-Original-From: Harvey Yang via libcamera-devel From: Harvey Yang Reply-To: Harvey Yang Cc: Harvey Yang Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello everyone, Thanks to Umang's review and Han-lin's help on multiple sub-patches, here's the fourth version of patches to use two imgus in ipu3 pipeline handler, mostly to better support StillCapture, which was handled as video snapshot. The patches are tested on soraka. Please check again and give me more feedbacks. Thanks BR, Harvey Harvey Yang (9): Add StreamRole in StreamConfiguration ipu3: Allow only one camera being started ipu3: Use imgu0 as default ipu3: Add StillCapture stream and imgu1 param buffers ipu3: Update IPAIPU3Interface::fillParamsBuffer with captureBufferId ipu3: Configure imgu1 when necessary ipu3: Assign |outCaptureStream| to StillCapture configuration Request StillCapture stream as default in Android adapter ipu3: Fixes frame delay include/libcamera/internal/pipeline_handler.h | 5 + include/libcamera/ipa/ipu3.mojom | 2 +- include/libcamera/stream.h | 20 +- src/android/camera_device.cpp | 235 ++++++----- src/android/camera_device.h | 21 + src/ipa/ipu3/ipu3-ipa-design-guide.rst | 6 +- src/ipa/ipu3/ipu3.cpp | 25 +- src/libcamera/camera.cpp | 11 + src/libcamera/pipeline/ipu3/frames.cpp | 23 +- src/libcamera/pipeline/ipu3/frames.h | 8 +- src/libcamera/pipeline/ipu3/imgu.cpp | 13 + src/libcamera/pipeline/ipu3/imgu.h | 2 + src/libcamera/pipeline/ipu3/ipu3.cpp | 392 ++++++++++++++---- src/libcamera/pipeline_handler.cpp | 26 ++ 14 files changed, 595 insertions(+), 194 deletions(-)