From patchwork Wed Apr 21 04:23:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12017 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 DDDF0BDB16 for ; Wed, 21 Apr 2021 04:23:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 55AA16883E; Wed, 21 Apr 2021 06:23:57 +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="TMzc2eXT"; dkim-atps=neutral Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 068BF602C3 for ; Wed, 21 Apr 2021 06:23:56 +0200 (CEST) Received: by mail-pl1-x636.google.com with SMTP id s20so5066888plr.13 for ; Tue, 20 Apr 2021 21:23:55 -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=S/k+j+HOuNpdaidDYsh5/HLrbcAwOJF5ZO1Gr8nMsAM=; b=TMzc2eXT8KkGZjx+aJemAS59QSq4y3MN657skP0IR2k/NqcnaABPRPnXmgyvkjFZf9 evGdMsJIFboxGE3QMjFgrMExDwGC3aspjqHxz4dSl5i2KvXaczB9JHjkmmjGJ47M0jR4 9aEgSszWqt9F8CUI4g41Z0Rj/V+Z724ElZAb8= 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=S/k+j+HOuNpdaidDYsh5/HLrbcAwOJF5ZO1Gr8nMsAM=; b=ABidx9Q8oCq0pzeU6SBoFmKaZOaoFaOIYppg4q6CBJapu2Mxz27TNDNqEOqEEe0Nki 1PECoYazg/ulxwRtnKmZPpnszsyekvHFSKgKLEANlJTFrCzQRSn9VE9d9POs8Xr9pZ1J 6Wp9MZ8+lYX6XgD7R8ZhieqSSsNaB7KZE8pUhXL+gsv5Kli3KEK4S1tXHF2CTfwvD4HR sh7XXXRX1oIkxXnWVOcKOpzM/n4XRoxxDWaP32RlV9/zXjVnm1Hn2ZSVlFdKWIC9TK6/ 8pIWjvae6Uf8g1nCw1nmZdUr6ZB+X8vPXDgRx1CNI1ZlGmak3TOkPIwzaG0UL28oqKRp IQ4g== X-Gm-Message-State: AOAM530Umq6hrsipGHwDhtiYha9Wo2kOaQfIGjTjogL+8jHp7a146Z72 c2U9nYU0YrFkWKB/jkKiVVdNOzmaI5hrrA== X-Google-Smtp-Source: ABdhPJxhcqWepDTKpyByaIGlSC3ITriapA02oxzmuW9lpyBIdVoeW0PeimMTNXtipBH/IfEBRXJpgA== X-Received: by 2002:a17:903:10a:b029:eb:1fd1:ca0 with SMTP id y10-20020a170903010ab02900eb1fd10ca0mr31898668plc.71.1618979034145; Tue, 20 Apr 2021 21:23:54 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:7aaa:cbeb:5d87:4ab6]) by smtp.gmail.com with ESMTPSA id z18sm461316pfa.39.2021.04.20.21.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 21:23:53 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 21 Apr 2021 13:23:39 +0900 Message-Id: <20210421042346.312854-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.368.gbe11c130af-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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.) Add menu support to controls. 2.) V4L2Device store all supported test pattern values with controls. 3.) CameraSensor gets the test pattern values (name, etc) via V4L2Device::controls(). 4.) CameraSensor converts them to libcamera test pattern control values by using a conversion table in CameraSensorDatabase 5.) IPU3 reports the libcamera test pattern control values to Android HAL. 6.) Android HAL convers the libcamera test pattern control values to Android test pattern values. Change in v2: - Add (1) and (6) patches to the series Hirokazu Honda (7): libcamera: controls: Add sensor test pattern mode libcamera: Controls: Add ControlTypeMenu libcamera: V4L2Device: Support v4l2 menu control libcamera: SensorDatabase: Adds table of v4l2 name and test pattern libcamera: CameraSensor: Attach available test pattern modes libcamera: pipeline: ipu3: Report available sensor test pattern mode android: CameraDevice: Report queried test pattern modes include/libcamera/controls.h | 28 ++++++ include/libcamera/internal/camera_sensor.h | 2 + include/libcamera/internal/sensor_database.h | 2 + include/libcamera/internal/v4l2_controls.h | 1 + include/libcamera/internal/v4l2_device.h | 3 + src/android/camera_device.cpp | 46 +++++++++- src/libcamera/camera_sensor.cpp | 38 +++++++++ src/libcamera/control_ids.yaml | 59 +++++++++++++ src/libcamera/controls.cpp | 7 ++ src/libcamera/pipeline/ipu3/ipu3.cpp | 12 +++ src/libcamera/sensor_database.cpp | 37 +++++++- src/libcamera/v4l2_controls.cpp | 10 ++- src/libcamera/v4l2_device.cpp | 90 ++++++++++++++++++-- 13 files changed, 322 insertions(+), 13 deletions(-) --- 2.31.1.368.gbe11c130af-goog