Re: [PATCH v1 1/2] doc-rst: Add Intel IPU3 documentation

2018-07-18 Thread Sakari Ailus
Hi Yong,

On Thu, Jun 14, 2018 at 10:29:32PM -0500, Yong Zhi wrote:
> From: Rajmohan Mani 
> 
> This patch adds the details about the IPU3 Imaging Unit driver.
> 
> Signed-off-by: Rajmohan Mani 
> Signed-off-by: Tian Shu Qiu 
> ---
>  Documentation/media/v4l-drivers/index.rst |   1 +
>  Documentation/media/v4l-drivers/ipu3.rst  | 304 
> ++
>  2 files changed, 305 insertions(+)
>  create mode 100644 Documentation/media/v4l-drivers/ipu3.rst
> 
> diff --git a/Documentation/media/v4l-drivers/index.rst 
> b/Documentation/media/v4l-drivers/index.rst
> index 679238e..179a393 100644
> --- a/Documentation/media/v4l-drivers/index.rst
> +++ b/Documentation/media/v4l-drivers/index.rst
> @@ -44,6 +44,7 @@ For more details see the file COPYING in the source 
> distribution of Linux.
>   davinci-vpbe
>   fimc
>   imx
> + ipu3
>   ivtv
>   max2175
>   meye
> diff --git a/Documentation/media/v4l-drivers/ipu3.rst 
> b/Documentation/media/v4l-drivers/ipu3.rst
> new file mode 100644
> index 000..a4550d8
> --- /dev/null
> +++ b/Documentation/media/v4l-drivers/ipu3.rst
> @@ -0,0 +1,304 @@
> +.. include:: 
> +
> +===
> +Intel Image Processing Unit 3 (IPU3) Imaging Unit (ImgU) driver
> +===
> +
> +Copyright |copy| 2018 Intel Corporation
> +
> +Introduction
> +
> +
> +This file documents Intel IPU3 (3rd generation Image Processing Unit) Imaging
> +Unit driver located under drivers/media/pci/intel/ipu3.
> +
> +The Intel IPU3 found in certain Kaby Lake (as well as certain Sky Lake)
> +platforms (U/Y processor lines) is made up of two parts namely Imaging Unit
> +(ImgU) and CIO2 device (MIPI CSI2 receiver).
> +
> +The CIO2 device receives the raw bayer data from the sensors and outputs the
> +frames in a format that is specific to IPU3 (for consumption by IPU3 ImgU).
> +CIO2 driver is available as drivers/media/pci/intel/ipu3/ipu3-cio2* and is
> +enabled through the CONFIG_VIDEO_IPU3_CIO2 config option.
> +
> +The Imaging Unit (ImgU) is responsible for processing images captured
> +through IPU3 CIO2 device. The ImgU driver sources can be found under
> +drivers/media/pci/intel/ipu3 directory. The driver is enabled through the
> +CONFIG_VIDEO_IPU3_IMGU config option.
> +
> +The two driver modules are named ipu3-csi2 and ipu3-imgu, respectively.
> +
> +The driver has been tested on Kaby Lake platforms (U/Y processor lines).
> +
> +The driver implements V4L2, Media controller and V4L2 sub-device interfaces.
> +Camera sensors that have CSI-2 bus, which are connected to the IPU3 CIO2
> +device are supported. Support for lens and flash drivers depends on the
> +above sensors.
> +
> +ImgU device nodes
> +=
> +
> +The ImgU is represented as a single V4L2 subdev, which provides a V4L2 subdev
> +interface to the user space.
> +
> +CIO2 device
> +===
> +
> +The CIO2 is represented as a single V4L2 subdev, which provides a V4L2 subdev
> +interface to the user space. There is a video node for each CSI-2 receiver,
> +with a single media controller interface for the entire device.
> +
> +Media controller
> +
> +
> +The media device interface allows to configure the ImgU links, which defines
> +the behavior of the IPU3 firmware. The link configuration tells the firmware
> +whether viewfinder or postview ISP pipeline should be enabled.
> +
> +Device operation
> +
> +
> +With IPU3, once the input video node ("ipu3-imgu":0, in :
> +format) is queued with buffer (in packed raw bayer format), IPU3 ISP starts
> +processing the buffer and produces the video output in YUV format and
> +statistics output on respective output nodes. The driver is expected to have
> +buffers ready for all of parameter, output and statistics nodes, when input
> +video node is queued with buffer.
> +
> +At a minimum, all of input, main output, 3A statistics, and either of
> +viewfinder or postview video nodes should be enabled for IPU3 to start image
> +processing. viewfinder and postview video nodes are mutually exclusive.
> +
> +input, output, viewfinder and postview video nodes
> +--
> +
> +The frames (in packed raw bayer format specific to IPU3) received by the
> +input video node is processed by the IPU3 Imaging Unit and is output to 2
> +video nodes, with each targeting different purpose (main output and 
> viewfinder
> +or postview output).
> +
> +Details on raw bayer format specific to IPU3 can be found as below.
> +Documentation/media/uapi/v4l/pixfmt-meta-intel-ipu3.rst
> +
> +The driver supports V4L2 Video Capture Interface as defined at 
> :ref:`devices`.
> +
> +Only the multi-planar API is supported. More details can be found at
> +:ref:`planar-apis`.
> +
> +
> +parameters video node
> +-
> +
> +The parameter video node receives the ISP algorithm parameters 

