From patchwork Thu Nov 9 21:03:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 163591 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp706148vqs; Thu, 9 Nov 2023 13:05:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqfN+M6G8dMBJ4H6tsf7o6fMIxYQJXs1SIvsnbqe8qrZl5MEcjHOESlNQfkbEKuPz8iqNu X-Received: by 2002:a05:6830:3492:b0:6d6:3f13:4c0f with SMTP id c18-20020a056830349200b006d63f134c0fmr890050otu.29.1699563919605; Thu, 09 Nov 2023 13:05:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699563919; cv=none; d=google.com; s=arc-20160816; b=lwYqT1cO8eVBNXUK0UestAqKJnKipbaGj0nftVU996C91mjgp8pJ4m+pk6DZuAJz3V +PjOgQdzdQRMCy98EmaZM7vcNjHkAup/V3iZzjh3B1s2LyF01XQLLyLlkDoLf37ifj9F 3bOAx1pUz3ZtaDYD8TqYZNi6e/e/eXPWoPkBS83HpofhboiCZvRO2ruB6DSWlelo2qem ib+3Fr4GbABLhKVBtEOHtyR6RYL4i9jV4nWpURkK+kUzrESXx4FD05ly8bui6Z9o/j4A SuFcmIMU29r+64gt7ZNrDkTQQd/F/PxIdwaEzO/g6Bzzmtg+6mrGtfETi4RRvC2t6xKP sjmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oiEof2ceFpmXL8mYBqc+XD64zu7MM8zjMBHtB68IV+g=; fh=CGD8sPkE9LFVktNEez1cSTZ9bW97xSrzpPiSAFxWsOU=; b=B4W/U5QEixlNVvPXhFZcEQibwSJ+klTXG4fIWG5tqznMbBzxdzMQKf//glp79pQJ/3 zbiqAbYcy/Xh7weCaqkPJW0V4UDkKJyOj2JmHj+t7MLf8zNRXcJPyhOOqynGDEAtPV3a 9xpyqlKshRA4HCmVjl1Sq2N0+Rz9pOWGG7Ad+W6ZXSiatdVoYxc/rytqo3TDRom6p7DV BnAibooT2mF7/K18C8FgAeByu5Vto2owPlpAHiyiXQZ06QKKfSKhDDAw0W1C5F7ClfZe Hh8fi/PCqAg6WiqBkiDP4kKAmKA4mHNNTcnnqhdD/ai1Xqinr//DgD/nJllTdMOTCYx/ eZgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=VTAQLDNa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s30-20020a056830439e00b006bd04572d57si7378613otv.65.2023.11.09.13.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 13:05:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=VTAQLDNa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 50E68839DA25; Thu, 9 Nov 2023 13:05:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234975AbjKIVEy (ORCPT + 30 others); Thu, 9 Nov 2023 16:04:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345432AbjKIVET (ORCPT ); Thu, 9 Nov 2023 16:04:19 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17AD94C02; Thu, 9 Nov 2023 13:03:57 -0800 (PST) Received: from umang.jain (unknown [103.251.226.64]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 45C0117E1; Thu, 9 Nov 2023 22:03:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699563813; bh=vvjY/3+5X/Bu7WIIVIpITXXXTBylWdPZo0Po7C08w/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VTAQLDNa+QzwoR0AUhBMppyGPNUPjt+E7gELzZpdP1YO5JdiqBl8dnZetP57X6v6/ VEdJLCkei6FEKi+y9QR9L+NvcZjqSIR1ZyaJvabw31VuAneAlLqiDETQqwcNl1FEbt q55cg9BYmqkKa7o1MiP+rq5Jc4Z6haT/S930PrOI= From: Umang Jain To: linux-media@vger.kernel.org, kernel-list@raspberrypi.com, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev Cc: Dave Stevenson , Kieran Bingham , Laurent Pinchart , "Ricardo B . Marliere" , Dan Carpenter , Stefan Wahren , Naushir Patuck , Umang Jain Subject: [PATCH v2 14/15] docs: admin-guide: media: bcm2835-isp: Add documentation for bcm2835-isp Date: Thu, 9 Nov 2023 16:03:06 -0500 Message-ID: <20231109210309.638594-15-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231109210309.638594-1-umang.jain@ideasonboard.com> References: <20231109210309.638594-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 09 Nov 2023 13:05:18 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782121936451365604 X-GMAIL-MSGID: 1782121936451365604 From: Naushir Patuck Document device nodes, frame buffer formats and initial set of configuraiton that can be set from userspace to configure the pipeline. Signed-off-by: Naushir Patuck Signed-off-by: Umang Jain --- .../admin-guide/media/bcm2835-isp.rst | 127 ++++++++++++++++++ .../userspace-api/media/drivers/index.rst | 1 + 2 files changed, 128 insertions(+) create mode 100644 Documentation/admin-guide/media/bcm2835-isp.rst diff --git a/Documentation/admin-guide/media/bcm2835-isp.rst b/Documentation/admin-guide/media/bcm2835-isp.rst new file mode 100644 index 000000000000..e1c19f78435e --- /dev/null +++ b/Documentation/admin-guide/media/bcm2835-isp.rst @@ -0,0 +1,127 @@ +.. SPDX-License-Identifier: GPL-2.0 + +BCM2835 ISP Driver +================== + +Introduction +------------ + +The BCM2835 Image Sensor Pipeline (ISP) is a fixed function hardware pipeline +for performing image processing operations. Images are fed to the input +of the ISP through memory frame buffers. These images may be in various YUV, +RGB, or Bayer formats. A typical use case would have Bayer images obtained from +an image sensor by the BCM2835 Unicam peripheral, written to a memory +frame buffer, and finally fed into the input of the ISP. Two concurrent output +images may be generated in YUV or RGB format at different resolutions. +Statistics output is also generated for Bayer input images. + +The bcm2835-isp driver exposes the following media pads as V4L2 device nodes: + +.. tabularcolumns:: |l|l|l|l| + +.. cssclass: longtable + +.. flat-table:: + + * - *Pad* + - *Direction* + - *Purpose* + - *Formats* + + * - "bcm2835-isp0-output0" + - sink + - Accepts Bayer, RGB or YUV format frame buffers as input to the ISP HW + pipeline. + - :ref:`RAW8 `, + :ref:`RAW10P `, + :ref:`RAW12P `, + :ref:`RAW14P `, + :ref:`RAW16 `, + :ref:`RGB24/BGR24 `, + :ref:`YUYV `, + :ref:`YVYU `, + :ref:`UYVY `, + :ref:`VYUY `, + :ref:`YUV420/YVU420 ` + + * - "bcm2835-isp0-capture1" + - source + - High resolution YUV or RGB processed output from the ISP. + - :ref:`RGB565 `, + :ref:`RGB24/BGR24 `, + :ref:`ABGR32 `, + :ref:`YUYV `, + :ref:`YVYU `, + :ref:`UYVY `, + :ref:`VYUY `. + :ref:`YUV420/YVU420 `, + :ref:`NV12/NV21 `, + + * - "bcm2835-isp0-capture2" + - source + - Low resolution YUV processed output from the ISP. The output of + this pad cannot have a resolution larger than the "bcm2835-isp0-capture1" pad in any dimension. + - :ref:`YUYV `, + :ref:`YVYU `, + :ref:`UYVY `, + :ref:`VYUY `. + :ref:`YUV420/YVU420 `, + :ref:`NV12/NV21 `, + + * - "bcm2835-isp0-capture1" + - source + - Image statistics calculated from the input image provided on the + "bcm2835-isp0-output0" pad. Statistics are only available for Bayer + format input images. + - :ref:`v4l2-meta-fmt-bcm2835-isp-stats`. + +Pipeline Configuration +---------------------- + +The ISP pipeline can be configure through user-space by calling +:ref:`VIDIOC_S_EXT_CTRLS ` on the “bcm2835-isp0-output0” +node with the appropriate parameters as shown in the table below. + +.. tabularcolumns:: |p{2cm}|p{5.0cm}| + +.. cssclass: longtable + +.. flat-table:: + + * - *id* + - *Parameter* + + * - ``V4L2_CID_USER_BCM2835_ISP_CC_MATRIX`` + - struct :c:type:`bcm2835_isp_custom_ccm` + + * - ``V4L2_CID_USER_BCM2835_ISP_LENS_SHADING`` + - struct :c:type:`bcm2835_isp_lens_shading` + + * - ``V4L2_CID_USER_BCM2835_ISP_BLACK_LEVEL`` + - struct :c:type:`bcm2835_isp_black_level` + + * - ``V4L2_CID_USER_BCM2835_ISP_GEQ`` + - struct :c:type:`bcm2835_isp_geq` + + * - ``V4L2_CID_USER_BCM2835_ISP_GAMMA`` + - struct :c:type:`bcm2835_isp_gamma` + + * - ``V4L2_CID_USER_BCM2835_ISP_DENOISE`` + - struct :c:type:`bcm2835_isp_denoise` + + * - ``V4L2_CID_USER_BCM2835_ISP_SHARPEN`` + - struct :c:type:`bcm2835_isp_sharpen` + + * - ``V4L2_CID_USER_BCM2835_ISP_DPC`` + - struct :c:type:`bcm2835_isp_dpc` + +++++++++++++++++++++++++ +Configuration Parameters +++++++++++++++++++++++++ + +.. kernel-doc:: include/uapi/linux/bcm2835-isp.h + :functions: bcm2835_isp_rational bcm2835_isp_ccm bcm2835_isp_custom_ccm + bcm2835_isp_gain_format bcm2835_isp_lens_shading + bcm2835_isp_black_level bcm2835_isp_geq bcm2835_isp_gamma + bcm2835_isp_denoise bcm2835_isp_sharpen + bcm2835_isp_dpc_mode bcm2835_isp_dpc diff --git a/Documentation/userspace-api/media/drivers/index.rst b/Documentation/userspace-api/media/drivers/index.rst index 1726f8ec86fa..05e20a4e1d53 100644 --- a/Documentation/userspace-api/media/drivers/index.rst +++ b/Documentation/userspace-api/media/drivers/index.rst @@ -33,6 +33,7 @@ For more details see the file COPYING in the source distribution of Linux. aspeed-video camera-sensor + bcm2835-isp ccs cx2341x-uapi dw100