From patchwork Wed Apr 28 07:36:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12123 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 94737BDE44 for ; Wed, 28 Apr 2021 07:36:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D73C1688B4; Wed, 28 Apr 2021 09:36:25 +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="oOK2aEow"; dkim-atps=neutral Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5AF2C688AE for ; Wed, 28 Apr 2021 09:36:24 +0200 (CEST) Received: by mail-pl1-x631.google.com with SMTP id s20so16480924plr.13 for ; Wed, 28 Apr 2021 00:36:24 -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:mime-version :content-transfer-encoding; bh=y39Y0fBEX1KiJkCbs7FDEhTKJrT65iSsVAulX3Mi0FM=; b=oOK2aEowEIWRhF4Pf1F433iZVDrzyk+2lpQE378PaFevUi0rZm7b1PtCWGZai7AFjU i7EcKFbIql+bZvofrDJgFZe/yvHJLWkDOHOL4nb/vv1XW1gBSd1QOFyA8yQYu1YaXsdv 4n/GtAgXR7PAa+uDmQ0yMpf6C2PII2VeB30gM= 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:mime-version :content-transfer-encoding; bh=y39Y0fBEX1KiJkCbs7FDEhTKJrT65iSsVAulX3Mi0FM=; b=S/qszGVMWsJRnMyKU80SwdgwL7vHK9GNEIi+PRFyBwU89GIK3jAif/HWZjZ9GgEzxY 925g1cjXuBBR5jFdKPxsUr6KfawrGxfHoFoCDU+sFDCelqWWTzWDwBMl3dusLYnONcZP 4AJezVnPHkWRLrc9jYFQnzziT27pyefXWa+W2NiWCn8v4B9Glo2XKx9V6+FYqxbKBQLI 9zf8MxE7Gp8pebBxKNeik8YDdCqcKOdzlmFUmDPOfOMciyw1YTu4IRsbEeJNEDrb4Hzw BCtkUUAy4s91618CYFKcnfsQy/UJmI5Ayt8KD835jchqlyP2XEF87j/2ygZ+Z2uwq5ZE mIQA== X-Gm-Message-State: AOAM533Z/LNPd5UUl7ipKbMyRNDSb3cnCOqpHNdyoGyyUUD5gT7qWyMF QvpRYGpyxHvS71sltgkQd7D7IClPoVP88Q== X-Google-Smtp-Source: ABdhPJw4HmiMMojMajNMA60gjrbk7zmzAYIZ5wXn1MQjV4ZE9oOXwpSYAdadfIt8WoIP4e7t7/nKQw== X-Received: by 2002:a17:903:208b:b029:ed:74ad:4c15 with SMTP id d11-20020a170903208bb02900ed74ad4c15mr915535plc.6.1619595382623; Wed, 28 Apr 2021 00:36:22 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 00:36:22 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 28 Apr 2021 16:36:10 +0900 Message-Id: <20210428073617.373422-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.498.g6c1eba8ee3d-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/7] Report Android HAL client test pattern modes 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" This patch series enables Android HAL implementation to report sensor test pattern modes. ChromeOS camera test tests that a camera frame is not corrupted while it specifies some test pattern mode. If no test pattern mode is available, the test fails. In order to pass the test, libcamera needs to report available test pattern modes and produce camera frames with requested pattern modes. This patch series does as follows; 0.) Define libcamera test pattern control values. 1.) V4L2Device store all supported test pattern values (index and name) in ControlInfo. 2.) CameraSensor gets the test pattern values (name, etc) via V4L2Device::controls(). 3.) CameraSensor converts them to libcamera test pattern control values by using a conversion table in CameraSensorDatabase 4.) IPU3 reports the libcamera test pattern control values to Android HAL. 5.) Android HAL convers the libcamera test pattern control values to Android test pattern values. Change in v3: - Rather than adding a new ControlType for menu, the values for name/value of v4l2 menu are stored in ControlInfo together with values for indices. - Initialize test pattern modes in CameraSensor initialization and use the cached values later. Change in v2: - Add (1) and (5) patches to the series Hirokazu Honda (7): libcamera: controls: Add sensor test pattern mode libcamera: controls: Add extra control values to ControlInfo libcamera: V4L2Device: Support v4l2 menu control libcamera: SensorDatabase: Adds table of v4l2 name and test pattern libcamera: CameraSensor: Enable retrieving supported test pattern modes libcamera: pipeline: ipu3: Report available sensor test pattern mode android: CameraDevice: Report queried test pattern modes include/libcamera/controls.h | 5 ++ include/libcamera/internal/camera_sensor.h | 5 ++ include/libcamera/internal/sensor_database.h | 2 + include/libcamera/internal/v4l2_device.h | 3 + src/android/camera_device.cpp | 46 ++++++++++-- src/libcamera/camera_sensor.cpp | 40 +++++++++++ src/libcamera/control_ids.yaml | 58 ++++++++++++++++ src/libcamera/controls.cpp | 22 ++++++ src/libcamera/pipeline/ipu3/ipu3.cpp | 10 +++ src/libcamera/sensor_database.cpp | 39 +++++++++-- src/libcamera/v4l2_device.cpp | 73 ++++++++++++++++++-- 11 files changed, 285 insertions(+), 18 deletions(-) --- 2.31.1.498.g6c1eba8ee3d-goog