From patchwork Mon Jun 7 01:14:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12498 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 3B6B7C320B for ; Mon, 7 Jun 2021 01:14:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD4F76892D; Mon, 7 Jun 2021 03:14:16 +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="gjvxYjxH"; dkim-atps=neutral Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A7EB6892D for ; Mon, 7 Jun 2021 03:14:15 +0200 (CEST) Received: by mail-pf1-x433.google.com with SMTP id s14so10983609pfd.9 for ; Sun, 06 Jun 2021 18:14:15 -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=gjvxYjxHo9S36U67+o4BV8d5SM8wuOWbORFEb1e944JyNKwilrqmY4819sl9/hNfZu KAzBfnT+RfYCJwlWbXJqvY7PbHA5eQdhGsV/K1xFfPDyAK8GgVPdDZKYRvdQG80Pttbo 7fMuh0Y0CP6SeEGuXjc8vQSpVKa3GgtbH/GZQ= 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=ndYNRLGdC0wm6aMlZCrTDJIT5VQH0YwiKFKwVezjFO0t7RgCi6SlA9gOF7CcJ+qn7o vPtYuu9rCh5JHsbfk2t8igToiN9AfHiLmAwNo37qtNOSpuwNXeJ3PPw/ZGRuwyTzovtV viGS+hBPb64Q7m+Evgi5DGtiucSth4E6y4KaFPGAyDu94WtIuSX+U2SrGGnWmhUrSAML A15FIC2ovBB+9fcah80OL4gtog8np6dYCWgCZ4xnvoor5hjYMFaWyHXr7ea2Fo5D295u 2dTKNP+jUO/tfUK6e72sl6c5q9yJ8PN2ncJGxUdtTban797qGQFMy+x9H3UQhhej/SWK MIug== X-Gm-Message-State: AOAM530SzZTeNl+BcxwG6YoKeT/BhVJt1r214ewd+vtmI78rgQWBkrR/ xWkVZmixhIKQOkp1CcISciZ/CKd4H0Q+nFYR X-Google-Smtp-Source: ABdhPJxU244AvlvpjGL6MvG2sV2CHTE2C0N1erObIPJMDIF8UqiU0vsvyz6qjJ7JbL+htHcNoAF7Jw== X-Received: by 2002:aa7:83c3:0:b029:2e8:f2ba:3979 with SMTP id j3-20020aa783c30000b02902e8f2ba3979mr15023894pfn.8.1623028454045; Sun, 06 Jun 2021 18:14:14 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:6eb1:2d91:79ee:2043]) by smtp.gmail.com with ESMTPSA id h12sm7303655pgn.54.2021.06.06.18.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Jun 2021 18:14:13 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Mon, 7 Jun 2021 10:14:01 +0900 Message-Id: <20210607011402.55331-5-hiroh@chromium.org> X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog In-Reply-To: <20210607011402.55331-1-hiroh@chromium.org> References: <20210607011402.55331-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v7 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.