From patchwork Thu May 6 07:54:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12204 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 BEA97BDE7F for ; Thu, 6 May 2021 07:55:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 63B4E68918; Thu, 6 May 2021 09:55:06 +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="beBaDUSb"; dkim-atps=neutral Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 586116890E for ; Thu, 6 May 2021 09:55:05 +0200 (CEST) Received: by mail-pj1-x102a.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so3015854pjv.1 for ; Thu, 06 May 2021 00:55: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:in-reply-to:references :mime-version:content-transfer-encoding; bh=VtbKXhukIcnDCQR37kiMKwtZ+jMQ3n+IXsG2+YQduf4=; b=beBaDUSbRiIBZbzrwFoO+iN945MXlsQ0y22PzdpmHxCmq/sJRoYe9mn86BjXR7xOGr 1t4ByEXtbkWiJwH2Ur+FN3idueRdKMW5XG8/GeUsE3DnGH61AcjoDF6BmbaL1/O0KW32 41BXjZhLcMSjnKnqVFw+m3BKb2e+w/8dJwtd0= 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=VtbKXhukIcnDCQR37kiMKwtZ+jMQ3n+IXsG2+YQduf4=; b=SzyCUo+rPIo86FgIXpcR4KsomM5UK/0aTpQ+wmK7AhBI9Ym1tZpkLoKTGc0kPcVGVf xiHVpw1NTpNq+yMC+fBD9nvPWksse1C4kxLTxZDnvkcb0ORVCvtwxb+8C5P5vKflsmJF GA6ZLsE6bU8aG+RHUv5uBdq+eK/vfFSnZY4QDHl/arPoDdsc5AAfYcUMdvXRplQ5hAhD gh8UopBxKPvUFvdBLrtUyNfJGmWFn0GSsdgu9Q14UwP3dPeF7NPdlvsRgGvYsH1M54C8 WHf2XtWdj16/zcfCiaDsATKzloQtLbbq95BP9z1qgAcSnVov/Z9kXfBsMVAh0bvemGFl 2o+w== X-Gm-Message-State: AOAM530N+yK20zrbfEfRL0B+lHdZzqKP3tp3q6g+Q3HRaNscRJN3nJEC pU+j70uBDtj+cWMZ+wPR2FRdMxPlyTeG+Q== X-Google-Smtp-Source: ABdhPJzOVYumu6218ZzumNiIAMkmYUXVtYSlgsMg2GqRGlsfQy3TqX2Iz++Fjn0sEMyzWxONXSaA4w== X-Received: by 2002:a17:902:d386:b029:ee:bf5f:c037 with SMTP id e6-20020a170902d386b02900eebf5fc037mr3121729pld.31.1620287703552; Thu, 06 May 2021 00:55:03 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:ede4:ae0e:d4a4:c0d3]) by smtp.gmail.com with ESMTPSA id f201sm1355546pfa.133.2021.05.06.00.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 00:55:02 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Thu, 6 May 2021 16:54:48 +0900 Message-Id: <20210506075449.1761752-6-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.607.g51e8a6a459-goog In-Reply-To: <20210506075449.1761752-1-hiroh@chromium.org> References: <20210506075449.1761752-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 5/6] libcamera: pipeline: ipu3: Report available sensor test pattern mode 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" PipelineHandlerIPU3 gets available test pattern modes of the sensor device and reports them to a client. Signed-off-by: Hirokazu Honda Reviewed-by: Jacopo Mondi --- 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 73306cea..b4d4b97d 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -891,6 +891,16 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data) ControlInfoMap::Map controls = IPU3Controls; const ControlInfoMap &sensorControls = sensor->controls(); + if (!sensorInfo.testPatternModes.empty()) { + std::vector values; + values.reserve(sensorInfo.testPatternModes.size()); + + for (int32_t pattern : sensorInfo.testPatternModes) + values.emplace_back(pattern); + + controls[&controls::draft::TestPatternMode] = ControlInfo(values); + } + /* * Compute exposure time limits. *