From patchwork Thu Jun 10 08:25:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12549 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 2F562BD78E for ; Thu, 10 Jun 2021 08:25:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DCA3568938; Thu, 10 Jun 2021 10:25:54 +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="gyw9VIqZ"; 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 ABCA8602C5 for ; Thu, 10 Jun 2021 10:25:53 +0200 (CEST) Received: by mail-pl1-x62c.google.com with SMTP id v12so586283plo.10 for ; Thu, 10 Jun 2021 01:25:53 -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=eGamX387RzZe2eIC3xUR0g3TZDatng8JNNtBxBmx/TQ=; b=gyw9VIqZnr4xjBKn/PNE+Zf2PqVFj4cuhv/zhycSyqvgH5Np6yMgU20CzFHBLZxHDW uXtib3PUOyLUDBI/X4TcXUJv1rnmrAZI3uxALJ9YSMO4bSgufzynbLqvuLfw7PdDYNRD oINWYWxBwt039Fj+8rX2OHrx5jh3clTcFTHks= 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=eGamX387RzZe2eIC3xUR0g3TZDatng8JNNtBxBmx/TQ=; b=bmeIqGl8nJXj2SYuvFNGM+Yz4tlHVp5s71ynPrrkj8wgRREz9MFhmPfw9VqaHvoapG 3HKYK6++fHMe99NZ+pVffccyNtlVH9rAijoYUQCo6YWOaYikli9SqhyOOm+XKkiRVGJN 0UgzO+WWabbSIY1VLBBdBZAwmPaKTytfOQDrKM7lqv7sG8uRmuK+LfHnJ87WHAW7I03H SzoDDtkHviSYuhca5ahRQPC49xMa8A/SWUN44+bym7m/M54hFkHonavP6ccDq0qoDb8w BQG8Ragr288twtekize0/YISTl0zkDiKYy+D+TRoedhKVWzjFNY2cpGb+roBVTzB1Ja1 mOTA== X-Gm-Message-State: AOAM533d0uNvT+i4mA9LNk6OVcPI0m2dVsUooCDh7PjqFsUiJYvJO/nE dgHdcdApLpP0OkE6Yv/wzn/j7vK9CvNFig== X-Google-Smtp-Source: ABdhPJz3YxbXw4Uzl1Sht86xUJy348WJ4mYbJnJdmGeocgtNsE9r4nPihw1BbPYAdy1vPrXPJvxECg== X-Received: by 2002:a17:903:2482:b029:fd:696c:1d2b with SMTP id p2-20020a1709032482b02900fd696c1d2bmr3949935plw.24.1623313552106; Thu, 10 Jun 2021 01:25:52 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:98e0:b356:1c8a:25d4]) by smtp.gmail.com with ESMTPSA id x3sm2087011pgx.8.2021.06.10.01.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 01:25:51 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Thu, 10 Jun 2021 17:25:38 +0900 Message-Id: <20210610082539.529739-5-hiroh@chromium.org> X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog In-Reply-To: <20210610082539.529739-1-hiroh@chromium.org> References: <20210610082539.529739-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v8 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 Reviewed-by: Laurent Pinchart --- 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 b986bb70..52b11687 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -935,6 +935,16 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data) ControlInfoMap::Map controls = IPU3Controls; const ControlInfoMap &sensorControls = sensor->controls(); + const std::vector &testPatternModes = sensor->testPatternModes(); + if (!testPatternModes.empty()) { + std::vector values; + values.reserve(testPatternModes.size()); + + for (int32_t pattern : testPatternModes) + values.emplace_back(pattern); + + controls[&controls::draft::TestPatternMode] = ControlInfo(values); + } /* * Compute exposure time limits.