linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	dacohen@gmail.com, snjw23@gmail.com,
	andriy.shevchenko@linux.intel.com, t.stanislaws@samsung.com,
	tuukkat76@gmail.com, k.debski@samsung.com, riverful@gmail.com,
	hverkuil@xs4all.nl, teturtia@gmail.com,
	pradeep.sawlani@gmail.com
Subject: Re: [PATCH v5 09/35] v4l: Add subdev selections documentation
Date: Thu, 15 Mar 2012 10:55:25 +0100	[thread overview]
Message-ID: <4F61BC8D.7060900@samsung.com> (raw)
In-Reply-To: <1331051596-8261-9-git-send-email-sakari.ailus@iki.fi>

Hi Sakari,

On 03/06/2012 05:32 PM, Sakari Ailus wrote:
> Add documentation for V4L2 subdev selection API. This changes also
> experimental V4L2 subdev API so that scaling now works through selection API
> only.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
> ---
>  Documentation/DocBook/media/Makefile               |    4 +-
>  Documentation/DocBook/media/v4l/compat.xml         |    9 +
>  Documentation/DocBook/media/v4l/dev-subdev.xml     |  202 +++++++++++++++--
>  Documentation/DocBook/media/v4l/v4l2.xml           |   17 ++-
>  .../media/v4l/vidioc-subdev-g-selection.xml        |  228 ++++++++++++++++++++
>  5 files changed, 433 insertions(+), 27 deletions(-)
>  cre
ate mode 100644 Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml

[snip]

> diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
> new file mode 100644
> index 0000000..9164b85
> --- /dev/null
> +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
> @@ -0,0 +1,228 @@
> +<refentry id="vidioc-subdev-g-selection">
> +  <refmeta>
> +    <refentrytitle>ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION</refentrytitle>
> +    &manvol;
> +  </refmeta>
> +
> +  <refnamediv>
> +    <refname>VIDIOC_SUBDEV_G_SELECTION</refname>
> +    <refname>VIDIOC_SUBDEV_S_SELECTION</refname>
> +    <refpurpose>Get or set selection rectangles on a subdev pad</refpurpose>
> +  </refnamediv>
> +
> +  <refsynopsisdiv>
> +    <funcsynopsis>
> +      <funcprototype>
> +	<funcdef>int <function>ioctl</function></funcdef>
> +	<paramdef>int <parameter>fd</parameter></paramdef>
> +	<paramdef>int <parameter>request</parameter></paramdef>
> +	<paramdef>struct v4l2_subdev_selection *<parameter>argp</parameter></paramdef>
> +      </funcprototype>
> +    </funcsynopsis>
> +  </refsynopsisdiv>
> +
> +  <refsect1>
> +    <title>Arguments</title>
> +
> +    <variablelist>
> +      <varlistentry>
> +	<term><parameter>fd</parameter></term>
> +	<listitem>
> +	  <para>&fd;</para>
> +	</listitem>
> +      </varlistentry>
> +      <varlistentry>
> +	<term><parameter>request</parameter></term>
> +	<listitem>
> +	  <para>VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION</para>
> +	</listitem>
> +      </varlistentry>
> +      <varlistentry>
> +	<term><parameter>argp</parameter></term>
> +	<listitem>
> +	  <para></para>
> +	</listitem>
> +      </varlistentry>
> +    </variablelist>
> +  </refsect1>
> +
> +  <refsect1>
> +    <title>Description</title>
> +
> +    <note>
> +      <title>Experimental</title>
> +      <para>This is an <link linkend="experimental">experimental</link>
> +      interface and may change in the future.</para>
> +    </note>
> +
> +    <para>The selections are used to configure various image
> +    processing functionality performed by the subdevs which affect the
> +    image size. This currently includes cropping, scaling and
> +    composition.</para>
> +
> +    <para>The selection API replaces <link
> +    linkend="vidioc-subdev-g-crop">the old subdev crop API</link>. All
> +    the function of the crop API, and more, are supported by the
> +    selections API.</para>
> +
> +    <para>See <xref linkend="subdev"></xref> for
> +    more information on how each selection target affects the image
> +    processing pipeline inside the subdevice.</para>
> +
> +    <section>
> +      <title>Types of selection targets</title>
> +
> +      <para>There are two types of selection targets: active and bounds.
> +      The ACTIVE targets are the targets which configure the hardware.
> +      The BOUNDS target will return a rectangle that contain all
> +      possible ACTIVE rectangles.</para>
> +    </section>
> +
> +    <section>
> +      <title>Discovering supported features</title>
> +
> +      <para>To discover which targets are supported, the user can
> +      perform <constant>VIDIOC_SUBDEV_G_SELECTION</constant> on them.
> +      Any unsupported target will return
> +      <constant>EINVAL</constant>.</para>
> +    </section>
> +
> +    <table pgwide="1" frame="none" id="v4l2-subdev-selection-targets">
> +      <title>V4L2 subdev selection targets</title>
> +      <tgroup cols="3">
> +        &cs-def;
> +	<tbody valign="top">
> +	  <row>
> +	    <entry><constant>V4L2_SUBDEV_SEL_TGT_CROP_ACTIVE</constant></entry>
> +	    <entry>0x0000</entry>
> +	    <entry>Active crop. Defines the cropping
> +	    performed by the processing step.</entry>
> +	  </row>
> +	  <row>
> +	    <entry><constant>V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS</constant></entry>
> +	    <entry>0x0002</entry>
> +	    <entry>Bounds of the crop rectangle.</entry>
> +	  </row>
> +	  <row>
> +	    <entry><constant>V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTIVE</constant></entry>
> +	    <entry>0x0100</entry>
> +	    <entry>Active compose rectangle. Used to configure scaling
> +	    on sink pads and composition on source pads.</entry>
> +	  </row>
> +	  <row>
> +	    <entry><constant>V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
> +	    <entry>0x0102</entry>
> +	    <entry>Bounds of the compose rectangle.</entry>
> +	  </row>
> +	</tbody>
> +      </tgroup>
> +    </table>
> +
> +    <table pgwide="1" frame="none" id="v4l2-subdev-selection-flags">
> +      <title>V4L2 subdev selection flags</title>
> +      <tgroup cols="3">
> +        &cs-def;
> +	<tbody valign="top">
> +	  <row>
> +	    <entry><constant>V4L2_SUBDEV_SEL_FLAG_SIZE_GE</constant></entry>
> +	    <entry>(1 &lt;&lt; 0)</entry> <entry>Suggest the driver it
> +	    should choose greater or equal rectangle (in size) than
> +	    was requested. Albeit the driver may choose a lesser size,
> +	    it will only do so due to hardware limitations. Without
> +	    this flag (and
> +	    <constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant>) the
> +	    behaviour is to choose the closest possible
> +	    rectangle.</entry>
> +	  </row>
> +	  <row>
> +	    <entry><constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant></entry>
> +	    <entry>(1 &lt;&lt; 1)</entry> <entry>Suggest the driver it
> +	    should choose lesser or equal rectangle (in size) than was
> +	    requested. Albeit the driver may choose a greater size, it
> +	    will only do so due to hardware limitations.</entry>
> +	  </row>
> +	  <row>
> +	    <entry><constant>V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG</constant></entry>
> +	    <entry>(1 &lt;&lt; 2)</entry>
> +	    <entry>The configuration should not be propagated to any
> +	    further processing steps. If this flag is not given, the
> +	    configuration is propagated inside the subdevice to all
> +	    further processing steps.</entry>
> +	  </row>
> +	</tbody>
> +      </tgroup>
> +    </table>
> +
> +    <table pgwide="1" frame="none" id="v4l2-subdev-selection">
> +      <title>struct <structname>v4l2_subdev_selection</structname></title>
> +      <tgroup cols="3">
> +        &cs-str;
> +	<tbody valign="top">
> +	  <row>
> +	    <entry>__u32</entry>
> +	    <entry><structfield>which</structfield></entry>
> +	    <entry>Active or try selection, from
> +	    &v4l2-subdev-format-whence;.</entry>
> +	  </row>
> +	  <row>
> +	    <entry>__u32</entry>
> +	    <entry><structfield>pad</structfield></entry>
> +	    <entry>Pad number as reported by the media framework.</entry>
> +	  </row>
> +	  <row>
> +	    <entry>__u32</entry>
> +	    <entry><structfield>target</structfield></entry>
> +	    <entry>Target selection rectangle. See
> +	    <xref linkend="v4l2-subdev-selection-targets">.</xref>.</entry>
> +	  </row>
> +	  <row>
> +	    <entry>__u32</entry>
> +	    <entry><structfield>flags</structfield></entry>
> +	    <entry>Flags. See
> +	    <xref linkend="v4l2-subdev-selection-flags">.</xref></entry>
> +	  </row>
> +	  <row>
> +	    <entry>&v4l2-rect;</entry>
> +	    <entry><structfield>rect</structfield></entry>
> +	    <entry>Crop rectangle boundaries, in pixels.</entry>

