From patchwork Thu Oct 28 10:03:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanlin Chen X-Patchwork-Id: 14387 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 21527BF415 for ; Thu, 28 Oct 2021 10:03:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1EAE2600BC; Thu, 28 Oct 2021 12:03:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="WLYvL0CE"; dkim-atps=neutral Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 33939600B6 for ; Thu, 28 Oct 2021 12:03:24 +0200 (CEST) Received: by mail-pj1-x102b.google.com with SMTP id om14so4282635pjb.5 for ; Thu, 28 Oct 2021 03:03:24 -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=exF50TRUVcuWg1k+CnOCmAP50iF7VYe1lN+LEY0vVHY=; b=WLYvL0CEh+QWtdgkTAhWLSvV4KcIxn8bLsJ0iF/Wnm+3tQVEs4VOugrvP9NI/+PC6n JhPGcYCF+yy0Tz5HoQAyoYobtmbmW/9mBkQNH2mbrbxblwKMXTpfBN/wIl0zXMfaIECz rEGdQ9pEM0Q7dbxqYV+SS1DScaESKP7wxPXWw= 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=exF50TRUVcuWg1k+CnOCmAP50iF7VYe1lN+LEY0vVHY=; b=7S5kRFNdcRe31VBwLPEEAMyDv53fOqeJ+sC9H90n0ZQPn/Wod2GHKTUpST7v5G0q5b 8+fQzPIyMm7iLiXE1pKQHY7MJKHd+2kSqeo4JBNEkck5cpFVA7t2d8l1081XcHJG8qwV 3L8FlCa0H3KjJnCyXzsDn+rBLNydiWZWVbXS6/MCv+4x/SLPhnplfvlr2BqojifbSx6+ g8pdbOOKF3f9XeMeYgCZ7HWEmp5H7lUFPLFLHiy359kfLFTkpfDc74v5pXuI9gCCE6cY 01/J+J+AhB6H3MorTKLpuXAGuXXH2FAKsTXa+NRUo0Zb9gYwu6COFkC33jNRxZp6AfAH ZwaA== X-Gm-Message-State: AOAM533KolEw/p1OsjXuR3IkVL+atFiUD/Lv0WKv+KKj+89B2wffqwR9 cge3na8SpvMJowIUe7ZsaLM5NtUgd5qjBACu X-Google-Smtp-Source: ABdhPJxCPiFDoGJJZy/7L+9YP9u9LxKJU4k0CMhIEbH5vufCm301c7PFryH/2ZebV+DTxg2XNvF9fA== X-Received: by 2002:a17:90a:db02:: with SMTP id g2mr11655964pjv.158.1635415402540; Thu, 28 Oct 2021 03:03:22 -0700 (PDT) Received: from localhost ([2401:fa00:1:10:1bc:52e7:6df5:c7cf]) by smtp.gmail.com with UTF8SMTPSA id l1sm2325588pgt.39.2021.10.28.03.03.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Oct 2021 03:03:22 -0700 (PDT) From: Han-Lin Chen To: libcamera-devel@lists.libcamera.org Date: Thu, 28 Oct 2021 18:03:16 +0800 Message-Id: <20211028100319.1097720-1-hanlinchen@chromium.org> X-Mailer: git-send-email 2.33.1.1089.g2158813163f-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/4] ipa: ipu3: Extend ipu3 ipa interface for sensor and lens controls 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: , Cc: Han-Lin Chen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" IPU3Event and IPU3Action use single ControlList for both libcamera and V4L2 controls, and it's content could be either one based on the context. Extend IPU3Event and IPU3Action for sensor and lens V4L2 controls, and preserve the original one for only libcamera Controls to make the content of an event more specific. Signed-off-by: Han-Lin Chen --- include/libcamera/ipa/ipu3.mojom | 4 ++++ src/ipa/ipu3/ipu3.cpp | 2 +- src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom index 2f254ed4..cc0d822f 100644 --- a/include/libcamera/ipa/ipu3.mojom +++ b/include/libcamera/ipa/ipu3.mojom @@ -23,11 +23,15 @@ struct IPU3Event { int64 frameTimestamp; uint32 bufferId; libcamera.ControlList controls; + libcamera.ControlList sensorControls; + libcamera.ControlList lensControls; }; struct IPU3Action { IPU3Operations op; libcamera.ControlList controls; + libcamera.ControlList sensorControls; + libcamera.ControlList lensControls; }; struct IPAConfigInfo { diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 5c51607d..6775570e 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -646,7 +646,7 @@ void IPAIPU3::setControls(unsigned int frame) ControlList ctrls(ctrls_); ctrls.set(V4L2_CID_EXPOSURE, static_cast(exposure_)); ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast(gain_)); - op.controls = ctrls; + op.sensorControls = ctrls; queueFrameAction.emit(frame, op); } diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index eb714aa6..8816efc5 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -1248,7 +1248,7 @@ void IPU3CameraData::queueFrameAction(unsigned int id, { switch (action.op) { case ipa::ipu3::ActionSetSensorControls: { - const ControlList &controls = action.controls; + const ControlList &controls = action.sensorControls; delayedCtrls_->push(controls); break; }