[PATCH v1 1/2] doc-rst: Add Intel IPU3 documentation

2018-06-14 Thread Yong Zhi
From: Rajmohan Mani 

This patch adds the details about the IPU3 Imaging Unit driver.

Signed-off-by: Rajmohan Mani 
Signed-off-by: Tian Shu Qiu 
---
 Documentation/media/v4l-drivers/index.rst |   1 +
 Documentation/media/v4l-drivers/ipu3.rst  | 304 ++
 2 files changed, 305 insertions(+)
 create mode 100644 Documentation/media/v4l-drivers/ipu3.rst

diff --git a/Documentation/media/v4l-drivers/index.rst 
b/Documentation/media/v4l-drivers/index.rst
index 679238e..179a393 100644
--- a/Documentation/media/v4l-drivers/index.rst
+++ b/Documentation/media/v4l-drivers/index.rst
@@ -44,6 +44,7 @@ For more details see the file COPYING in the source 
distribution of Linux.
davinci-vpbe
fimc
imx
+   ipu3
ivtv
max2175
meye
diff --git a/Documentation/media/v4l-drivers/ipu3.rst 
b/Documentation/media/v4l-drivers/ipu3.rst
new file mode 100644
index 000..a4550d8
--- /dev/null
+++ b/Documentation/media/v4l-drivers/ipu3.rst
@@ -0,0 +1,304 @@
+.. include:: 
+
+===
+Intel Image Processing Unit 3 (IPU3) Imaging Unit (ImgU) driver
+===
+
+Copyright |copy| 2018 Intel Corporation
+
+Introduction
+
+
+This file documents Intel IPU3 (3rd generation Image Processing Unit) Imaging
+Unit driver located under drivers/media/pci/intel/ipu3.
+
+The Intel IPU3 found in certain Kaby Lake (as well as certain Sky Lake)
+platforms (U/Y processor lines) is made up of two parts namely Imaging Unit
+(ImgU) and CIO2 device (MIPI CSI2 receiver).
+
+The CIO2 device receives the raw bayer data from the sensors and outputs the
+frames in a format that is specific to IPU3 (for consumption by IPU3 ImgU).
+CIO2 driver is available as drivers/media/pci/intel/ipu3/ipu3-cio2* and is
+enabled through the CONFIG_VIDEO_IPU3_CIO2 config option.
+
+The Imaging Unit (ImgU) is responsible for processing images captured
+through IPU3 CIO2 device. The ImgU driver sources can be found under
+drivers/media/pci/intel/ipu3 directory. The driver is enabled through the
+CONFIG_VIDEO_IPU3_IMGU config option.
+
+The two driver modules are named ipu3-csi2 and ipu3-imgu, respectively.
+
+The driver has been tested on Kaby Lake platforms (U/Y processor lines).
+
+The driver implements V4L2, Media controller and V4L2 sub-device interfaces.
+Camera sensors that have CSI-2 bus, which are connected to the IPU3 CIO2
+device are supported. Support for lens and flash drivers depends on the
+above sensors.
+
+ImgU device nodes
+=
+
+The ImgU is represented as a single V4L2 subdev, which provides a V4L2 subdev
+interface to the user space.
+
+CIO2 device
+===
+
+The CIO2 is represented as a single V4L2 subdev, which provides a V4L2 subdev
+interface to the user space. There is a video node for each CSI-2 receiver,
+with a single media controller interface for the entire device.
+
+Media controller
+
+
+The media device interface allows to configure the ImgU links, which defines
+the behavior of the IPU3 firmware. The link configuration tells the firmware
+whether viewfinder or postview ISP pipeline should be enabled.
+
+Device operation
+
+
+With IPU3, once the input video node ("ipu3-imgu":0, in :
+format) is queued with buffer (in packed raw bayer format), IPU3 ISP starts
+processing the buffer and produces the video output in YUV format and
+statistics output on respective output nodes. The driver is expected to have
+buffers ready for all of parameter, output and statistics nodes, when input
+video node is queued with buffer.
+
+At a minimum, all of input, main output, 3A statistics, and either of
+viewfinder or postview video nodes should be enabled for IPU3 to start image
+processing. viewfinder and postview video nodes are mutually exclusive.
+
+input, output, viewfinder and postview video nodes
+--
+
+The frames (in packed raw bayer format specific to IPU3) received by the
+input video node is processed by the IPU3 Imaging Unit and is output to 2
+video nodes, with each targeting different purpose (main output and viewfinder
+or postview output).
+
+Details on raw bayer format specific to IPU3 can be found as below.
+Documentation/media/uapi/v4l/pixfmt-meta-intel-ipu3.rst
+
+The driver supports V4L2 Video Capture Interface as defined at :ref:`devices`.
+
+Only the multi-planar API is supported. More details can be found at
+:ref:`planar-apis`.
+
+
+parameters video node
+-
+
+The parameter video node receives the ISP algorithm parameters that are used
+to configure how the ISP algorithms process the image.
+
+Details on raw bayer format specific to IPU3 can be found as below.
+Documentation/media/uapi/v4l/pixfmt-meta-intel-ipu3.rst
+
+3A statistics video node
+
+
+3A statistics video node is used by the ImgU driver to