Shouldn't it be "Selection rectangle, in pixels." ?

> +	  </row>
> +	  <row>
> +	    <entry>__u32</entry>
> +	    <entry><structfield>reserved</structfield>[8]</entry>
> +	    <entry>Reserved for future extensions. Applications and drivers must
> +	    set the array to zero.</entry>
> +	  </row>
> +	</tbody>
> +      </tgroup>
> +    </table>
> +
> +  </refsect1>

--

Regards,
Sylwester

-- 
Sylwester Nawrocki
실베스터 나브로츠키
Samsung Poland R&D Center

  parent reply	other threads:[~2012-03-15  9:55 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 16:32 [PATCH v5 0/35] V4L2 subdev and sensor control changes, SMIA++ driver and N9 camera board code Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 01/35] v4l: Introduce integer menu controls Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 02/35] v4l: Document " Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 03/35] vivi: Add an integer menu test control Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 04/35] v4l: VIDIOC_SUBDEV_S_SELECTION and VIDIOC_SUBDEV_G_SELECTION IOCTLs Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 05/35] v4l: vdev_to_v4l2_subdev() should have return type "struct v4l2_subdev *" Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 06/35] v4l: Check pad number in get try pointer functions Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 07/35] v4l: Support s_crop and g_crop through s/g_selection Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 08/35] v4l: Add subdev selections documentation: svg and dia files Sakari Ailus
