From patchwork Fri Apr 9 04:32:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11878 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 17A92BD16B for ; Fri, 9 Apr 2021 04:32:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CB52D68808; Fri, 9 Apr 2021 06:32:22 +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="OscRek5h"; dkim-atps=neutral Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 23C68687F6 for ; Fri, 9 Apr 2021 06:32:21 +0200 (CEST) Received: by mail-pf1-x431.google.com with SMTP id o123so3404588pfb.4 for ; Thu, 08 Apr 2021 21:32:21 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=vsWwxDXMX5080odZxhA6IevxNdiFcMKuo4IlaZKtdaA=; b=OscRek5hjmwBqvX9a22MuH2781vK9kzWnBOTAmdwrShgrD6dzOcNd6DcREn3E4iKic FaZWm9yJQAQSjoru9T6E/vAXW45vDYPWI5I3HLKdk7E267CIz5CSTlQ4sqrM2NTtnFzs 3W8SEaoZCCwgDxNfK1t4lmB1cLPG/RUpCrAFQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vsWwxDXMX5080odZxhA6IevxNdiFcMKuo4IlaZKtdaA=; b=Xw4h6OoM/qGHSacADd2eqaZHGlIoFJPVskeSFNFdyN5GCfWDE6TZY7Us1Nm2d0whUP gqhsyTLIBpg1C/rPZKQWjPobubm02qXXteYsmhmJyEMdUTjegtqeUDI1YIXYP7pcYT4s KmxVYDL+1PWvmBT/zS6G78//sPbxDEOsVa70dTmrlsBcZufYuliR+eHydztdT+An8sNv CLK+vEgluRGDmO1BVA1T9LjQPf5IEokA5WZr967zBdmllHikL8okGkMNCu+el+nu75h2 Yrt4A049M9IF/JbrBp3/0mCEtrs71Al/JanYzgWjDe6jU1wxtoNiQgPs9ZqNScxJdJFd h22g== X-Gm-Message-State: AOAM532UzKhI9v4ACDnNr3Jw+Je5gk8bQqBq2yu0dHp5tVOPdGIZMHPY Kj95kTuTjb63CKwXQBUMnKpeZUTG7711YA== X-Google-Smtp-Source: ABdhPJySIpSHx7kguDCb4H/Fjlq5f82jWk6+j6Nk9A22hTJdI3Jnm+rRAB1XLJHBG7MUg/YE2AHgNQ== X-Received: by 2002:a63:3d48:: with SMTP id k69mr10989492pga.239.1617942739648; Thu, 08 Apr 2021 21:32:19 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:7567:510e:1b47:ce92]) by smtp.gmail.com with ESMTPSA id il6sm737275pjb.56.2021.04.08.21.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 21:32:19 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Fri, 9 Apr 2021 13:32:07 +0900 Message-Id: <20210409043208.1823330-5-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210409043208.1823330-1-hiroh@chromium.org> References: <20210409043208.1823330-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 4/5] libcamera: pipeline: ipu3: Report available test pattern modes 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" Add available test pattern modes to controls. Signed-off-by: Hirokazu Honda --- src/libcamera/pipeline/ipu3/ipu3.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 519cad4f..c6ca87a7 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -995,6 +995,16 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data) controls[&controls::ScalerCrop] = ControlInfo(minCrop, maxCrop, maxCrop); + const std::vector &availableTestPatternModes = + sensor->availableTestPatternModes(); + if (!availableTestPatternModes.empty()) { + std::vector controlValues; + for (int32_t value : availableTestPatternModes) + controlValues.emplace_back(value); + controls[&controls::draft::SensorTestPatternMode] = + ControlInfo(controlValues); + } + data->controlInfo_ = std::move(controls); return 0;