From patchwork Sun Jan 31 18:17:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11072 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 6DE23BD808 for ; Sun, 31 Jan 2021 18:17:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B6F99683DA; Sun, 31 Jan 2021 19:17:48 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sC6lUZ1c"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 96BC260309 for ; Sun, 31 Jan 2021 19:17:46 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F3F38813 for ; Sun, 31 Jan 2021 19:17:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1612117066; bh=FiZkxEO+Qx8apCJurmUkSbWqMAP24Rr9v9zi4jljSLU=; h=From:To:Subject:Date:From; b=sC6lUZ1ct6cA5VdQScYjJZRio+J3NXrHVlzqC15q+zKsUEiA9tKKH8NfPN4/+86I9 nduGRDPtjK5uHd9yJ58aw8+yyOPkDWMOmc2ij2dZBYZSUgFuslccaGx7Ki9i+xl2eX k/GxIX7P3IprOn3sgGq55qHH264m3QZMnxwCEVB0= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 31 Jan 2021 20:17:19 +0200 Message-Id: <20210131181722.5410-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] Restore CameraSensor usage for YUV sensors 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" Hello, The recent changes to the CameraSensor class that made the V4L2 EXPOSURE, HBLANK and PIXEL_RATE controls mandatory broke usage of YUV sensors in the simple pipeline handler, as many YUV sensor drivers don't support those controls. Drivers could of course be extended one by one to support the mandatory controls, but not all of these controls make sense for YUV sensors. YUV sensors include an ISP, and typically expose a higher-level API than raw sensors. They may not support manual control of exposure time (and while most of the sensors should support this, information to implement manual exposure time is not as widely available in sensor documentation than for raw sensors) or horizontal blanking. Support for those three controls is needed for raw sensors as they are required to properly configure the ISP or implement the imaging algorithms. As the simple pipeline handler doesn't support ISPs and rely on the sensor including an ISP, the information provided by these controls isn't needed, as shown by the pipeline handler not calling CameraSensor::sensorInfo(). The best course of action is thus to make these controls mandatory for raw sensors only, restoring support of YUV sensors in the simple pipeline handler. Laurent Pinchart (3): libcamera: camera_sensor: Store Bayer pattern in class member libcamera: camera_sensor: Restrict sensor info to raw sensors libcamera: camera_sensor: Check control availability from idmap Documentation/sensor_driver_requirements.rst | 2 +- include/libcamera/internal/camera_sensor.h | 2 + src/libcamera/camera_sensor.cpp | 98 +++++++++++++------- 3 files changed, 65 insertions(+), 37 deletions(-)