2012-03-06 16:42   ` Laurent Pinchart
2012-03-06 16:32 ` [PATCH v5 09/35] v4l: Add subdev selections documentation Sakari Ailus
2012-03-06 16:44   ` Laurent Pinchart
2012-03-07  8:53   ` Michael Jones
2012-03-07 18:11     ` Sakari Ailus
2012-03-15  9:55   ` Sylwester Nawrocki [this message]
2012-03-15 13:00     ` Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 10/35] v4l: Mark VIDIOC_SUBDEV_G_CROP and VIDIOC_SUBDEV_S_CROP obsolete Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 11/35] v4l: Image source control class Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 12/35] v4l: Image processing " Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 13/35] v4l: Document raw bayer 4CC codes Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 14/35] v4l: Add DPCM compressed raw bayer pixel formats Sakari Ailus
2012-03-21  9:37   ` Prabhakar Lad
2012-03-21  9:53     ` Sakari Ailus
2012-03-21 11:44     ` [PATCH v5.5 14/40] " Sakari Ailus
2012-03-21 12:08       ` Prabhakar Lad
2012-03-06 16:32 ` [PATCH v5 15/35] media: Add link_validate() op to check links to the sink pad Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 16/35] v4l: Improve sub-device documentation for pad ops Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 17/35] v4l: Implement v4l2_subdev_link_validate() Sakari Ailus
2012-03-06 16:32 ` [PATCH v5 18/35] v4l: Allow changing control handler lock Sakari Ailus
2012-05-14 15:27   ` Sylwester Nawrocki
2012-05-14 15:45     ` Sakari Ailus
2012-05-14 16:02       ` Sylwester Nawrocki
2012-05-14 15:48     ` Sylwester Nawrocki
2012-03-06 16:33 ` [PATCH v5 19/35] omap3isp: Support additional in-memory compressed bayer formats Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 20/35] omap3isp: Move definitions required by board code under include/media Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 21/35] omap3: add definition for CONTROL_CAMERA_PHY_CTRL Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 22/35] omap3isp: Move setting constaints above media_entity_pipeline_start Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 23/35] omap3isp: Assume media_entity_pipeline_start may fail Sakari Ailus
2012-03-06 16:45   ` Laurent Pinchart
2012-03-06 16:33 ` [PATCH v5 24/35] omap3isp: Add lane configuration to platform data Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 25/35] omap3isp: Collect entities that are part of the pipeline Sakari Ailus
2012-03-07 10:35   ` Laurent Pinchart
2012-03-07 17:20     ` Sakari Ailus
2012-03-07 17:22       ` [PATCH v5.1 " Sakari Ailus
2012-03-07 23:50         ` Laurent Pinchart
2012-03-09 18:44           ` [PATCH " Sakari Ailus
2012-03-09 20:31           ` [PATCH v5.3 " Sakari Ailus
2012-03-09 20:34             ` Laurent Pinchart
2012-03-08 17:05     ` Sakari Ailus
2012-03-07 10:50   ` [PATCH v5 " Laurent Pinchart
2012-03-07 15:24     ` Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 26/35] omap3isp: Add information on external subdev to struct isp_pipeline Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 27/35] omap3isp: Introduce isp_video_check_external_subdevs() Sakari Ailus
2012-03-07 10:43   ` Laurent Pinchart
2012-03-07 17:49     ` Sakari Ailus
2012-03-07 18:52       ` Laurent Pinchart
2012-03-07 23:57         ` Sakari Ailus
2012-03-08 17:04         ` [PATCH v5.3 " Sakari Ailus
2012-03-08 18:05           ` Laurent Pinchart
2012-03-07 18:14     ` [PATCH v5.1 " Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 28/35] omap3isp: Use external rate instead of vpcfg Sakari Ailus
2012-03-07 10:53   ` Laurent Pinchart
2012-03-07 17:54     ` Sakari Ailus
2012-03-07 18:34     ` Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 29/35] omap3isp: Default link validation for ccp2, csi2, preview and resizer Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 30/35] omap3isp: Move CCDC link validation to ccdc_link_validate() Sakari Ailus
2012-03-07 11:00   ` Laurent Pinchart
2012-03-07 18:02     ` Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 31/35] omap3isp: Configure CSI-2 phy based on platform data Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 32/35] omap3isp: Add resizer data rate configuration to resizer_link_validate Sakari Ailus
2012-03-07 11:01   ` Laurent Pinchart
2012-03-06 16:33 ` [PATCH v5 33/35] omap3isp: Find source pad from external entity Sakari Ailus
2012-03-07 11:04   ` Laurent Pinchart
2012-03-07 18:08     ` Sakari Ailus
2012-03-06 16:33 ` [PATCH v5 34/35] smiapp: Generic SMIA++/SMIA PLL calculator Sakari Ailus
2012-03-07 12:26   ` Laurent Pinchart
2012-03-08 13:29     ` Sakari Ailus
2012-03-08 13:57     ` [PATCH v5.1 " Sakari Ailus
2012-03-08 14:38       ` Laurent Pinchart
2012-03-08 14:48         ` Sakari Ailus
2012-03-08 14:49         ` [PATCH v5.2 " Sakari Ailus
2012-03-08 14:51           ` Laurent Pinchart
2012-03-08 13:57     ` [PATCH v5.1 35/35] smiapp: Add driver Sakari Ailus
2012-03-08 14:46       ` Laurent Pinchart
2012-03-08 16:49         ` [PATCH v5.3 " Sakari Ailus
2012-03-11 13:37           ` Laurent Pinchart
2012-03-11 14:03             ` Sakari Ailus
2012-03-11 14:45               ` [PATCH v5.4 " Sakari Ailus
2012-03-11 16:32                 ` Laurent Pinchart
2012-03-08 15:06       ` [PATCH v5.1 " jean-philippe francois
2012-03-11  9:04         ` Sakari Ailus
2012-03-12  9:44           ` jean-philippe francois
2012-03-06 16:33 ` [PATCH v5 35/35] rm680: Add camera init Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F61BC8D.7060900@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dacohen@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=k.debski@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=pradeep.sawlani@gmail.com \
    --cc=riverful@gmail.com \
    --cc=sakari.ailus@iki.fi \
    --cc=snjw23@gmail.com \
    --cc=t.stanislaws@samsung.com \
    --cc=teturtia@gmail.com \
    --cc=tuukkat76@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).