Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4936856rwb; Mon, 21 Nov 2022 14:08:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ptOWXNz6DI/QhsG4fv79aNoG2UX07N3mVXs9fgqCcLZIPZ13iXJLrG5hjrnAouKe2fcIB X-Received: by 2002:a17:906:5583:b0:78d:b3ef:656c with SMTP id y3-20020a170906558300b0078db3ef656cmr2116220ejp.627.1669068507665; Mon, 21 Nov 2022 14:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669068507; cv=none; d=google.com; s=arc-20160816; b=bOGK2RgEbhfjqXfLjZ+xvYbaNBerfwOFGC88eyxmnHwGOw4fL8yzMERB2E310pezNG qyrv4FZ3snSn5n0MUWasiKsWaLLDQ9oX5bISRPMP2E4ZAsne6g/g2CLnPGZRwDlzLsgQ mVpdlOAZTbsybbf/I5YmdGJKBiH4yzYtqdX7cQlJA21tEm+6pYMGfn26aH5garqZjHU6 W/+HC9xWobGsIlYocjvsEoN3InqTpsnzkiwlrIsuOhXYqIYlkqaOGVgLFX5KhGR/ZYNe zWPlOt3c0nPbxI/SexK88JG/qe713RIvp43S4YDW6UdNYrrwNb9u03ePiydPIt1qSLRK Nanw== 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=VXT5g3UZCgDmYfxNPVB1RiU/3V5Zqu/MFEeCJg1ny6Y=; b=DvSMcmcsCu8yWMh89fZe35v9KxXDMIHv0tnrUnNnAmc1dJ6wlTHgmXGdQqBlcFDKXj 7Zvo+yksgFn+a2QWcMMCM8cJjL5qM83eV+Nk6y1HJpWZBm2oCqCrB1z8HTNHGmbMGEte WOSFZ/2fThyImT1wDkS+WIGHr94PU9usCcQW9jRQwwyLk2kh3v9GfrKMxaP/zBT+u1jG MmhgiVm4dX7bw3F/ZdYtwfenZb/SKS2zpyG9j51FLZHlvpLvu2/4GIXtdqrTkXwh26KP QzXT60bMLX0IWPrdk6JsPEUUbXOYjcU23xZlM5xQ0PyooQud1uj47nw2ffwTme7DYh3c xoFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=uYZZ6PuF; 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 fk23-20020a056402399700b0045d15f39bf4si9873810edb.479.2022.11.21.14.08.04; Mon, 21 Nov 2022 14:08:27 -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=uYZZ6PuF; 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 S232040AbiKUVvJ (ORCPT + 91 others); Mon, 21 Nov 2022 16:51:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232033AbiKUVuT (ORCPT ); Mon, 21 Nov 2022 16:50:19 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 299B1E06A1; Mon, 21 Nov 2022 13:50:18 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [103.86.18.138]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F4C3987; Mon, 21 Nov 2022 22:50:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1669067416; bh=JS8+fXJ6TOX46sMS1tfpthP5sjk1x7TKFtwXNuYYSOI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uYZZ6PuFIf4DVH9PPB+/ZfEREmODVyfanocpSMkY0SvyLpJwoW3JafiRqSSryEgVx WDa1GrfVAuUbCf2l7fmL14TnVzFeY+5phtgtav8ufakJH8tLOjflswn3gFst05KOkr v1KFXeGnbehbqlYKayyy/B/C8JCMuV7TGQOad0KY= 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, Broadcom internal kernel review list Cc: Dave Stevenson , Florian Fainelli , Naushir Patuck , David Plowman , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH 13/14] docs: admin-guide: media: bcm2835-isp: Add documentation for bcm2835-isp Date: Tue, 22 Nov 2022 03:17:21 +0530 Message-Id: <20221121214722.22563-14-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221121214722.22563-1-umang.jain@ideasonboard.com> References: <20221121214722.22563-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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 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 -- 2.37.3