From patchwork Wed Apr 28 07:36:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12129 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 2400ABDE44 for ; Wed, 28 Apr 2021 07:36:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D4543688B4; Wed, 28 Apr 2021 09:36:36 +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="AgAYxPoB"; dkim-atps=neutral Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AE70C688BC for ; Wed, 28 Apr 2021 09:36:33 +0200 (CEST) Received: by mail-pl1-x62b.google.com with SMTP id e2so28007392plh.8 for ; Wed, 28 Apr 2021 00:36:33 -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=TuN0pQYYQgzxSdB2iYkFDxxp3zogDjb5vpHNNdEskuU=; b=AgAYxPoBv3vNPxvPvMHgM6bXAUVbVOo3kc1vKyYWrvCkrpzBN6XCjS/tCdlFw/CVfT L4fzy6b158bo70ZT+e/LfYUsGRcY1yM6x794Pl9mrdTprNJ/83m9OzOef2wn6AwkWFgl TdholiCUWm7/LPERKhh4evK3TdyABmGJF3ORQ= 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=TuN0pQYYQgzxSdB2iYkFDxxp3zogDjb5vpHNNdEskuU=; b=afrnS6Z2CS0TUEwU2auk9Z25cK1kYL7xalU09UtxDjbX1Tcsy+qZgH/oM7XGzYAUoI CZ7SljgcaiRpHQNpVU1pX965jrcyNL308jcSyJjucdV5dkREmvId7PYsimk9HXuYHAaq j4k+cab8LJgahvm+zv0D20G7zi92Zz8SHP5jtPcg0JExe1CZxwlbRA/5TP/kaTofnwkv G6K7WffQOUet0FAUrQvHwDoVZ6G+J5OdStUVA0fw/BI6ilR+FA7KZJQpRfILu/kjqXna lNw0ymPjBGuUc/XGuAhPEyxbVxBTn/zbQyR4sXW1kRWU8kOGNGkWYFn21OKfoJ62+YF8 5Y1g== X-Gm-Message-State: AOAM531VyN6OcIwZfe1LACzjk9su8OHWUEWmXlaHmXpIoTWTIYIc6QpK 101as+f+W6piRsTsuTif7B8vzJW7XXHZpw== X-Google-Smtp-Source: ABdhPJzca9aDP/KXtpJ+Di9xNRJpuyJPTAYGtYfCxiyRgwgHVcAm6vybaqh0nkOyvOZzMr+FHgcn3g== X-Received: by 2002:a17:90a:5b0a:: with SMTP id o10mr2503073pji.82.1619595391987; Wed, 28 Apr 2021 00:36:31 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:489:a5f4:117:7d51]) by smtp.gmail.com with ESMTPSA id m11sm1661265pgs.4.2021.04.28.00.36.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 00:36:31 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 28 Apr 2021 16:36:16 +0900 Message-Id: <20210428073617.373422-7-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.498.g6c1eba8ee3d-goog In-Reply-To: <20210428073617.373422-1-hiroh@chromium.org> References: <20210428073617.373422-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 73306cea..b4d4b97d 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -891,6 +891,16 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data) ControlInfoMap::Map controls = IPU3Controls; const ControlInfoMap &sensorControls = sensor->controls(); + if (!sensorInfo.testPatternModes.empty()) { + std::vector values; + values.reserve(sensorInfo.testPatternModes.size()); + + for (int32_t pattern : sensorInfo.testPatternModes) + values.emplace_back(pattern); + + controls[&controls::draft::TestPatternMode] = ControlInfo(values); + } + /* * Compute exposure time limits. *