From patchwork Tue Apr 13 07:50:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11904 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 89F68BD224 for ; Tue, 13 Apr 2021 07:50:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3F08E68809; Tue, 13 Apr 2021 09:50:35 +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="FPVAt6BC"; dkim-atps=neutral Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 452A668800 for ; Tue, 13 Apr 2021 09:50:34 +0200 (CEST) Received: by mail-pj1-x1035.google.com with SMTP id nm3-20020a17090b19c3b029014e1bbf6c60so4370113pjb.4 for ; Tue, 13 Apr 2021 00:50:34 -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=wJ/ceasRA1QDOVgYJaZJ4VnwamEf/ayurSs05yfPadY=; b=FPVAt6BCv/sI0kztWNr15HDv9eCIKXALwdjKNan4a4pthpHGk95w3lTObwDsmYXaRt Zg4IwMaKOVay/VXRTmORvYaETJccKJHXJELM9u7LCzOsxJXS/eUnNdBFbz0etpvvE4yE WjkgYlEzdddL8qFm3WKOTQoDEkwOCN6RxM0Nk= 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=wJ/ceasRA1QDOVgYJaZJ4VnwamEf/ayurSs05yfPadY=; b=chCR1bl20bgKteEohyi1ttHarMnp0MfLl3hjTh2JYyS996hsQSOU7hB3rDBumGn16U HFSCM7xl+PBZZiT4Xxa7CEJpL96A3hqHGN3ipVVX/+42zNmCFDdYS/ZHhocyM2kihFqx awX2pmntjWvLPGwkUsM+CUe55bL/uX+1aBQsxZOaSK+3F7atATACkbiwZ09v++rbKa7F DaiU47PLRdMvqwux5xA41IwkgH35qyufqR6kNYbCvwInj+p94fG+ouyjutS+TsfAcdFz oy4QydlvJaUoVmoIA7wGWIwMfMDlgVWSr60DJbEs9n7/Gfzg5Z/W6kqkzo1PP4aklsmD 0gDg== X-Gm-Message-State: AOAM530E45MAa8ENwGmHTf2sgw1gIKWyJoNH0MpUn+MDkNCiIS18huoV G374wTNo3gAFP/CbFp+SQUQSJyBx35pPng== X-Google-Smtp-Source: ABdhPJwzbHxaqQt9BTGces0JIstCGmNxFmyMz+z++K7eA4yCXp5wzVgAC4r6ioNCvtLV1EoeBXzxCQ== X-Received: by 2002:a17:902:b68a:b029:e9:7643:6335 with SMTP id c10-20020a170902b68ab02900e976436335mr29124158pls.2.1618300232789; Tue, 13 Apr 2021 00:50:32 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:84f5:7981:dfbe:8f02]) by smtp.gmail.com with ESMTPSA id n25sm11525125pff.154.2021.04.13.00.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 00:50:32 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Tue, 13 Apr 2021 16:50:13 +0900 Message-Id: <20210413075013.3069213-6-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210413075013.3069213-1-hiroh@chromium.org> References: <20210413075013.3069213-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v2 5/5] 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: , Cc: jmondi@jacopo.org 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 --- src/libcamera/pipeline/ipu3/ipu3.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 519cad4f..bcef331c 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -891,6 +891,18 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data) ControlInfoMap::Map controls = IPU3Controls; const ControlInfoMap &sensorControls = sensor->controls(); + if (!sensorInfo.availableTestPatternModes.empty()) { + std::vector values( + sensorInfo.availableTestPatternModes.size()); + for (size_t i = 0; i < values.size(); ++i) { + values[i] = ControlValue( + sensorInfo.availableTestPatternModes[i]); + } + + controls[&controls::draft::SensorTestPatternMode] = + ControlInfo(libcamera::Span(values)); + } + /* * Compute exposure time limits. *