From patchwork Thu May 6 07:54:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12199 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 7A8F5BDE7F for ; Thu, 6 May 2021 07:54:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EB76068919; Thu, 6 May 2021 09:54:58 +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="ewRoJ9Pd"; dkim-atps=neutral Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9AFEA68909 for ; Thu, 6 May 2021 09:54:57 +0200 (CEST) Received: by mail-pg1-x531.google.com with SMTP id d10so4123452pgf.12 for ; Thu, 06 May 2021 00:54:57 -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=U95mBWpunriNn7rTgqSdZ74bHm+tqpb/C5kx9MyfUL4=; b=ewRoJ9Pds1lM0rLFpWVviltMrkLRpw3kXbBbwtp3DGZnkAO1KqE450BjcGg8heuDWz HkBtpe1FXoWQlvzJ+37aSctDkXG/8660kkA057PBcrKWleXa9pwdh1TSz/zLI4S+PJ2S PR+hVP4sshwZ4UR1NiGsWX2x9/xv/1rJXMnzY= 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=U95mBWpunriNn7rTgqSdZ74bHm+tqpb/C5kx9MyfUL4=; b=m/lE4MHqWafbqPS/6N+ubzUfDvIpGbqeMEeKCR+2eZhcNkQpXxNtPYfvq7+BCY08nU LzzSq8DRkGE+49H5boeT6v+ov4F9f/I0KVjjS8mn9FY7dTdrb+x+ajPGeeSEgKS7gUqM XoY1mbJx0JUPC8gAQ3FFg+GLJMRqFFO2axcXF7rXG2UoUBo0PkZP720HU7rMQ5wmMbVq J/7nwH9hT4mPF6dDjxbUqzDBrIU9Yfmh6GsaN2fxKpLZt11Jsp8PZaWNa9GfyMfWEkxp WHuB7QRuiKa/VjNWziJmFUxnExsfDWAugAUymgBweuUGI9bMm6L7bjKhhhR2BUgi4FIp 4xsw== X-Gm-Message-State: AOAM533xWom8utnjzR38GYYh35R5x7Pgel3Y4ptgHcbW2cXQon54btwJ 4z6Bm/q8AmSRAqINQHCzTYyUWvTuEkSk/Q== X-Google-Smtp-Source: ABdhPJxPMFjtKQpjm+Ek8/saQq+tyOZu4k+2+lPBBRdHJuprKSeckXU+ndVe38vbWGIX1byJ6UeG4Q== X-Received: by 2002:a05:6a00:2308:b029:28e:d370:d435 with SMTP id h8-20020a056a002308b029028ed370d435mr3335962pfh.31.1620287695519; Thu, 06 May 2021 00:54:55 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:ede4:ae0e:d4a4:c0d3]) by smtp.gmail.com with ESMTPSA id f201sm1355546pfa.133.2021.05.06.00.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 00:54:54 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Thu, 6 May 2021 16:54:43 +0900 Message-Id: <20210506075449.1761752-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.607.g51e8a6a459-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/6] 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) in ControlInfo. 2.) CameraSensor gets the test pattern values (index) 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 v4: - Change ControlValue for menu to store the index only without name and 64-bit value. 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 (6): libcamera: controls: Add sensor test pattern mode libcamera: V4L2Device: Support v4l2 menu control libcamera: CameraSensorProperties: Adds table of v4l2 index 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/internal/camera_sensor.h | 5 ++ .../internal/camera_sensor_properties.h | 2 + include/libcamera/internal/v4l2_device.h | 3 + src/android/camera_device.cpp | 46 +++++++++++-- src/libcamera/camera_sensor.cpp | 28 ++++++++ src/libcamera/camera_sensor_properties.cpp | 20 ++++++ src/libcamera/control_ids.yaml | 58 +++++++++++++++++ src/libcamera/pipeline/ipu3/ipu3.cpp | 10 +++ src/libcamera/v4l2_device.cpp | 65 +++++++++++++++++-- 9 files changed, 226 insertions(+), 11 deletions(-) --- 2.31.1.607.g51e8a6a459-goog