Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5053855rwb; Mon, 21 Nov 2022 16:03:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf6hUBF8VQbb4xql/+X0nYhA6K646FTge7HDo9DI4zF/5Ie4v1V8yHXAvwIYl2qtJS+J+ue6 X-Received: by 2002:a17:906:6acc:b0:78d:b371:16e5 with SMTP id q12-20020a1709066acc00b0078db37116e5mr3555634ejs.456.1669075408879; Mon, 21 Nov 2022 16:03:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669075408; cv=none; d=google.com; s=arc-20160816; b=YBsESlGfpT25KIEB+E76fiGN01dvqmq3sB3XnBIDQHUO5ybt+DTqmLjRf0VM2M70HD LvoYCLq6Cml7Pa8eQ13RZCnWZh9+3l7bcUszWATn35p3B2wTKfI3++skJiR9N9kJnOrD VPvC6vLXB5RgKBtdO/tm/Mq+rlZC3E4Bsisgy1EFv2djaRIVJ4bdZGWvLJpuhwB5VBnK 4ciRUYVT9I0Xg8UNMCAsjGVEEXZDZKP1/xt/jIn/jQUnZYa+ejmu2f43nUxbtDHlylwH WE9xd2dFpGuKS7unn9nG5/cJStFRij2gWYLwFMfCwIsGJnDLBixlRDEeX50d3vcdfHug AYWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=L6uHYiIrGLYp5Jb6WI8oKxCEqiDo4ZMP4LAiSInxjY8=; b=ZfkN4LVKofp4p3UowIszxTCS8L5xLDbT32Nd1HU+NsXhQ33haPXEL8Vv4mMa380rnW ewkZbGO5Z/HSKUwG3q3IEBkRw022yV2RefWiQIHB67IuvvzmciDAToiWV1CZtiS65g/g z0yfdYdLqf0l+b95WuQ58Mw2Oz9q9lmwhAiwK+YcBHMsW8ghcYj39X1QtO5r+j7iy0L+ FSFCIp2vW0omtnMNfTcLphA8Neni2VYI0/KCiPjJCCO0XGdjY8Bpx0Yg/aPrOB/zXKJs k2C7wQ9og91NAaZr/IyWI6M76B6clrMejwauHixpVy2g3mmH3u/ecybb14SNWy6m9NdU 32OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=BSYxu68B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a056402161000b00469a9a595f6si2605458edv.552.2022.11.21.16.02.43; Mon, 21 Nov 2022 16:03:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=BSYxu68B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232056AbiKUXnh (ORCPT + 92 others); Mon, 21 Nov 2022 18:43:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232017AbiKUXmm (ORCPT ); Mon, 21 Nov 2022 18:42:42 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0600AE0DC9; Mon, 21 Nov 2022 15:41:46 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2322788F; Tue, 22 Nov 2022 00:41:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1669074096; bh=OsNzWOxt+1Uz9pblEiTC7lBWE1dWJGL9cCym66ao+hA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BSYxu68Bxi+i6zA2IBtJTdyNSgC0QbSR4M/jE4FDeatfguQNWpW/e5l8ysyKLwagi qm4CIZU/Dt1P7hV3Wzymz4NWWtinO9DHg33OD5e+dVVePLMzJH/58FnjkXkH7t9jRS zb8qd3rPQ3qx2kNM42eps2A/QcP3kQeRt66HXCdg= Date: Tue, 22 Nov 2022 01:41:21 +0200 From: Laurent Pinchart To: Umang Jain Cc: 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, Broadcom internal kernel review list , Dave Stevenson , Florian Fainelli , Naushir Patuck , David Plowman , Kieran Bingham Subject: Re: [PATCH 13/14] docs: admin-guide: media: bcm2835-isp: Add documentation for bcm2835-isp Message-ID: References: <20221121214722.22563-1-umang.jain@ideasonboard.com> <20221121214722.22563-14-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221121214722.22563-14-umang.jain@ideasonboard.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Umang and Naush, Thank you for the patch. On Tue, Nov 22, 2022 at 03:17:21AM +0530, Umang Jain wrote: > From: Naushir Patuck > > Document device nodes, frame buffer formats and initial set of > configuraiton that can be set from userspace to configure the pipeline. s/configuraiton/configuration/ > 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. Does the ISP really support RGB or YUV input images ? Is this supported by the driver ? > 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: This sounds weird. Pads are not video nodes, are they ? Or are those MMAL pads ? > + > +.. 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" Is that capture3 ? Maybe the video nodes should be renamed to make their purpose clearer ? > + - 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 32f82aed47d9..34e0d7102ef0 100644 > --- a/Documentation/userspace-api/media/drivers/index.rst > +++ b/Documentation/userspace-api/media/drivers/index.rst > @@ -31,6 +31,7 @@ For more details see the file COPYING in the source distribution of Linux. > :maxdepth: 5 > :numbered: > > + bcm2835-isp > ccs > cx2341x-uapi > dw100 -- Regards, Laurent Pinchart