From patchwork Thu May 12 10:32:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-Hao Yang X-Patchwork-Id: 15896 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 76F8BC3256 for ; Thu, 12 May 2022 10:33:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BCB8B65657; Thu, 12 May 2022 12:33:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652351586; bh=hu1tUDWaoMxqytvlWsq2wVYBTdRlwS5prS+gaYm4zhE=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=cT9aWz0RCr2s9RzF9QBF/XRvvXL0Ebqsvfsw9rTyaxMKwzV5w1m3vakrf1PlgEwee 8EZgwOz4tamAhldn40n9oce31N3+/o/xljHJ4eieSuVB/2DZzi/bT4k+tle8/VlO0b 80W7swf5Aa8HV6zFAJg89DXEi5lyNXPSDUE1dhmhwTYffFF9+QiAGclnho3dur7svW Knb1wDCddoPxSN8BvwOfiIfhv/tQgNPqnvV7ROLRS3wtT842TSwSe15j1Ug+KtyXhT SsltyljWjeHxcaxGAhkJEAIFxLbjSbFiHG4k53dfjdEOzn4coo5ldlIWtmvae3sA+L Gw20HldM3/blg== Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4DA306049E for ; Thu, 12 May 2022 12:33:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ETttmFCc"; dkim-atps=neutral Received: by mail-pj1-x1032.google.com with SMTP id o69so4762661pjo.3 for ; Thu, 12 May 2022 03:33:05 -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=iexvujGaO4ifbsE/TFZWLFcupcO+3DZ/fjViTV5zJJQ=; b=ETttmFCcyrzB5wUcygIYCwYAD9ws5AdZmmKBmwytCHNTu7x3H6mbNH3Yukfs31086q wyIARmfrSNEnq60xG/90amdbzhQFy9v5gPNc3BkvaO5ioMmNgSpb9J8GfUK5qAdyFO67 xvmaDrM4YmgDJVxBn54mZTKRFqZtz10GS9lhA= 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=iexvujGaO4ifbsE/TFZWLFcupcO+3DZ/fjViTV5zJJQ=; b=bwE0iyYPPIUhQwh6INwq26mfJeBfMFLw8yvj2p8Z7LOx4+KYXIONRH2p9hGpKU0wSU nzRrxhZWU7buzg5TELm6oGOOv7e91+jmk8zqiEy7BYNoyjnzSzVh9frv3YYjQ7oql+mj U4CyL9EoOn/F8bWBdUfWLMWCksOvz+qOe5LHfqE+b+ul+pJbFe0OEzYg0XLSmSY6p084 dzgCSkejG396h7D5QJYczwBdlcOM5HYH1y0t/arvUpp4j+ZA/IUmNtYozGhukki4XplD NfHknJzmfspUtfy02aG+iwzTVM5CzB7PPozekKR9JCdGO0townbU1oOKOq5JsDzH8N+c sePA== X-Gm-Message-State: AOAM533sojtxI4UWwHepPX8bx9zQXtSYPLl38sg1pM1Ov9fJPDv4qhgh Sz2cyiAcQ5qU22+HkI7v5tiQ1sr/TNL20dai X-Google-Smtp-Source: ABdhPJyhVVdRmYZLYsqkSQ0W2XdKvmdr74JMDaabBPrs+sL6j8jwj6V/iInPYYdFdKRXLlHAyPHQCg== X-Received: by 2002:a17:90b:3b46:b0:1dc:b314:52e6 with SMTP id ot6-20020a17090b3b4600b001dcb31452e6mr10285558pjb.134.1652351583181; Thu, 12 May 2022 03:33:03 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (174.71.80.34.bc.googleusercontent.com. [34.80.71.174]) by smtp.gmail.com with ESMTPSA id t19-20020a62d153000000b005087c23ad8dsm3402219pfl.0.2022.05.12.03.33.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 03:33:02 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Thu, 12 May 2022 10:32:50 +0000 Message-Id: <20220512103258.324339-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/8] 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: Cheng-Hao Yang Reply-To: Harvey Yang Cc: Harvey Yang Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello everyone, This is the first draft of patches to use two imgus in ipu3 pipeline handler, mostly to better support StillCapture, which was handled as video snapshot. There's a TODO to tackle the delay one frame issue in the ipu3 HW/FW design. Patches will be updated when we have a clear solution. Please take a loop and give me your thoughts. Thanks! BR, Harvey Harvey Yang (8): Add StreamRole in StreamConfiguration Allow only one camera being started Use imgu0 as default Add StillCapture stream and imgu1 param buffers Update IPAIPU3Interface::fillParamsBuffer with captureBufferId Configure imgu1 when necessary Assign |outCaptureStream| to StillCapture configuration Request StillCapture stream as default in Android adapter include/libcamera/ipa/ipu3.mojom | 2 +- include/libcamera/stream.h | 20 +- src/android/camera_device.cpp | 214 ++++++++-------- src/android/camera_device.h | 21 ++ src/ipa/ipu3/ipu3.cpp | 19 +- src/libcamera/pipeline/ipu3/frames.cpp | 23 +- src/libcamera/pipeline/ipu3/frames.h | 8 +- src/libcamera/pipeline/ipu3/ipu3.cpp | 328 ++++++++++++++++++++----- 8 files changed, 455 insertions(+), 180 deletions(-)