From patchwork Sat Jan 14 19:47:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 18116 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 63D5CC3295 for ; Sat, 14 Jan 2023 19:47:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C3E2E625F6; Sat, 14 Jan 2023 20:47:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1673725651; bh=7Y5lZedw3sQCQu5BnIQLNkw7XghiBC6Se9sQDo5K4PU=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=28L9Fv7MnYdvrwuBoD0zue0O61sZCZ0op9rtiSfX9hQjaDWtK/yS5KCnjnbTQxTqo nDOCXWyitTZVea4MuzY243x1V+G87GCeXhoJtfDIRfKLZ/tSQ8gMtArqFkF8Ukpg95 SxWHEqXdW0kfI8/NV2XZF+vbr9Gl7K4Ke7SuFU9QtTiXufCzlyiu6nnCJghRd/33hG In78U7wY5lUG5gWMzK7rlSYBxFKDcaawP1eb9CxuEWQWRDi5NRIm0kg74Szfo/+sYP fhR4FZZ7O5svWSNuo4hSOCwkcRRCgdHxDuqUZPJyOQDDrOip5NgzhoJGScwcb9OiK0 EMjSrwJxN3F9g== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 63115625E6 for ; Sat, 14 Jan 2023 20:47:27 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="u4/1hqeo"; dkim-atps=neutral Received: from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 77DE54DD; Sat, 14 Jan 2023 20:47:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1673725646; bh=7Y5lZedw3sQCQu5BnIQLNkw7XghiBC6Se9sQDo5K4PU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u4/1hqeot/o7PGNmPBXs0X1n99YLNZHETzqnQJNt3gsCu3/dao7zF3ElXnPHyspVr FFxeGwLousnG2o9bYL536kJ7/jNCz4crvLRB3jXDw79Wbl9sf9KiZutojqqLhindom kLoyTIMDKhSuC5euy+XBCkNHcTbclNBd52K3Uk2k= To: libcamera-devel@lists.libcamera.org Date: Sat, 14 Jan 2023 20:47:12 +0100 Message-Id: <20230114194712.23272-6-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230114194712.23272-1-jacopo.mondi@ideasonboard.com> References: <20230114194712.23272-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 5/5] documentation: sensor_drivers: Document H/V flip 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: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Briefly document the optional requirement support for H/V flip controls. Signed-off-by: Jacopo Mondi Reviewed-by: David Plowman --- Documentation/sensor_driver_requirements.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/sensor_driver_requirements.rst b/Documentation/sensor_driver_requirements.rst index 3abc8f35924a..0e516b34a215 100644 --- a/Documentation/sensor_driver_requirements.rst +++ b/Documentation/sensor_driver_requirements.rst @@ -62,6 +62,18 @@ The sensor driver should support the following V4L2 controls: The controls are used to register the camera location and rotation. +In order to support rotating the image the sensor driver should support + +* `V4L2_CID_HFLIP`_ +* `V4L2_CID_VFLIP`_ + +.. _V4L2_CID_HFLIP: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/control.html +.. _V4L2_CID_VFLIP: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/control.html + +The controls must be writable from userspace. In case of a RAW Bayer sensors, +drivers should correctly report if vertical/horizontal flips modify the Bayer +pattern ordering by reporting the `V4L2_CTRL_FLAG_MODIFY_LAYOUT` control flag. + The sensor driver should implement support for the V4L2 Selection API, specifically it should implement support for the `VIDIOC_SUBDEV_G_SELECTION`_ ioctl with support for the following selection