From patchwork Fri Oct 29 11:59:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanlin Chen X-Patchwork-Id: 14415 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 F17F5BDB1C for ; Fri, 29 Oct 2021 11:59:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4C5E5600BD; Fri, 29 Oct 2021 13:59: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="admSQWEF"; dkim-atps=neutral Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BE1C600B8 for ; Fri, 29 Oct 2021 13:59:25 +0200 (CEST) Received: by mail-pl1-x62c.google.com with SMTP id t21so6658189plr.6 for ; Fri, 29 Oct 2021 04:59:25 -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=2k99Vr8smPJ+QwrHYW4ovDxNd1eiIO/Iakp26gWl9Ac=; b=admSQWEFN4zJRuVpxDvD4iyiOAZ5FCyNQf5p35ZUYVcxIK8uyvSIIKNcZKmshHSc+N dKQQAaDnAEUK4MNy+LhkKvrW+jTtEJVa5cqSo3jyGgTFoNayzVGPAqbEbGwCmDZ4Y1CH v/sGgZxVRF7PpcZQDJjZuOV7SkXpDy9Roahv0= 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=2k99Vr8smPJ+QwrHYW4ovDxNd1eiIO/Iakp26gWl9Ac=; b=useiUDzwR7qEtdC7fJ5TRY7S0dhz34hlewXcw675gRQ8Jzt/w4uk0VHIzEyaFXogTE L1ljs47HV/5/f7MAVZcFDHBd4RqhiJqj6dMg8tz03pfFZ2QyY2mewgkzeIJ924dXVcyV 9u8pc0b6aUwLmTKRS9ynU3/h7HpPRdMR3JTl+DYYaSN0uzkQhkCbLLrwHwL7gh9q6TOl luBoQucN6s6J1nBnIveyJBiKYQmHopqosxlbQhE8ik5TfOeMqdwemLKdwV+rRKGG5cLp vO6XnuH8c/SHjA7do7wtk9Dc+j7mcRueDqA7tFLzyNoya0azNR7Qty36S/Ny/SGOX96p j7OA== X-Gm-Message-State: AOAM533rQSbt4UWjHGP/bEr8hLYeFmx14tRB6NdCDasICaQLa0d+xYv5 lEn933kGwCcwkrALqwwbTmTZUdivxrjZ9ZKS X-Google-Smtp-Source: ABdhPJxNr3WCv5JQF64GbqtHJL3/X9RZEOQ3JLZ8A0UhBnDt8RSbXPcrYmE7mbQi2g2bo3pR07Smsw== X-Received: by 2002:a17:90b:1bcf:: with SMTP id oa15mr3358139pjb.196.1635508761838; Fri, 29 Oct 2021 04:59:21 -0700 (PDT) Received: from localhost ([2401:fa00:1:10:35fe:d53b:684:b538]) by smtp.gmail.com with UTF8SMTPSA id t7sm6587333pfj.217.2021.10.29.04.59.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Oct 2021 04:59:21 -0700 (PDT) From: Han-Lin Chen To: libcamera-devel@lists.libcamera.org Date: Fri, 29 Oct 2021 19:59:14 +0800 Message-Id: <20211029115917.2467936-1-hanlinchen@chromium.org> X-Mailer: git-send-email 2.33.1.1089.g2158813163f-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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: , 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; }