From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 508371079F for ; Mon, 21 Nov 2022 23:41:38 +0000 (UTC) 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> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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> 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