From patchwork Wed Apr 21 04:23:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12023 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 2D44FBDB16 for ; Wed, 21 Apr 2021 04:24:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E28AD68853; Wed, 21 Apr 2021 06:24:07 +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="feoh30Ol"; dkim-atps=neutral Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EA044602C3 for ; Wed, 21 Apr 2021 06:24:04 +0200 (CEST) Received: by mail-pg1-x52b.google.com with SMTP id y32so28532797pga.11 for ; Tue, 20 Apr 2021 21:24:04 -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=WKvWlo2rlqpJwhfL/Ss63p7PuDJHY1LEzWBviZ3QGB4=; b=feoh30OlpsEM2bvRk0Qa8hfq6qoQ5vGyDNj0Ii5QbHtrhx6DEyuizsDm3FAUqpkBG3 v4OT9ANdF+PqKZYK3ENovrw6LiPAD3Hn1u+mGshVDvWlWrE2P2VP4gVrpl7TB/mA/zm9 8zXFYKSgpFkCGBqmKbRTiQA7+ncd5ClF9Uyv0= 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=WKvWlo2rlqpJwhfL/Ss63p7PuDJHY1LEzWBviZ3QGB4=; b=W0xkA7zUoCDyfU36lwcFf9S+loliPvwVFIN7kJloR9hiyvFdf8LsDYIUuFzohMQOnZ iAjLvPbJXbD/vE6aO9TH4TGN+O7GVXr0L3EgmA+ciViV/YIgiQuYQYrfcKSkigXtB3qR +69tX39Qm1zrfzkTk31tbFjrLaw7/zQy8NKTm76CWlHBK8rj2uhGZpurWveTb6XZwkLm HssFJwUAZ8PbdPQKHk68QDRPWuHqT38P3PGMrgIVW44XiRcMESHHDU8mf4T1KukGbATh 7FSYV+9f98KCeWsPy8g234CuHGHBVjexpUiU2A7lG5P/eD1GL3VPLcy9sFf34HFOy7Sz EzuA== X-Gm-Message-State: AOAM533xGqMHxB5Xt+MNi0lEuo6/6fFXQYthKOS4OLTljQbLuQTfcnNL nGPFJ754gs1e8+7CYuenBMskj1TN128Rkw== X-Google-Smtp-Source: ABdhPJyR30WGvTiqeKPr1GLOM9lS00c4SqoUVXhTPZRxlEj5AjbnHe24RzToxGRDNzIgn7CmwDYD4A== X-Received: by 2002:a17:90a:ce8d:: with SMTP id g13mr8752890pju.85.1618979043393; Tue, 20 Apr 2021 21:24:03 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:7aaa:cbeb:5d87:4ab6]) by smtp.gmail.com with ESMTPSA id z18sm461316pfa.39.2021.04.20.21.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 21:24:02 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 21 Apr 2021 13:23:45 +0900 Message-Id: <20210421042346.312854-7-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.368.gbe11c130af-goog In-Reply-To: <20210421042346.312854-1-hiroh@chromium.org> References: <20210421042346.312854-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 6/7] 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 --- 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 51446fcf..76903d31 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::TestPatternMode] = + ControlInfo(libcamera::Span(values)); + } + /* * Compute exposure time limits. *