From patchwork Fri May 28 03:05:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12467 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 543EAC3205 for ; Fri, 28 May 2021 03:05:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EC8A46892E; Fri, 28 May 2021 05:05:46 +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="HZBCRIGJ"; dkim-atps=neutral Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9687F68925 for ; Fri, 28 May 2021 05:05:44 +0200 (CEST) Received: by mail-pl1-x62f.google.com with SMTP id h12so937084plf.11 for ; Thu, 27 May 2021 20:05:44 -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=wHSrzNuB9f7V06xtq8lyAZpgYyHA1noTd6F7pwFmqkk=; b=HZBCRIGJoQJV45ZONWqnOURBJMD416kJ6QkIBhFn7G97gtRUQcoVTvqW1aS6W/4/Fw sp4/4S6dSuR6emlRKKuFytVb+gLO5nmAMsVlyCl4TyASlga/5tV1j9iRygtxf5bdrZjp MHJPx9vhafCDwrtiM05Q1LaGxkClckAupcr/Q= 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=wHSrzNuB9f7V06xtq8lyAZpgYyHA1noTd6F7pwFmqkk=; b=moy9XMyZpyo4qxltYx2/t/OByzN3ZVRnoyo3e8XQcfcyxOmnUAHbDKEZMaFrqUODlN 3NmwOwcQWJvg2BtlZw2cpHZ/A7NSnWerSDRL0EUOTfnqjClaC5s0xx0mtVGDALvbEEv2 0B0C9jhT+7hfcDcP2fAsAIRGKZqHWV4L9G1nFSO/GPPM82//z0sH5K+aVSg0rWLhxcIG kYIaiVXhIO/zW0d/ZinGO4Se8n9K95Sw/XCuPlo3PzPSlxRCfd18xcEfDoLJqZbndlf9 4wGLD7O3SK8X46quTHwdhNeyp5ItvnFCF80v9cuVVkwTmpFirn7bAb8cnOK+Xn/8LLRi 3A6Q== X-Gm-Message-State: AOAM532/1wNu9iSKuU6j/Dm2Fj9J/McZrPXc0+o4QGwpHYRUYg8qiFz7 4GnC1yaMUKyZ+ZDcBMvZMHBk2EJkjUNuBQ== X-Google-Smtp-Source: ABdhPJx8S231A3OYPf/+9yTXfM61Dc1lV21EIr0AIR4dpNyE66ZZtyFWKAYDZdnuijH3VZ/CVQBkow== X-Received: by 2002:a17:902:9685:b029:ef:70fd:a5a2 with SMTP id n5-20020a1709029685b02900ef70fda5a2mr6031689plp.20.1622171143069; Thu, 27 May 2021 20:05:43 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:caec:ab3b:ea16:3d01]) by smtp.gmail.com with ESMTPSA id l20sm2892051pjq.38.2021.05.27.20.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 20:05:42 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Fri, 28 May 2021 12:05:30 +0900 Message-Id: <20210528030531.189492-5-hiroh@chromium.org> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog In-Reply-To: <20210528030531.189492-1-hiroh@chromium.org> References: <20210528030531.189492-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 58923bc7..0e028cff 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -936,6 +936,18 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data) ControlInfoMap::Map controls = IPU3Controls; const ControlInfoMap &sensorControls = sensor->controls(); + if (const std::vector &testPatternModes = + sensor->testPatternModes(); + !testPatternModes.empty()) { + std::vector values; + values.reserve(testPatternModes.size()); + + for (uint8_t pattern : testPatternModes) + values.emplace_back(static_cast(pattern)); + + controls[&controls::draft::TestPatternMode] = ControlInfo(values); + } + /* * Compute exposure time limits. *