From patchwork Tue Apr 13 07:50:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11899 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 CA099BD224 for ; Tue, 13 Apr 2021 07:50:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 36C9F687FE; Tue, 13 Apr 2021 09:50: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="Yt6Aqh1I"; dkim-atps=neutral Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8854C687F3 for ; Tue, 13 Apr 2021 09:50:24 +0200 (CEST) Received: by mail-pf1-x431.google.com with SMTP id b26so5756308pfr.3 for ; Tue, 13 Apr 2021 00:50: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=YzxudiL9RdnWExKq72dkeGWKcMzNq3PcKJXImVY0c6c=; b=Yt6Aqh1IlyUT3RP8yIhNrOSiQJDTLNzJFFpUXVTKQv15bm9atpWfowCmdJ0xwcMw5k EdL/Oi1PRHA4VVBdxfQh4DvgX3dZpl1IESBQpqcMNrsFYSLqQj7v/RLT4sFB5qHFxiAV VS9xXIB2HuDE5+EUcvjNzAoy/0rGVp0YTqCrI= 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=YzxudiL9RdnWExKq72dkeGWKcMzNq3PcKJXImVY0c6c=; b=mIlCxFNbdEOJCo0U1rrZdfWEO6Z+ppQSJi9Y3VT557JRbciFURKIvzUzvlQ+p6aZWM 74gsN95BG4CiS0dwio8KrAACJa/K5QH5HQwkNIE72B+R0PPq0DfWxw4omwd8+S64hcBO O7i4MzaDFxjs7R8eITimBAIOddN2iQiVV47bY2RuNVYTv2urMx3zveRcrjQHcTllUJ1b pFem6KADkcxgObMrO0pwydbOCHYuS97baeTH7w0xwwsGbQqc7ahBC/T84N4eK0dCWLzY xQfGe3qmSafAIjgON3nHw2T8butnsmIjVJaessA0M5O3hU/YcmalnBDAw6udGpdZeR5T 2uZQ== X-Gm-Message-State: AOAM531LHo2kSweK8+0JvPG3dX11XDw78cHS6MLH6YpSLBTK8Zz1q6cl cJxkr7mkyntncj01/c5xsE83Rmkesn5qdA== X-Google-Smtp-Source: ABdhPJxxVCXDGG1XFdbL/QRGvS7iP2gXhdwYYfwJ2f8JltmUT7Becl6q/D8Ce7iyXVD9uLGSjXWSCA== X-Received: by 2002:aa7:8889:0:b029:248:effc:9a4d with SMTP id z9-20020aa788890000b0290248effc9a4dmr15012656pfe.71.1618300222677; Tue, 13 Apr 2021 00:50:22 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:84f5:7981:dfbe:8f02]) by smtp.gmail.com with ESMTPSA id n25sm11525125pff.154.2021.04.13.00.50.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 00:50:22 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Tue, 13 Apr 2021 16:50:08 +0900 Message-Id: <20210413075013.3069213-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v2 0/5] Report available 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: , Cc: jmondi@jacopo.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This patch series aims that Android HAL client can acquire available test pattern modes. The proper solution is the following: 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. Right now, this patch series contains (1) - (5). Note that I would rather split this to multiple patch series later once this solution is approved by reviewers. Hirokazu Honda (5): 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 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/libcamera/camera_sensor.cpp | 38 +++++++ 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 | 104 ++++++++++++++++++- 11 files changed, 235 insertions(+), 9 deletions(-) --- 2.31.1.295.g9ea45b61b8-goog