All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] V4L: Remove "_ACTIVE" from the selection target name definitions
  2012-06-30 17:05 [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes Sakari Ailus
@ 2012-06-30 17:03 ` Sakari Ailus
  2012-06-30 17:03 ` [PATCH 2/8] v4l: Remove "_ACTUAL" from subdev selection API target definition names Sakari Ailus
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: Sakari Ailus @ 2012-06-30 17:03 UTC (permalink / raw)
  To: linux-media; +Cc: sylwester.nawrocki, t.stanislaws, laurent.pinchart, hverkuil

From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>

This patch drops the _ACTIVE part from the selection target names
as a prerequisite to unify the selection target names across the subdev
and regular video node API.

The meaning of V4L2_SEL_TGT_*_ACTIVE and V4L2_SUBDEV_SEL_TGT_*_ACTUAL
selection targets is logically the same. Different names add to confusion
where both APIs are used in a single driver or an application. For some
system configurations different names may lead to interoperability issues.

For backwards compatibility V4L2_SEL_TGT_CROP_ACTIVE and
V4L2_SEL_TGT_COMPOSE_ACTIVE are defined as aliases to V4L2_SEL_TGT_CROP
and V4L2_SEL_TGT_COMPOSE. These aliases will be removed after deprecation
period, according to Documentation/feature-removal-schedule.txt.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 Documentation/DocBook/media/v4l/selection-api.xml  |   24 ++++++++++----------
 .../DocBook/media/v4l/vidioc-g-selection.xml       |   15 ++++++-----
 drivers/media/video/s5p-fimc/fimc-capture.c        |   14 +++++-----
 drivers/media/video/s5p-fimc/fimc-lite.c           |    4 +-
 drivers/media/video/s5p-jpeg/jpeg-core.c           |    4 +-
 drivers/media/video/s5p-tv/mixer_video.c           |    8 +++---
 drivers/media/video/v4l2-ioctl.c                   |    8 +++---
 include/linux/videodev2.h                          |    8 +++++-
 8 files changed, 45 insertions(+), 40 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml
index b299e47..ac013e5 100644
--- a/Documentation/DocBook/media/v4l/selection-api.xml
+++ b/Documentation/DocBook/media/v4l/selection-api.xml
@@ -91,7 +91,7 @@ top/left corner at position <constant> (0,0) </constant>.  The rectangle's
 coordinates are expressed in pixels.</para>
 
 <para>The top left corner, width and height of the source rectangle, that is
-the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP_ACTIVE
+the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP
 </constant> target. It uses the same coordinate system as <constant>
 V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie
 completely inside the capture boundaries. The driver may further adjust the
@@ -111,7 +111,7 @@ height are equal to the image size set by <constant> VIDIOC_S_FMT </constant>.
 </para>
 
 <para>The part of a buffer into which the image is inserted by the hardware is
-controlled by the <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.
+controlled by the <constant> V4L2_SEL_TGT_COMPOSE </constant> target.
 The rectangle's coordinates are also expressed in the same coordinate system as
 the bounds rectangle. The composing rectangle must lie completely inside bounds
 rectangle. The driver must adjust the composing rectangle to fit to the
@@ -125,7 +125,7 @@ bounding rectangle.</para>
 
 <para>The part of a buffer that is modified by the hardware is given by
 <constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant>. It contains all pixels
-defined using <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> plus all
+defined using <constant> V4L2_SEL_TGT_COMPOSE </constant> plus all
 padding data modified by hardware during insertion process. All pixels outside
 this rectangle <emphasis>must not</emphasis> be changed by the hardware. The
 content of pixels that lie inside the padded area but outside active area is
@@ -153,7 +153,7 @@ specified using <constant> VIDIOC_S_FMT </constant> ioctl.</para>
 
 <para>The top left corner, width and height of the source rectangle, that is
 the area from which image date are processed by the hardware, is given by the
-<constant> V4L2_SEL_TGT_CROP_ACTIVE </constant>. Its coordinates are expressed
+<constant> V4L2_SEL_TGT_CROP </constant>. Its coordinates are expressed
 in in the same coordinate system as the bounds rectangle. The active cropping
 area must lie completely inside the crop boundaries and the driver may further
 adjust the requested size and/or position according to hardware
@@ -165,7 +165,7 @@ bounding rectangle.</para>
 
 <para>The part of a video signal or graphics display where the image is
 inserted by the hardware is controlled by <constant>
-V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.  The rectangle's coordinates
+V4L2_SEL_TGT_COMPOSE </constant> target.  The rectangle's coordinates
 are expressed in pixels. The composing rectangle must lie completely inside the
 bounds rectangle.  The driver must adjust the area to fit to the bounding
 limits.  Moreover, the driver can perform other adjustments according to
@@ -184,7 +184,7 @@ such a padded area is driver-dependent feature not covered by this document.
 Driver developers are encouraged to keep padded rectangle equal to active one.
 The padded target is accessed by the <constant> V4L2_SEL_TGT_COMPOSE_PADDED
 </constant> identifier.  It must contain all pixels from the <constant>
-V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para>
+V4L2_SEL_TGT_COMPOSE </constant> target.</para>
 
    </section>
 
@@ -193,8 +193,8 @@ V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para>
      <title>Scaling control</title>
 
 <para>An application can detect if scaling is performed by comparing the width
-and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE
-</constant> and <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> targets. If
+and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP
+</constant> and <constant> V4L2_SEL_TGT_COMPOSE </constant> targets. If
 these are not equal then the scaling is applied. The application can compute
 the scaling ratios using these values.</para>
 
@@ -252,7 +252,7 @@ area)</para>
 	ret = ioctl(fd, &VIDIOC-G-SELECTION;, &amp;sel);
 	if (ret)
 		exit(-1);
-	sel.target = V4L2_SEL_TGT_CROP_ACTIVE;
+	sel.target = V4L2_SEL_TGT_CROP;
 	ret = ioctl(fd, &VIDIOC-S-SELECTION;, &amp;sel);
 	if (ret)
 		exit(-1);
@@ -281,7 +281,7 @@ area)</para>
 	r.left = sel.r.width / 4;
 	r.top = sel.r.height / 4;
 	sel.r = r;
-	sel.target = V4L2_SEL_TGT_COMPOSE_ACTIVE;
+	sel.target = V4L2_SEL_TGT_COMPOSE;
 	sel.flags = V4L2_SEL_FLAG_LE;
 	ret = ioctl(fd, &VIDIOC-S-SELECTION;, &amp;sel);
 	if (ret)
@@ -298,11 +298,11 @@ V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> for other devices</para>
 
 	&v4l2-selection; compose = {
 		.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
-		.target = V4L2_SEL_TGT_COMPOSE_ACTIVE,
+		.target = V4L2_SEL_TGT_COMPOSE,
 	};
 	&v4l2-selection; crop = {
 		.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
-		.target = V4L2_SEL_TGT_CROP_ACTIVE,
+		.target = V4L2_SEL_TGT_CROP,
 	};
 	double hscale, vscale;
 
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
index bb04eff..6376e57 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
@@ -65,8 +65,8 @@ Do not use multiplanar buffers.  Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
 </constant>.  Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
 <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>.  The next step is
 setting the value of &v4l2-selection; <structfield>target</structfield> field
-to <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant>
-V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>).  Please refer to table <xref
+to <constant> V4L2_SEL_TGT_CROP </constant> (<constant>
+V4L2_SEL_TGT_COMPOSE </constant>).  Please refer to table <xref
 linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
 targets.  The <structfield>flags</structfield> and <structfield>reserved
 </structfield> fields of &v4l2-selection; are ignored and they must be filled
@@ -86,8 +86,8 @@ use multiplanar buffers.  Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
 </constant>.  Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
 <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>.  The next step is
 setting the value of &v4l2-selection; <structfield>target</structfield> to
-<constant>V4L2_SEL_TGT_CROP_ACTIVE</constant> (<constant>
-V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref
+<constant>V4L2_SEL_TGT_CROP</constant> (<constant>
+V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref
 linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
 targets.  The &v4l2-rect; <structfield>r</structfield> rectangle need to be
 set to the desired active area. Field &v4l2-selection; <structfield> reserved
@@ -161,7 +161,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
 	&cs-def;
 	<tbody valign="top">
 	  <row>
-            <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry>
+            <entry><constant>V4L2_SEL_TGT_CROP</constant></entry>
             <entry>0x0000</entry>
             <entry>The area that is currently cropped by hardware.</entry>
 	  </row>
@@ -176,7 +176,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
             <entry>Limits for the cropping rectangle.</entry>
 	  </row>
 	  <row>
-            <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry>
+            <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry>
             <entry>0x0100</entry>
             <entry>The area to which data is composed by hardware.</entry>
 	  </row>
@@ -193,7 +193,8 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
 	  <row>
             <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
             <entry>0x0103</entry>
-            <entry>The active area and all padding pixels that are inserted or modified by hardware.</entry>
+            <entry>The active area and all padding pixels that are inserted or
+	      modified by hardware.</entry>
 	  </row>
 	</tbody>
       </tgroup>
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
index 62ce539..a3cd78d 100644
--- a/drivers/media/video/s5p-fimc/fimc-capture.c
+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
@@ -655,7 +655,7 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx,
 		r->left   = r->top = 0;
 		return;
 	}
-	if (target == V4L2_SEL_TGT_COMPOSE_ACTIVE) {
+	if (target == V4L2_SEL_TGT_COMPOSE) {
 		if (ctx->rotation != 90 && ctx->rotation != 270)
 			align_h = 1;
 		max_sc_h = min(SCALER_MAX_HRATIO, 1 << (ffs(sink->width) - 3));
@@ -682,7 +682,7 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx,
 		      rotate ? sink->f_height : sink->f_width);
 	max_h = min_t(u32, FIMC_CAMIF_MAX_HEIGHT, sink->f_height);
 
-	if (target == V4L2_SEL_TGT_COMPOSE_ACTIVE) {
+	if (target == V4L2_SEL_TGT_COMPOSE) {
 		min_w = min_t(u32, max_w, sink->f_width / max_sc_h);
 		min_h = min_t(u32, max_h, sink->f_height / max_sc_v);
 		if (rotate) {
@@ -1147,9 +1147,9 @@ static int fimc_cap_g_selection(struct file *file, void *fh,
 		s->r.height = f->o_height;
 		return 0;
 
-	case V4L2_SEL_TGT_COMPOSE_ACTIVE:
+	case V4L2_SEL_TGT_COMPOSE:
 		f = &ctx->d_frame;
-	case V4L2_SEL_TGT_CROP_ACTIVE:
+	case V4L2_SEL_TGT_CROP:
 		s->r.left = f->offs_h;
 		s->r.top = f->offs_v;
 		s->r.width = f->width;
@@ -1185,9 +1185,9 @@ static int fimc_cap_s_selection(struct file *file, void *fh,
 	if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
 		return -EINVAL;
 
-	if (s->target == V4L2_SEL_TGT_COMPOSE_ACTIVE)
+	if (s->target == V4L2_SEL_TGT_COMPOSE)
 		f = &ctx->d_frame;
-	else if (s->target == V4L2_SEL_TGT_CROP_ACTIVE)
+	else if (s->target == V4L2_SEL_TGT_CROP)
 		f = &ctx->s_frame;
 	else
 		return -EINVAL;
@@ -1483,7 +1483,7 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
 		return -EINVAL;
 
 	mutex_lock(&fimc->lock);
-	fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP_ACTIVE);
+	fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP);
 
 	switch (sel->target) {
 	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
diff --git a/drivers/media/video/s5p-fimc/fimc-lite.c b/drivers/media/video/s5p-fimc/fimc-lite.c
index 400d701a..52ede56 100644
--- a/drivers/media/video/s5p-fimc/fimc-lite.c
+++ b/drivers/media/video/s5p-fimc/fimc-lite.c
@@ -871,7 +871,7 @@ static int fimc_lite_g_selection(struct file *file, void *fh,
 		sel->r.height = f->f_height;
 		return 0;
 
-	case V4L2_SEL_TGT_COMPOSE_ACTIVE:
+	case V4L2_SEL_TGT_COMPOSE:
 		sel->r = f->rect;
 		return 0;
 	}
@@ -888,7 +888,7 @@ static int fimc_lite_s_selection(struct file *file, void *fh,
 	unsigned long flags;
 
 	if (sel->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE ||
-	    sel->target != V4L2_SEL_TGT_COMPOSE_ACTIVE)
+	    sel->target != V4L2_SEL_TGT_COMPOSE)
 		return -EINVAL;
 
 	fimc_lite_try_compose(fimc, &rect);
diff --git a/drivers/media/video/s5p-jpeg/jpeg-core.c b/drivers/media/video/s5p-jpeg/jpeg-core.c
index 28b5225d..fbb8e3d 100644
--- a/drivers/media/video/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/video/s5p-jpeg/jpeg-core.c
@@ -824,10 +824,10 @@ static int s5p_jpeg_g_selection(struct file *file, void *priv,
 
 	/* For JPEG blob active == default == bounds */
 	switch (s->target) {
-	case V4L2_SEL_TGT_CROP_ACTIVE:
+	case V4L2_SEL_TGT_CROP:
 	case V4L2_SEL_TGT_CROP_BOUNDS:
 	case V4L2_SEL_TGT_CROP_DEFAULT:
-	case V4L2_SEL_TGT_COMPOSE_ACTIVE:
+	case V4L2_SEL_TGT_COMPOSE:
 	case V4L2_SEL_TGT_COMPOSE_DEFAULT:
 		s->r.width = ctx->out_q.w;
 		s->r.height = ctx->out_q.h;
diff --git a/drivers/media/video/s5p-tv/mixer_video.c b/drivers/media/video/s5p-tv/mixer_video.c
index 33fde2a..6c74b05 100644
--- a/drivers/media/video/s5p-tv/mixer_video.c
+++ b/drivers/media/video/s5p-tv/mixer_video.c
@@ -367,7 +367,7 @@ static int mxr_g_selection(struct file *file, void *fh,
 		return -EINVAL;
 
 	switch (s->target) {
-	case V4L2_SEL_TGT_CROP_ACTIVE:
+	case V4L2_SEL_TGT_CROP:
 		s->r.left = geo->src.x_offset;
 		s->r.top = geo->src.y_offset;
 		s->r.width = geo->src.width;
@@ -380,7 +380,7 @@ static int mxr_g_selection(struct file *file, void *fh,
 		s->r.width = geo->src.full_width;
 		s->r.height = geo->src.full_height;
 		break;
-	case V4L2_SEL_TGT_COMPOSE_ACTIVE:
+	case V4L2_SEL_TGT_COMPOSE:
 	case V4L2_SEL_TGT_COMPOSE_PADDED:
 		s->r.left = geo->dst.x_offset;
 		s->r.top = geo->dst.y_offset;
@@ -449,11 +449,11 @@ static int mxr_s_selection(struct file *file, void *fh,
 		res.height = geo->dst.full_height;
 		break;
 
-	case V4L2_SEL_TGT_CROP_ACTIVE:
+	case V4L2_SEL_TGT_CROP:
 		target = &geo->src;
 		stage = MXR_GEOMETRY_CROP;
 		break;
-	case V4L2_SEL_TGT_COMPOSE_ACTIVE:
+	case V4L2_SEL_TGT_COMPOSE:
 	case V4L2_SEL_TGT_COMPOSE_PADDED:
 		target = &geo->dst;
 		stage = MXR_GEOMETRY_COMPOSE;
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index d7fa896..ebfe8a7 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -1486,9 +1486,9 @@ static long __video_do_ioctl(struct file *file,
 
 			/* crop means compose for output devices */
 			if (V4L2_TYPE_IS_OUTPUT(p->type))
-				s.target = V4L2_SEL_TGT_COMPOSE_ACTIVE;
+				s.target = V4L2_SEL_TGT_COMPOSE;
 			else
-				s.target = V4L2_SEL_TGT_CROP_ACTIVE;
+				s.target = V4L2_SEL_TGT_CROP;
 
 			ret = ops->vidioc_g_selection(file, fh, &s);
 
@@ -1519,9 +1519,9 @@ static long __video_do_ioctl(struct file *file,
 
 			/* crop means compose for output devices */
 			if (V4L2_TYPE_IS_OUTPUT(p->type))
-				s.target = V4L2_SEL_TGT_COMPOSE_ACTIVE;
+				s.target = V4L2_SEL_TGT_COMPOSE;
 			else
-				s.target = V4L2_SEL_TGT_CROP_ACTIVE;
+				s.target = V4L2_SEL_TGT_CROP;
 
 			ret = ops->vidioc_s_selection(file, fh, &s);
 		}
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index f79d0cc..0425c12 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -768,13 +768,13 @@ struct v4l2_crop {
 /* Selection targets */
 
 /* Current cropping area */
-#define V4L2_SEL_TGT_CROP_ACTIVE	0x0000
+#define V4L2_SEL_TGT_CROP		0x0000
 /* Default cropping area */
 #define V4L2_SEL_TGT_CROP_DEFAULT	0x0001
 /* Cropping bounds */
 #define V4L2_SEL_TGT_CROP_BOUNDS	0x0002
 /* Current composing area */
-#define V4L2_SEL_TGT_COMPOSE_ACTIVE	0x0100
+#define V4L2_SEL_TGT_COMPOSE		0x0100
 /* Default composing area */
 #define V4L2_SEL_TGT_COMPOSE_DEFAULT	0x0101
 /* Composing bounds */
@@ -782,6 +782,10 @@ struct v4l2_crop {
 /* Current composing area plus all padding pixels */
 #define V4L2_SEL_TGT_COMPOSE_PADDED	0x0103
 
+/* Backward compatibility definitions */
+#define V4L2_SEL_TGT_CROP_ACTIVE	V4L2_SEL_TGT_CROP
+#define V4L2_SEL_TGT_COMPOSE_ACTIVE	V4L2_SEL_TGT_COMPOSE
+
 /**
  * struct v4l2_selection - selection info
  * @type:	buffer type (do not use *_MPLANE types)
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/8] v4l: Remove "_ACTUAL" from subdev selection API target definition names
  2012-06-30 17:05 [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes Sakari Ailus
  2012-06-30 17:03 ` [PATCH 1/8] V4L: Remove "_ACTIVE" from the selection target name definitions Sakari Ailus
@ 2012-06-30 17:03 ` Sakari Ailus
  2012-06-30 20:21   ` Sylwester Nawrocki
  2012-06-30 17:03 ` [PATCH 3/8] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces Sakari Ailus
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Sakari Ailus @ 2012-06-30 17:03 UTC (permalink / raw)
  To: linux-media; +Cc: sylwester.nawrocki, t.stanislaws, laurent.pinchart, hverkuil

The string "_ACTUAL" does not say anything more about the target names. Drop
it. V4L2 selection API was changed by "V4L: Remove "_ACTIVE" from the
selection target name definitions" by Sylwester Nawrocki. This patch does
the same for the V4L2 subdev API.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 Documentation/DocBook/media/v4l/dev-subdev.xml     |   28 ++++++++++----------
 .../media/v4l/vidioc-subdev-g-selection.xml        |   12 ++++----
 drivers/media/video/omap3isp/ispccdc.c             |    4 +-
 drivers/media/video/omap3isp/isppreview.c          |    4 +-
 drivers/media/video/omap3isp/ispresizer.c          |    4 +-
 drivers/media/video/smiapp/smiapp-core.c           |   22 ++++++++--------
 drivers/media/video/v4l2-subdev.c                  |    4 +-
 include/linux/v4l2-subdev.h                        |    9 +++++-
 8 files changed, 46 insertions(+), 41 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml
index 4afcbbe..e88d5ea 100644
--- a/Documentation/DocBook/media/v4l/dev-subdev.xml
+++ b/Documentation/DocBook/media/v4l/dev-subdev.xml
@@ -289,9 +289,9 @@
       &v4l2-rect; by the coordinates of the top left corner and the rectangle
       size. Both the coordinates and sizes are expressed in pixels.</para>
 
-      <para>As for pad formats, drivers store try and active
-      rectangles for the selection targets of ACTUAL type <xref
-      linkend="v4l2-subdev-selection-targets">.</xref></para>
+      <para>As for pad formats, drivers store try and active rectangles for
+      the selection targets <xref
+      linkend="v4l2-subdev-selection-targets" />.</para>
 
       <para>On sink pads, cropping is applied relative to the
       current pad format. The pad format represents the image size as
@@ -308,7 +308,7 @@
       <para>Scaling support is optional. When supported by a subdev,
       the crop rectangle on the subdev's sink pad is scaled to the
       size configured using the &VIDIOC-SUBDEV-S-SELECTION; IOCTL
-      using <constant>V4L2_SUBDEV_SEL_COMPOSE_ACTUAL</constant>
+      using <constant>V4L2_SUBDEV_SEL_TGT_COMPOSE</constant>
       selection target on the same pad. If the subdev supports scaling
       but not composing, the top and left values are not used and must
       always be set to zero.</para>
@@ -333,22 +333,22 @@
       <title>Types of selection targets</title>
 
       <section>
-	<title>ACTUAL targets</title>
+	<title>Actual targets</title>
 
-	<para>ACTUAL targets reflect the actual hardware configuration
-	at any point of time. There is a BOUNDS target
-	corresponding to every ACTUAL.</para>
+	<para>Actual targets (without a postfix) reflect the actual
+	hardware configuration at any point of time. There is a BOUNDS
+	target corresponding to every actual target.</para>
       </section>
 
       <section>
 	<title>BOUNDS targets</title>
 
-	<para>BOUNDS targets is the smallest rectangle that contains
-	all valid ACTUAL rectangles. It may not be possible to set the
-	ACTUAL rectangle as large as the BOUNDS rectangle, however.
-	This may be because e.g. a sensor's pixel array is not
-	rectangular but cross-shaped or round. The maximum size may
-	also be smaller than the BOUNDS rectangle.</para>
+	<para>BOUNDS targets is the smallest rectangle that contains all
+	valid actual rectangles. It may not be possible to set the actual
+	rectangle as large as the BOUNDS rectangle, however. This may be
+	because e.g. a sensor's pixel array is not rectangular but
+	cross-shaped or round. The maximum size may also be smaller than the
+	BOUNDS rectangle.</para>
       </section>
 
     </section>
diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
index 208e9f0..4c44808 100644
--- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
@@ -72,10 +72,10 @@
     <section>
       <title>Types of selection targets</title>
 
-      <para>There are two types of selection targets: actual and bounds.
-      The ACTUAL targets are the targets which configure the hardware.
-      The BOUNDS target will return a rectangle that contain all
-      possible ACTUAL rectangles.</para>
+      <para>There are two types of selection targets: actual and bounds. The
+      actual targets are the targets which configure the hardware. The BOUNDS
+      target will return a rectangle that contain all possible actual
+      rectangles.</para>
     </section>
 
     <section>
@@ -93,7 +93,7 @@
         &cs-def;
 	<tbody valign="top">
 	  <row>
-	    <entry><constant>V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL</constant></entry>
+	    <entry><constant>V4L2_SUBDEV_SEL_TGT_CROP</constant></entry>
 	    <entry>0x0000</entry>
 	    <entry>Actual crop. Defines the cropping
 	    performed by the processing step.</entry>
@@ -104,7 +104,7 @@
 	    <entry>Bounds of the crop rectangle.</entry>
 	  </row>
 	  <row>
-	    <entry><constant>V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL</constant></entry>
+	    <entry><constant>V4L2_SUBDEV_SEL_TGT_COMPOSE</constant></entry>
 	    <entry>0x0100</entry>
 	    <entry>Actual compose rectangle. Used to configure scaling
 	    on sink pads and composition on source pads.</entry>
diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c
index 7e32331..f19774f 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -2024,7 +2024,7 @@ static int ccdc_get_selection(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
 		ccdc_try_crop(ccdc, format, &sel->r);
 		break;
 
-	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_CROP:
 		sel->r = *__ccdc_get_crop(ccdc, fh, sel->which);
 		break;
 
@@ -2052,7 +2052,7 @@ static int ccdc_set_selection(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
 	struct v4l2_mbus_framefmt *format;
 
-	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL ||
+	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP ||
 	    sel->pad != CCDC_PAD_SOURCE_OF)
 		return -EINVAL;
 
diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/video/omap3isp/isppreview.c
index 8a4935e..1086f6a 100644
--- a/drivers/media/video/omap3isp/isppreview.c
+++ b/drivers/media/video/omap3isp/isppreview.c
@@ -1960,7 +1960,7 @@ static int preview_get_selection(struct v4l2_subdev *sd,
 		preview_try_crop(prev, format, &sel->r);
 		break;
 
-	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_CROP:
 		sel->r = *__preview_get_crop(prev, fh, sel->which);
 		break;
 
@@ -1988,7 +1988,7 @@ static int preview_set_selection(struct v4l2_subdev *sd,
 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
 	struct v4l2_mbus_framefmt *format;
 
-	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL ||
+	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP ||
 	    sel->pad != PREV_PAD_SINK)
 		return -EINVAL;
 
diff --git a/drivers/media/video/omap3isp/ispresizer.c b/drivers/media/video/omap3isp/ispresizer.c
index 14041c9..9456652 100644
--- a/drivers/media/video/omap3isp/ispresizer.c
+++ b/drivers/media/video/omap3isp/ispresizer.c
@@ -1259,7 +1259,7 @@ static int resizer_get_selection(struct v4l2_subdev *sd,
 		resizer_calc_ratios(res, &sel->r, format_source, &ratio);
 		break;
 
-	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_CROP:
 		sel->r = *__resizer_get_crop(res, fh, sel->which);
 		resizer_calc_ratios(res, &sel->r, format_source, &ratio);
 		break;
@@ -1293,7 +1293,7 @@ static int resizer_set_selection(struct v4l2_subdev *sd,
 	struct v4l2_mbus_framefmt *format_sink, *format_source;
 	struct resizer_ratio ratio;
 
-	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL ||
+	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP ||
 	    sel->pad != RESZ_PAD_SINK)
 		return -EINVAL;
 
diff --git a/drivers/media/video/smiapp/smiapp-core.c b/drivers/media/video/smiapp/smiapp-core.c
index e8c93c8..37622bb6 100644
--- a/drivers/media/video/smiapp/smiapp-core.c
+++ b/drivers/media/video/smiapp/smiapp-core.c
@@ -1630,7 +1630,7 @@ static void smiapp_propagate(struct v4l2_subdev *subdev,
 	smiapp_get_crop_compose(subdev, fh, crops, &comp, which);
 
 	switch (target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_CROP:
 		comp->width = crops[SMIAPP_PAD_SINK]->width;
 		comp->height = crops[SMIAPP_PAD_SINK]->height;
 		if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
@@ -1646,7 +1646,7 @@ static void smiapp_propagate(struct v4l2_subdev *subdev,
 			}
 		}
 		/* Fall through */
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
 		*crops[SMIAPP_PAD_SRC] = *comp;
 		break;
 	default:
@@ -1722,7 +1722,7 @@ static int smiapp_set_format(struct v4l2_subdev *subdev,
 	if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE)
 		ssd->sink_fmt = *crops[ssd->sink_pad];
 	smiapp_propagate(subdev, fh, fmt->which,
-			 V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL);
+			 V4L2_SUBDEV_SEL_TGT_CROP);
 
 	mutex_unlock(&sensor->mutex);
 
@@ -1957,7 +1957,7 @@ static int smiapp_set_compose(struct v4l2_subdev *subdev,
 
 	*comp = sel->r;
 	smiapp_propagate(subdev, fh, sel->which,
-			 V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL);
+			 V4L2_SUBDEV_SEL_TGT_COMPOSE);
 
 	if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE)
 		return smiapp_update_mode(sensor);
@@ -1973,7 +1973,7 @@ static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
 
 	/* We only implement crop in three places. */
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_CROP:
 	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
 		if (ssd == sensor->pixel_array
 		    && sel->pad == SMIAPP_PA_PAD_SRC)
@@ -1987,7 +1987,7 @@ static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
 		    == SMIAPP_DIGITAL_CROP_CAPABILITY_INPUT_CROP)
 			return 0;
 		return -EINVAL;
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
 	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
 		if (sel->pad == ssd->source_pad)
 			return -EINVAL;
@@ -2050,7 +2050,7 @@ static int smiapp_set_crop(struct v4l2_subdev *subdev,
 
 	if (ssd != sensor->pixel_array && sel->pad == SMIAPP_PAD_SINK)
 		smiapp_propagate(subdev, fh, sel->which,
-				 V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL);
+				 V4L2_SUBDEV_SEL_TGT_CROP);
 
 	return 0;
 }
@@ -2096,11 +2096,11 @@ static int __smiapp_get_selection(struct v4l2_subdev *subdev,
 			sel->r = *comp;
 		}
 		break;
-	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_CROP:
 	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
 		sel->r = *crops[sel->pad];
 		break;
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
 		sel->r = *comp;
 		break;
 	}
@@ -2147,10 +2147,10 @@ static int smiapp_set_selection(struct v4l2_subdev *subdev,
 			      sel->r.height);
 
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_CROP:
 		ret = smiapp_set_crop(subdev, fh, sel);
 		break;
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL:
+	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
 		ret = smiapp_set_compose(subdev, fh, sel);
 		break;
 	default:
diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
index db6e859..cd86f0c 100644
--- a/drivers/media/video/v4l2-subdev.c
+++ b/drivers/media/video/v4l2-subdev.c
@@ -245,7 +245,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 		memset(&sel, 0, sizeof(sel));
 		sel.which = crop->which;
 		sel.pad = crop->pad;
-		sel.target = V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL;
+		sel.target = V4L2_SUBDEV_SEL_TGT_CROP;
 
 		rval = v4l2_subdev_call(
 			sd, pad, get_selection, subdev_fh, &sel);
@@ -274,7 +274,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 		memset(&sel, 0, sizeof(sel));
 		sel.which = crop->which;
 		sel.pad = crop->pad;
-		sel.target = V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL;
+		sel.target = V4L2_SUBDEV_SEL_TGT_CROP;
 		sel.r = crop->rect;
 
 		rval = v4l2_subdev_call(
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h
index 812019e..3cbe688 100644
--- a/include/linux/v4l2-subdev.h
+++ b/include/linux/v4l2-subdev.h
@@ -128,14 +128,19 @@ struct v4l2_subdev_frame_interval_enum {
 #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG		(1 << 2)
 
 /* active cropping area */
-#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL			0x0000
+#define V4L2_SUBDEV_SEL_TGT_CROP			0x0000
 /* cropping bounds */
 #define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS			0x0002
 /* current composing area */
-#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL		0x0100
+#define V4L2_SUBDEV_SEL_TGT_COMPOSE			0x0100
 /* composing bounds */
 #define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS		0x0102
 
+/* backward compatibility definitions */
+#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL \
+	V4L2_SUBDEV_SEL_TGT_CROP
+#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL \
+	V4L2_SUBDEV_SEL_TGT_COMPOSE
 
 /**
  * struct v4l2_subdev_selection - selection info
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/8] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
  2012-06-30 17:05 [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes Sakari Ailus
  2012-06-30 17:03 ` [PATCH 1/8] V4L: Remove "_ACTIVE" from the selection target name definitions Sakari Ailus
  2012-06-30 17:03 ` [PATCH 2/8] v4l: Remove "_ACTUAL" from subdev selection API target definition names Sakari Ailus
@ 2012-06-30 17:03 ` Sakari Ailus
  2012-06-30 20:22   ` Sylwester Nawrocki
  2012-06-30 17:03 ` [PATCH 4/8] v4l: Common documentation for selection targets Sakari Ailus
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Sakari Ailus @ 2012-06-30 17:03 UTC (permalink / raw)
  To: linux-media; +Cc: sylwester.nawrocki, t.stanislaws, laurent.pinchart, hverkuil

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 drivers/media/video/omap3isp/ispccdc.c      |    6 +-
 drivers/media/video/omap3isp/isppreview.c   |    6 +-
 drivers/media/video/omap3isp/ispresizer.c   |    6 +-
 drivers/media/video/s5p-fimc/fimc-capture.c |   18 ++++----
 drivers/media/video/s5p-fimc/fimc-lite.c    |   11 ++---
 drivers/media/video/smiapp/smiapp-core.c    |   30 +++++++-------
 drivers/media/video/v4l2-subdev.c           |    4 +-
 include/linux/v4l2-common.h                 |   57 +++++++++++++++++++++++++++
 include/linux/v4l2-subdev.h                 |   19 +-------
 include/linux/videodev2.h                   |   25 +----------
 10 files changed, 103 insertions(+), 79 deletions(-)
 create mode 100644 include/linux/v4l2-common.h

diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c
index f19774f..82df7a0 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -2014,7 +2014,7 @@ static int ccdc_get_selection(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
 		return -EINVAL;
 
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
+	case V4L2_SEL_TGT_CROP_BOUNDS:
 		sel->r.left = 0;
 		sel->r.top = 0;
 		sel->r.width = INT_MAX;
@@ -2024,7 +2024,7 @@ static int ccdc_get_selection(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
 		ccdc_try_crop(ccdc, format, &sel->r);
 		break;
 
-	case V4L2_SUBDEV_SEL_TGT_CROP:
+	case V4L2_SEL_TGT_CROP:
 		sel->r = *__ccdc_get_crop(ccdc, fh, sel->which);
 		break;
 
@@ -2052,7 +2052,7 @@ static int ccdc_set_selection(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
 	struct v4l2_mbus_framefmt *format;
 
-	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP ||
+	if (sel->target != V4L2_SEL_TGT_CROP ||
 	    sel->pad != CCDC_PAD_SOURCE_OF)
 		return -EINVAL;
 
diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/video/omap3isp/isppreview.c
index 1086f6a..6fa70f4 100644
--- a/drivers/media/video/omap3isp/isppreview.c
+++ b/drivers/media/video/omap3isp/isppreview.c
@@ -1949,7 +1949,7 @@ static int preview_get_selection(struct v4l2_subdev *sd,
 		return -EINVAL;
 
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
+	case V4L2_SEL_TGT_CROP_BOUNDS:
 		sel->r.left = 0;
 		sel->r.top = 0;
 		sel->r.width = INT_MAX;
@@ -1960,7 +1960,7 @@ static int preview_get_selection(struct v4l2_subdev *sd,
 		preview_try_crop(prev, format, &sel->r);
 		break;
 
-	case V4L2_SUBDEV_SEL_TGT_CROP:
+	case V4L2_SEL_TGT_CROP:
 		sel->r = *__preview_get_crop(prev, fh, sel->which);
 		break;
 
@@ -1988,7 +1988,7 @@ static int preview_set_selection(struct v4l2_subdev *sd,
 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
 	struct v4l2_mbus_framefmt *format;
 
-	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP ||
+	if (sel->target != V4L2_SEL_TGT_CROP ||
 	    sel->pad != PREV_PAD_SINK)
 		return -EINVAL;
 
diff --git a/drivers/media/video/omap3isp/ispresizer.c b/drivers/media/video/omap3isp/ispresizer.c
index 9456652..ae17d91 100644
--- a/drivers/media/video/omap3isp/ispresizer.c
+++ b/drivers/media/video/omap3isp/ispresizer.c
@@ -1249,7 +1249,7 @@ static int resizer_get_selection(struct v4l2_subdev *sd,
 					     sel->which);
 
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
+	case V4L2_SEL_TGT_CROP_BOUNDS:
 		sel->r.left = 0;
 		sel->r.top = 0;
 		sel->r.width = INT_MAX;
@@ -1259,7 +1259,7 @@ static int resizer_get_selection(struct v4l2_subdev *sd,
 		resizer_calc_ratios(res, &sel->r, format_source, &ratio);
 		break;
 
-	case V4L2_SUBDEV_SEL_TGT_CROP:
+	case V4L2_SEL_TGT_CROP:
 		sel->r = *__resizer_get_crop(res, fh, sel->which);
 		resizer_calc_ratios(res, &sel->r, format_source, &ratio);
 		break;
@@ -1293,7 +1293,7 @@ static int resizer_set_selection(struct v4l2_subdev *sd,
 	struct v4l2_mbus_framefmt *format_sink, *format_source;
 	struct resizer_ratio ratio;
 
-	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP ||
+	if (sel->target != V4L2_SEL_TGT_CROP ||
 	    sel->pad != RESZ_PAD_SINK)
 		return -EINVAL;
 
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
index a3cd78d..521e371 100644
--- a/drivers/media/video/s5p-fimc/fimc-capture.c
+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
@@ -1429,9 +1429,9 @@ static int fimc_subdev_get_selection(struct v4l2_subdev *sd,
 	mutex_lock(&fimc->lock);
 
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
+	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
 		f = &ctx->d_frame;
-	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
+	case V4L2_SEL_TGT_CROP_BOUNDS:
 		r->width = f->o_width;
 		r->height = f->o_height;
 		r->left = 0;
@@ -1439,10 +1439,10 @@ static int fimc_subdev_get_selection(struct v4l2_subdev *sd,
 		mutex_unlock(&fimc->lock);
 		return 0;
 
-	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
+	case V4L2_SEL_TGT_CROP:
 		try_sel = v4l2_subdev_get_try_crop(fh, sel->pad);
 		break;
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL:
+	case V4L2_SEL_TGT_COMPOSE:
 		try_sel = v4l2_subdev_get_try_compose(fh, sel->pad);
 		f = &ctx->d_frame;
 		break;
@@ -1486,9 +1486,9 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
 	fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP);
 
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
+	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
 		f = &ctx->d_frame;
-	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
+	case V4L2_SEL_TGT_CROP_BOUNDS:
 		r->width = f->o_width;
 		r->height = f->o_height;
 		r->left = 0;
@@ -1496,10 +1496,10 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
 		mutex_unlock(&fimc->lock);
 		return 0;
 
-	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
+	case V4L2_SEL_TGT_CROP:
 		try_sel = v4l2_subdev_get_try_crop(fh, sel->pad);
 		break;
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL:
+	case V4L2_SEL_TGT_COMPOSE:
 		try_sel = v4l2_subdev_get_try_compose(fh, sel->pad);
 		f = &ctx->d_frame;
 		break;
@@ -1515,7 +1515,7 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
 		set_frame_crop(f, r->left, r->top, r->width, r->height);
 		set_bit(ST_CAPT_APPLY_CFG, &fimc->state);
 		spin_unlock_irqrestore(&fimc->slock, flags);
-		if (sel->target == V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL)
+		if (sel->target == V4L2_SEL_TGT_COMPOSE)
 			ctx->state |= FIMC_COMPOSE;
 	}
 
diff --git a/drivers/media/video/s5p-fimc/fimc-lite.c b/drivers/media/video/s5p-fimc/fimc-lite.c
index 52ede56..8785089 100644
--- a/drivers/media/video/s5p-fimc/fimc-lite.c
+++ b/drivers/media/video/s5p-fimc/fimc-lite.c
@@ -1086,9 +1086,9 @@ static int fimc_lite_subdev_get_selection(struct v4l2_subdev *sd,
 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
 	struct flite_frame *f = &fimc->inp_frame;
 
-	if ((sel->target != V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL &&
-	     sel->target != V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS) ||
-	    sel->pad != FLITE_SD_PAD_SINK)
+	if ((sel->target != V4L2_SEL_TGT_CROP &&
+	     sel->target != V4L2_SEL_TGT_CROP_BOUNDS) ||
+	     sel->pad != FLITE_SD_PAD_SINK)
 		return -EINVAL;
 
 	if (sel->which == V4L2_SUBDEV_FORMAT_TRY) {
@@ -1097,7 +1097,7 @@ static int fimc_lite_subdev_get_selection(struct v4l2_subdev *sd,
 	}
 
 	mutex_lock(&fimc->lock);
-	if (sel->target == V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL) {
+	if (sel->target == V4L2_SEL_TGT_CROP) {
 		sel->r = f->rect;
 	} else {
 		sel->r.left = 0;
@@ -1122,8 +1122,7 @@ static int fimc_lite_subdev_set_selection(struct v4l2_subdev *sd,
 	struct flite_frame *f = &fimc->inp_frame;
 	int ret = 0;
 
-	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL ||
-	    sel->pad != FLITE_SD_PAD_SINK)
+	if (sel->target != V4L2_SEL_TGT_CROP || sel->pad != FLITE_SD_PAD_SINK)
 		return -EINVAL;
 
 	mutex_lock(&fimc->lock);
diff --git a/drivers/media/video/smiapp/smiapp-core.c b/drivers/media/video/smiapp/smiapp-core.c
index 37622bb6..9bbb5d3 100644
--- a/drivers/media/video/smiapp/smiapp-core.c
+++ b/drivers/media/video/smiapp/smiapp-core.c
@@ -1630,7 +1630,7 @@ static void smiapp_propagate(struct v4l2_subdev *subdev,
 	smiapp_get_crop_compose(subdev, fh, crops, &comp, which);
 
 	switch (target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP:
+	case V4L2_SEL_TGT_CROP:
 		comp->width = crops[SMIAPP_PAD_SINK]->width;
 		comp->height = crops[SMIAPP_PAD_SINK]->height;
 		if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
@@ -1646,7 +1646,7 @@ static void smiapp_propagate(struct v4l2_subdev *subdev,
 			}
 		}
 		/* Fall through */
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
+	case V4L2_SEL_TGT_COMPOSE:
 		*crops[SMIAPP_PAD_SRC] = *comp;
 		break;
 	default:
@@ -1722,7 +1722,7 @@ static int smiapp_set_format(struct v4l2_subdev *subdev,
 	if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE)
 		ssd->sink_fmt = *crops[ssd->sink_pad];
 	smiapp_propagate(subdev, fh, fmt->which,
-			 V4L2_SUBDEV_SEL_TGT_CROP);
+			 V4L2_SEL_TGT_CROP);
 
 	mutex_unlock(&sensor->mutex);
 
@@ -1957,7 +1957,7 @@ static int smiapp_set_compose(struct v4l2_subdev *subdev,
 
 	*comp = sel->r;
 	smiapp_propagate(subdev, fh, sel->which,
-			 V4L2_SUBDEV_SEL_TGT_COMPOSE);
+			 V4L2_SEL_TGT_COMPOSE);
 
 	if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE)
 		return smiapp_update_mode(sensor);
@@ -1973,8 +1973,8 @@ static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
 
 	/* We only implement crop in three places. */
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP:
-	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
+	case V4L2_SEL_TGT_CROP:
+	case V4L2_SEL_TGT_CROP_BOUNDS:
 		if (ssd == sensor->pixel_array
 		    && sel->pad == SMIAPP_PA_PAD_SRC)
 			return 0;
@@ -1987,8 +1987,8 @@ static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
 		    == SMIAPP_DIGITAL_CROP_CAPABILITY_INPUT_CROP)
 			return 0;
 		return -EINVAL;
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
+	case V4L2_SEL_TGT_COMPOSE:
+	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
 		if (sel->pad == ssd->source_pad)
 			return -EINVAL;
 		if (ssd == sensor->binner)
@@ -2050,7 +2050,7 @@ static int smiapp_set_crop(struct v4l2_subdev *subdev,
 
 	if (ssd != sensor->pixel_array && sel->pad == SMIAPP_PAD_SINK)
 		smiapp_propagate(subdev, fh, sel->which,
-				 V4L2_SUBDEV_SEL_TGT_CROP);
+				 V4L2_SEL_TGT_CROP);
 
 	return 0;
 }
@@ -2084,7 +2084,7 @@ static int __smiapp_get_selection(struct v4l2_subdev *subdev,
 	}
 
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
+	case V4L2_SEL_TGT_CROP_BOUNDS:
 		if (ssd == sensor->pixel_array) {
 			sel->r.width =
 				sensor->limits[SMIAPP_LIMIT_X_ADDR_MAX] + 1;
@@ -2096,11 +2096,11 @@ static int __smiapp_get_selection(struct v4l2_subdev *subdev,
 			sel->r = *comp;
 		}
 		break;
-	case V4L2_SUBDEV_SEL_TGT_CROP:
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
+	case V4L2_SEL_TGT_CROP:
+	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
 		sel->r = *crops[sel->pad];
 		break;
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
+	case V4L2_SEL_TGT_COMPOSE:
 		sel->r = *comp;
 		break;
 	}
@@ -2147,10 +2147,10 @@ static int smiapp_set_selection(struct v4l2_subdev *subdev,
 			      sel->r.height);
 
 	switch (sel->target) {
-	case V4L2_SUBDEV_SEL_TGT_CROP:
+	case V4L2_SEL_TGT_CROP:
 		ret = smiapp_set_crop(subdev, fh, sel);
 		break;
-	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
+	case V4L2_SEL_TGT_COMPOSE:
 		ret = smiapp_set_compose(subdev, fh, sel);
 		break;
 	default:
diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
index cd86f0c..9182f81 100644
--- a/drivers/media/video/v4l2-subdev.c
+++ b/drivers/media/video/v4l2-subdev.c
@@ -245,7 +245,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 		memset(&sel, 0, sizeof(sel));
 		sel.which = crop->which;
 		sel.pad = crop->pad;
-		sel.target = V4L2_SUBDEV_SEL_TGT_CROP;
+		sel.target = V4L2_SEL_TGT_CROP;
 
 		rval = v4l2_subdev_call(
 			sd, pad, get_selection, subdev_fh, &sel);
@@ -274,7 +274,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 		memset(&sel, 0, sizeof(sel));
 		sel.which = crop->which;
 		sel.pad = crop->pad;
-		sel.target = V4L2_SUBDEV_SEL_TGT_CROP;
+		sel.target = V4L2_SEL_TGT_CROP;
 		sel.r = crop->rect;
 
 		rval = v4l2_subdev_call(
diff --git a/include/linux/v4l2-common.h b/include/linux/v4l2-common.h
new file mode 100644
index 0000000..b49a37a
--- /dev/null
+++ b/include/linux/v4l2-common.h
@@ -0,0 +1,57 @@
+/*
+ * include/linux/v4l2-common.h
+ *
+ * Common V4L2 and V4L2 subdev definitions.
+ *
+ * Users are advised to #include this file either through videodev2.h
+ * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer
+ * to this file directly.
+ *
+ * Copyright (C) 2012 Nokia Corporation
+ * Contact: Sakari Ailus <sakari.ailus@iki.fi>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __V4L2_COMMON__
+#define __V4L2_COMMON__
+
+/* Selection target definitions */
+
+/* Current cropping area */
+#define V4L2_SEL_TGT_CROP		0x0000
+/* Default cropping area */
+#define V4L2_SEL_TGT_CROP_DEFAULT	0x0001
+/* Cropping bounds */
+#define V4L2_SEL_TGT_CROP_BOUNDS	0x0002
+/* Current composing area */
+#define V4L2_SEL_TGT_COMPOSE		0x0100
+/* Default composing area */
+#define V4L2_SEL_TGT_COMPOSE_DEFAULT	0x0101
+/* Composing bounds */
+#define V4L2_SEL_TGT_COMPOSE_BOUNDS	0x0102
+/* Current composing area plus all padding pixels */
+#define V4L2_SEL_TGT_COMPOSE_PADDED	0x0103
+
+/* Backward compatibility definitions */
+#define V4L2_SEL_TGT_CROP_ACTIVE	V4L2_SEL_TGT_CROP
+#define V4L2_SEL_TGT_COMPOSE_ACTIVE	V4L2_SEL_TGT_COMPOSE
+#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL \
+	V4L2_SUBDEV_SEL_TGT_CROP
+#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL \
+	V4L2_SUBDEV_SEL_TGT_COMPOSE
+
+#endif /* __V4L2_COMMON__  */
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h
index 3cbe688..1d7d457 100644
--- a/include/linux/v4l2-subdev.h
+++ b/include/linux/v4l2-subdev.h
@@ -25,6 +25,7 @@
 
 #include <linux/ioctl.h>
 #include <linux/types.h>
+#include <linux/v4l2-common.h>
 #include <linux/v4l2-mediabus.h>
 
 /**
@@ -127,27 +128,13 @@ struct v4l2_subdev_frame_interval_enum {
 #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE			(1 << 1)
 #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG		(1 << 2)
 
-/* active cropping area */
-#define V4L2_SUBDEV_SEL_TGT_CROP			0x0000
-/* cropping bounds */
-#define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS			0x0002
-/* current composing area */
-#define V4L2_SUBDEV_SEL_TGT_COMPOSE			0x0100
-/* composing bounds */
-#define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS		0x0102
-
-/* backward compatibility definitions */
-#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL \
-	V4L2_SUBDEV_SEL_TGT_CROP
-#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL \
-	V4L2_SUBDEV_SEL_TGT_COMPOSE
-
 /**
  * struct v4l2_subdev_selection - selection info
  *
  * @which: either V4L2_SUBDEV_FORMAT_ACTIVE or V4L2_SUBDEV_FORMAT_TRY
  * @pad: pad number, as reported by the media API
- * @target: selection target, used to choose one of possible rectangles
+ * @target: Selection target, used to choose one of possible rectangles,
+ *	    defined in v4l2-common.h; V4L2_SEL_TGT_* .
  * @flags: constraint flags
  * @r: coordinates of the selection window
  * @reserved: for future use, set to zero for now
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 0425c12..ce86855 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -64,6 +64,7 @@
 #include <linux/compiler.h>
 #include <linux/ioctl.h>
 #include <linux/types.h>
+#include <linux/v4l2-common.h>
 
 /*
  * Common stuff for both V4L1 and V4L2
@@ -765,31 +766,11 @@ struct v4l2_crop {
 #define V4L2_SEL_FLAG_GE	0x00000001
 #define V4L2_SEL_FLAG_LE	0x00000002
 
-/* Selection targets */
-
-/* Current cropping area */
-#define V4L2_SEL_TGT_CROP		0x0000
-/* Default cropping area */
-#define V4L2_SEL_TGT_CROP_DEFAULT	0x0001
-/* Cropping bounds */
-#define V4L2_SEL_TGT_CROP_BOUNDS	0x0002
-/* Current composing area */
-#define V4L2_SEL_TGT_COMPOSE		0x0100
-/* Default composing area */
-#define V4L2_SEL_TGT_COMPOSE_DEFAULT	0x0101
-/* Composing bounds */
-#define V4L2_SEL_TGT_COMPOSE_BOUNDS	0x0102
-/* Current composing area plus all padding pixels */
-#define V4L2_SEL_TGT_COMPOSE_PADDED	0x0103
-
-/* Backward compatibility definitions */
-#define V4L2_SEL_TGT_CROP_ACTIVE	V4L2_SEL_TGT_CROP
-#define V4L2_SEL_TGT_COMPOSE_ACTIVE	V4L2_SEL_TGT_COMPOSE
-
 /**
  * struct v4l2_selection - selection info
  * @type:	buffer type (do not use *_MPLANE types)
- * @target:	selection target, used to choose one of possible rectangles
+ * @target:	Selection target, used to choose one of possible rectangles;
+ *		defined in v4l2-common.h; V4L2_SEL_TGT_* .
  * @flags:	constraints flags
  * @r:		coordinates of selection window
  * @reserved:	for future use, rounds structure size to 64 bytes, set to zero
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/8] v4l: Common documentation for selection targets
  2012-06-30 17:05 [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes Sakari Ailus
                   ` (2 preceding siblings ...)
  2012-06-30 17:03 ` [PATCH 3/8] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces Sakari Ailus
@ 2012-06-30 17:03 ` Sakari Ailus
  2012-06-30 21:01   ` Sylwester Nawrocki
  2012-06-30 17:03 ` [PATCH 5/8] v4l: Unify selection flags Sakari Ailus
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Sakari Ailus @ 2012-06-30 17:03 UTC (permalink / raw)
  To: linux-media; +Cc: sylwester.nawrocki, t.stanislaws, laurent.pinchart, hverkuil

Both V4L2 and V4L2 subdev interface have very similar selection APIs with
differences foremost related to in-memory and media bus formats. However,
the selection targets are the same for both. Most targets are and in the
future will likely continue to be more the same than with any differences.
Thus it makes sense to unify the documentation of the targets.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 Documentation/DocBook/media/v4l/compat.xml         |    9 +-
 Documentation/DocBook/media/v4l/dev-subdev.xml     |   12 ++--
 Documentation/DocBook/media/v4l/selection-api.xml  |    6 +-
 .../DocBook/media/v4l/selections-common.xml        |   92 ++++++++++++++++++++
 Documentation/DocBook/media/v4l/v4l2.xml           |    5 +
 .../DocBook/media/v4l/vidioc-g-selection.xml       |   54 +-----------
 .../media/v4l/vidioc-subdev-g-selection.xml        |   34 +-------
 7 files changed, 119 insertions(+), 93 deletions(-)
 create mode 100644 Documentation/DocBook/media/v4l/selections-common.xml

diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml
index ea42ef8..162a0ba 100644
--- a/Documentation/DocBook/media/v4l/compat.xml
+++ b/Documentation/DocBook/media/v4l/compat.xml
@@ -2377,10 +2377,11 @@ that used it. It was originally scheduled for removal in 2.6.35.
 	  <para>V4L2_CTRL_FLAG_VOLATILE was added to signal volatile controls to userspace.</para>
         </listitem>
         <listitem>
-	  <para>Add selection API for extended control over cropping and
-composing. Does not affect the compatibility of current drivers and
-applications.  See <link linkend="selection-api"> selection API </link> for
-details.</para>
+	  <para>Add selection API for extended control over cropping
+	  and composing. Does not affect the compatibility of current
+	  drivers and applications. See <link
+	  linkend="selection-api"> selection API </link> for
+	  details.</para>
         </listitem>
       </orderedlist>
     </section>
diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml
index e88d5ea..afeb196 100644
--- a/Documentation/DocBook/media/v4l/dev-subdev.xml
+++ b/Documentation/DocBook/media/v4l/dev-subdev.xml
@@ -276,7 +276,7 @@
       </para>
     </section>
 
-    <section>
+    <section id="v4l2-subdev-selections">
       <title>Selections: cropping, scaling and composition</title>
 
       <para>Many sub-devices support cropping frames on their input or output
@@ -289,9 +289,9 @@
       &v4l2-rect; by the coordinates of the top left corner and the rectangle
       size. Both the coordinates and sizes are expressed in pixels.</para>
 
-      <para>As for pad formats, drivers store try and active rectangles for
-      the selection targets <xref
-      linkend="v4l2-subdev-selection-targets" />.</para>
+      <para>As for pad formats, drivers store try and active
+      rectangles for the selection targets <xref
+      linkend="v4l2-selections-common" />.</para>
 
       <para>On sink pads, cropping is applied relative to the
       current pad format. The pad format represents the image size as
@@ -308,7 +308,7 @@
       <para>Scaling support is optional. When supported by a subdev,
       the crop rectangle on the subdev's sink pad is scaled to the
       size configured using the &VIDIOC-SUBDEV-S-SELECTION; IOCTL
-      using <constant>V4L2_SUBDEV_SEL_TGT_COMPOSE</constant>
+      using <constant>V4L2_SEL_TGT_COMPOSE</constant>
       selection target on the same pad. If the subdev supports scaling
       but not composing, the top and left values are not used and must
       always be set to zero.</para>
@@ -362,7 +362,7 @@
       performed by the user: the changes made will be propagated to
       any subsequent stages. If this behaviour is not desired, the
       user must set
-      <constant>V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG</constant> flag. This
+      <constant>V4L2_SEL_FLAG_KEEP_CONFIG</constant> flag. This
       flag causes no propagation of the changes are allowed in any
       circumstances. This may also cause the accessed rectangle to be
       adjusted by the driver, depending on the properties of the
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml
index ac013e5..24dec10 100644
--- a/Documentation/DocBook/media/v4l/selection-api.xml
+++ b/Documentation/DocBook/media/v4l/selection-api.xml
@@ -53,11 +53,11 @@ cropping and composing rectangles have the same size.</para>
 	</mediaobject>
       </figure>
 
-For complete list of the available selection targets see table <xref
-linkend="v4l2-sel-target"/>
-
     </section>
 
+    See <xref linkend="v4l2-selection-targets-table" /> for more
+    information.
+
   <section>
 
   <title>Configuration</title>
diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml
new file mode 100644
index 0000000..d0411ab
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/selections-common.xml
@@ -0,0 +1,92 @@
+<section id="v4l2-selections-common">
+
+  <title>Selection targets</title>
+
+  <para>While the <link linkend="selection-api">V4L2 selection
+  API</link> and <link linkend="v4l2-subdev-selections">V4L2 subdev
+  selection APIs</link> are very similar, there's one fundamental
+  difference between the two. On sub-device API, the selection
+  rectangle refers to the media bus format, and is bound to a
+  sub-device's pad. On the V4L2 interface the selection rectangles
+  refer to the in-memory pixel format.</para>
+
+  <para>The precise meaning of the selection targets may thus be
+  affected on which of the two interfaces they are used.</para>
+
+  <table pgwide="1" frame="none" id="v4l2-selection-targets-table">
+  <title>Selection target definitions</title>
+    <tgroup cols="4">
+      <colspec colname="c1" />
+      <colspec colname="c2" />
+      <colspec colname="c3" />
+      <colspec colname="c4" />
+      <colspec colname="c5" />
+      &cs-def;
+      <thead>
+	<row rowsep="1">
+	  <entry align="left">Target name</entry>
+	  <entry align="left">id</entry>
+	  <entry align="left">Definition</entry>
+	  <entry align="left">Valid for V4L2</entry>
+	  <entry align="left">Valid for V4L2 subdev</entry>
+	</row>
+      </thead>
+      <tbody valign="top">
+	<row>
+	  <entry><constant>V4L2_SEL_TGT_CROP</constant></entry>
+	  <entry>0x0000</entry>
+	  <entry>Crop rectangle. Defines the cropped area.</entry>
+	  <entry>Yes</entry>
+	  <entry>Yes</entry>
+	</row>
+	<row>
+          <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry>
+          <entry>0x0001</entry>
+          <entry>Suggested cropping rectangle that covers the "whole picture".</entry>
+	  <entry>Yes</entry>
+	  <entry>No</entry>
+	</row>
+	<row>
+	  <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry>
+	  <entry>0x0002</entry>
+	  <entry>Bounds of the crop rectangle. All valid crop
+	  rectangles fit inside the crop bounds rectangle.
+	  </entry>
+	  <entry>Yes</entry>
+	  <entry>Yes</entry>
+	</row>
+	<row>
+	  <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry>
+	  <entry>0x0100</entry>
+	  <entry>Compose rectangle. Used to configure scaling
+	  and composition.</entry>
+	  <entry>Yes</entry>
+	  <entry>Yes</entry>
+	</row>
+	<row>
+          <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry>
+          <entry>0x0101</entry>
+          <entry>Suggested composition rectangle that covers the "whole picture".</entry>
+	  <entry>Yes</entry>
+	  <entry>No</entry>
+	</row>
+	<row>
+	  <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
+	  <entry>0x0102</entry>
+	  <entry>Bounds of the compose rectangle. All valid compose
+	  rectangles fit inside the compose bounds rectangle.</entry>
+	  <entry>Yes</entry>
+	  <entry>Yes</entry>
+	</row>
+	<row>
+          <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
+          <entry>0x0103</entry>
+          <entry>The active area and all padding pixels that are inserted or
+	    modified by hardware.</entry>
+	  <entry>Yes</entry>
+	  <entry>No</entry>
+	</row>
+      </tbody>
+    </tgroup>
+  </table>
+</section>
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index 008c2d7..36bafc4 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -589,6 +589,11 @@ and discussions on the V4L mailing list.</revremark>
     &sub-write;
   </appendix>
 
+  <appendix>
+    <title>Common definitions for V4L2 and V4L2 subdev interfaces</title>
+      &sub-selections-common;
+  </appendix>
+
   <appendix id="videodev">
     <title>Video For Linux Two Header File</title>
     &sub-videodev2-h;
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
index 6376e57..c6f8325 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
@@ -67,7 +67,7 @@ Do not use multiplanar buffers.  Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
 setting the value of &v4l2-selection; <structfield>target</structfield> field
 to <constant> V4L2_SEL_TGT_CROP </constant> (<constant>
 V4L2_SEL_TGT_COMPOSE </constant>).  Please refer to table <xref
-linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
+linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional
 targets.  The <structfield>flags</structfield> and <structfield>reserved
 </structfield> fields of &v4l2-selection; are ignored and they must be filled
 with zeros.  The driver fills the rest of the structure or
@@ -88,7 +88,7 @@ use multiplanar buffers.  Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
 setting the value of &v4l2-selection; <structfield>target</structfield> to
 <constant>V4L2_SEL_TGT_CROP</constant> (<constant>
 V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref
-linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
+linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional
 targets.  The &v4l2-rect; <structfield>r</structfield> rectangle need to be
 set to the desired active area. Field &v4l2-selection; <structfield> reserved
 </structfield> is ignored and must be filled with zeros.  The driver may adjust
@@ -154,52 +154,8 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
 
   </refsect1>
 
-  <refsect1>
-    <table frame="none" pgwide="1" id="v4l2-sel-target">
-      <title>Selection targets.</title>
-      <tgroup cols="3">
-	&cs-def;
-	<tbody valign="top">
-	  <row>
-            <entry><constant>V4L2_SEL_TGT_CROP</constant></entry>
-            <entry>0x0000</entry>
-            <entry>The area that is currently cropped by hardware.</entry>
-	  </row>
-	  <row>
-            <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry>
-            <entry>0x0001</entry>
-            <entry>Suggested cropping rectangle that covers the "whole picture".</entry>
-	  </row>
-	  <row>
-            <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry>
-            <entry>0x0002</entry>
-            <entry>Limits for the cropping rectangle.</entry>
-	  </row>
-	  <row>
-            <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry>
-            <entry>0x0100</entry>
-            <entry>The area to which data is composed by hardware.</entry>
-	  </row>
-	  <row>
-            <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry>
-            <entry>0x0101</entry>
-            <entry>Suggested composing rectangle that covers the "whole picture".</entry>
-	  </row>
-	  <row>
-            <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
-            <entry>0x0102</entry>
-            <entry>Limits for the composing rectangle.</entry>
-	  </row>
-	  <row>
-            <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
-            <entry>0x0103</entry>
-            <entry>The active area and all padding pixels that are inserted or
-	      modified by hardware.</entry>
-	  </row>
-	</tbody>
-      </tgroup>
-    </table>
-  </refsect1>
+  <para>Selection targets are documented in <xref
+  linkend="v4l2-selections-common"/>.</para>
 
   <refsect1>
     <table frame="none" pgwide="1" id="v4l2-sel-flags">
@@ -253,7 +209,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
 	  <row>
 	    <entry>__u32</entry>
 	    <entry><structfield>target</structfield></entry>
-            <entry>Used to select between <link linkend="v4l2-sel-target"> cropping
+            <entry>Used to select between <link linkend="v4l2-selections-common"> cropping
 	    and composing rectangles</link>.</entry>
 	  </row>
 	  <row>
diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
index 4c44808..ace1478 100644
--- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
@@ -87,36 +87,8 @@
       <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</constant></entry>
-	    <entry>0x0000</entry>
-	    <entry>Actual 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</constant></entry>
-	    <entry>0x0100</entry>
-	    <entry>Actual 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>
+    <para>Selection targets are documented in <xref
+    linkend="v4l2-selections-common"/>.</para>
 
     <table pgwide="1" frame="none" id="v4l2-subdev-selection-flags">
       <title>V4L2 subdev selection flags</title>
@@ -173,7 +145,7 @@
 	    <entry>__u32</entry>
 	    <entry><structfield>target</structfield></entry>
 	    <entry>Target selection rectangle. See
-	    <xref linkend="v4l2-subdev-selection-targets">.</xref>.</entry>
+	    <xref linkend="v4l2-selections-common" />.</entry>
 	  </row>
 	  <row>
 	    <entry>__u32</entry>
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/8] v4l: Unify selection flags
  2012-06-30 17:05 [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes Sakari Ailus
                   ` (3 preceding siblings ...)
  2012-06-30 17:03 ` [PATCH 4/8] v4l: Common documentation for selection targets Sakari Ailus
@ 2012-06-30 17:03 ` Sakari Ailus
  2012-06-30 20:23   ` Sylwester Nawrocki
  2012-06-30 17:03 ` [PATCH 6/8] v4l: Unify selection flags documentation Sakari Ailus
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Sakari Ailus @ 2012-06-30 17:03 UTC (permalink / raw)
  To: linux-media; +Cc: sylwester.nawrocki, t.stanislaws, laurent.pinchart, hverkuil

Unify flags on the selection interfaces on V4L2 and V4L2 subdev. Flags are
very similar to targets in this case: there are more similarities than
differences between the two interfaces.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 drivers/media/video/omap3isp/ispccdc.c    |    2 +-
 drivers/media/video/omap3isp/isppreview.c |    2 +-
 drivers/media/video/smiapp/smiapp-core.c  |   10 +++++-----
 include/linux/v4l2-common.h               |   20 +++++++++++++++++---
 include/linux/v4l2-subdev.h               |    6 +-----
 include/linux/videodev2.h                 |    6 +-----
 6 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c
index 82df7a0..f1220d3 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -2064,7 +2064,7 @@ static int ccdc_set_selection(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
 	 * pad. If the KEEP_CONFIG flag is set, just return the current crop
 	 * rectangle.
 	 */
-	if (sel->flags & V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG) {
+	if (sel->flags & V4L2_SEL_FLAG_KEEP_CONFIG) {
 		sel->r = *__ccdc_get_crop(ccdc, fh, sel->which);
 		return 0;
 	}
diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/video/omap3isp/isppreview.c
index 6fa70f4..99d5cc4 100644
--- a/drivers/media/video/omap3isp/isppreview.c
+++ b/drivers/media/video/omap3isp/isppreview.c
@@ -2000,7 +2000,7 @@ static int preview_set_selection(struct v4l2_subdev *sd,
 	 * pad. If the KEEP_CONFIG flag is set, just return the current crop
 	 * rectangle.
 	 */
-	if (sel->flags & V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG) {
+	if (sel->flags & V4L2_SEL_FLAG_KEEP_CONFIG) {
 		sel->r = *__preview_get_crop(prev, fh, sel->which);
 		return 0;
 	}
diff --git a/drivers/media/video/smiapp/smiapp-core.c b/drivers/media/video/smiapp/smiapp-core.c
index 9bbb5d3..8a5d4f7 100644
--- a/drivers/media/video/smiapp/smiapp-core.c
+++ b/drivers/media/video/smiapp/smiapp-core.c
@@ -38,9 +38,9 @@
 
 #include "smiapp.h"
 
-#define SMIAPP_ALIGN_DIM(dim, flags)		\
-	((flags) & V4L2_SUBDEV_SEL_FLAG_SIZE_GE	\
-	 ? ALIGN((dim), 2)			\
+#define SMIAPP_ALIGN_DIM(dim, flags)	\
+	((flags) & V4L2_SEL_FLAG_GE	\
+	 ? ALIGN((dim), 2)		\
 	 : (dim) & ~1)
 
 /*
@@ -1747,14 +1747,14 @@ static int scaling_goodness(struct v4l2_subdev *subdev, int w, int ask_w,
 	h &= ~1;
 	ask_h &= ~1;
 
-	if (flags & V4L2_SUBDEV_SEL_FLAG_SIZE_GE) {
+	if (flags & V4L2_SEL_FLAG_GE) {
 		if (w < ask_w)
 			val -= SCALING_GOODNESS;
 		if (h < ask_h)
 			val -= SCALING_GOODNESS;
 	}
 
-	if (flags & V4L2_SUBDEV_SEL_FLAG_SIZE_LE) {
+	if (flags & V4L2_SEL_FLAG_LE) {
 		if (w > ask_w)
 			val -= SCALING_GOODNESS;
 		if (h > ask_h)
diff --git a/include/linux/v4l2-common.h b/include/linux/v4l2-common.h
index b49a37a..9be14e3 100644
--- a/include/linux/v4l2-common.h
+++ b/include/linux/v4l2-common.h
@@ -29,7 +29,11 @@
 #ifndef __V4L2_COMMON__
 #define __V4L2_COMMON__
 
-/* Selection target definitions */
+/*
+ *
+ * Selection interface definitions
+ *
+ */
 
 /* Current cropping area */
 #define V4L2_SEL_TGT_CROP		0x0000
@@ -46,7 +50,7 @@
 /* Current composing area plus all padding pixels */
 #define V4L2_SEL_TGT_COMPOSE_PADDED	0x0103
 
-/* Backward compatibility definitions */
+/* Backward compatibility target definitions --- to be removed. */
 #define V4L2_SEL_TGT_CROP_ACTIVE	V4L2_SEL_TGT_CROP
 #define V4L2_SEL_TGT_COMPOSE_ACTIVE	V4L2_SEL_TGT_COMPOSE
 #define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL \
@@ -54,4 +58,14 @@
 #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL \
 	V4L2_SUBDEV_SEL_TGT_COMPOSE
 
-#endif /* __V4L2_COMMON__  */
+/* Selection flags */
+#define V4L2_SEL_FLAG_GE		(1 << 0)
+#define V4L2_SEL_FLAG_LE		(1 << 1)
+#define V4L2_SEL_FLAG_KEEP_CONFIG	(1 << 2)
+
+/* Backward compatibility flag definitions --- to be removed. */
+#define V4L2_SUBDEV_SEL_FLAG_SIZE_GE	V4L2_SEL_FLAG_GE
+#define V4L2_SUBDEV_SEL_FLAG_SIZE_LE	V4L2_SEL_FLAG_LE
+#define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG
+
+#endif /* __V4L2_COMMON__ */
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h
index 1d7d457..8c57ee9 100644
--- a/include/linux/v4l2-subdev.h
+++ b/include/linux/v4l2-subdev.h
@@ -124,10 +124,6 @@ struct v4l2_subdev_frame_interval_enum {
 	__u32 reserved[9];
 };
 
-#define V4L2_SUBDEV_SEL_FLAG_SIZE_GE			(1 << 0)
-#define V4L2_SUBDEV_SEL_FLAG_SIZE_LE			(1 << 1)
-#define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG		(1 << 2)
-
 /**
  * struct v4l2_subdev_selection - selection info
  *
@@ -135,7 +131,7 @@ struct v4l2_subdev_frame_interval_enum {
  * @pad: pad number, as reported by the media API
  * @target: Selection target, used to choose one of possible rectangles,
  *	    defined in v4l2-common.h; V4L2_SEL_TGT_* .
- * @flags: constraint flags
+ * @flags: constraint flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.
  * @r: coordinates of the selection window
  * @reserved: for future use, set to zero for now
  *
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index ce86855..00d1796 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -762,16 +762,12 @@ struct v4l2_crop {
 	struct v4l2_rect        c;
 };
 
-/* Hints for adjustments of selection rectangle */
-#define V4L2_SEL_FLAG_GE	0x00000001
-#define V4L2_SEL_FLAG_LE	0x00000002
-
 /**
  * struct v4l2_selection - selection info
  * @type:	buffer type (do not use *_MPLANE types)
  * @target:	Selection target, used to choose one of possible rectangles;
  *		defined in v4l2-common.h; V4L2_SEL_TGT_* .
- * @flags:	constraints flags
+ * @flags:	constraints flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.
  * @r:		coordinates of selection window
  * @reserved:	for future use, rounds structure size to 64 bytes, set to zero
  *
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/8] v4l: Unify selection flags documentation
  2012-06-30 17:05 [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes Sakari Ailus
                   ` (4 preceding siblings ...)
  2012-06-30 17:03 ` [PATCH 5/8] v4l: Unify selection flags Sakari Ailus
@ 2012-06-30 17:03 ` Sakari Ailus
  2012-06-30 21:13   ` Sylwester Nawrocki
  2012-06-30 17:03 ` [PATCH 7/8] Feature removal: V4L2 selections API target and flag definitions Sakari Ailus
  2012-06-30 17:03 ` [PATCH 8/8] v4l: Correct conflicting V4L2 subdev selection API documentation Sakari Ailus
  7 siblings, 1 reply; 17+ messages in thread
From: Sakari Ailus @ 2012-06-30 17:03 UTC (permalink / raw)
  To: linux-media; +Cc: sylwester.nawrocki, t.stanislaws, laurent.pinchart, hverkuil

As for the selection targets, the selection flags are now the same on V4L2
and V4L2 subdev interfaces. Also document them so.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 Documentation/DocBook/media/v4l/dev-subdev.xml     |    6 +-
 Documentation/DocBook/media/v4l/selection-api.xml  |    6 +-
 .../DocBook/media/v4l/selections-common.xml        |  226 +++++++++++++-------
 .../DocBook/media/v4l/vidioc-g-selection.xml       |   27 +---
 .../media/v4l/vidioc-subdev-g-selection.xml        |   39 +----
 5 files changed, 159 insertions(+), 145 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml
index afeb196..a3d9dd0 100644
--- a/Documentation/DocBook/media/v4l/dev-subdev.xml
+++ b/Documentation/DocBook/media/v4l/dev-subdev.xml
@@ -323,10 +323,10 @@
       <para>The drivers should always use the closest possible
       rectangle the user requests on all selection targets, unless
       specifically told otherwise.
-      <constant>V4L2_SUBDEV_SEL_FLAG_SIZE_GE</constant> and
-      <constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant> flags may be
+      <constant>V4L2_SEL_FLAG_GE</constant> and
+      <constant>V4L2_SEL_FLAG_LE</constant> flags may be
       used to round the image size either up or down. <xref
-      linkend="v4l2-subdev-selection-flags"></xref></para>
+      linkend="v4l2-selection-flags" /></para>
     </section>
 
     <section>
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml
index 24dec10..e7ed507 100644
--- a/Documentation/DocBook/media/v4l/selection-api.xml
+++ b/Documentation/DocBook/media/v4l/selection-api.xml
@@ -55,7 +55,7 @@ cropping and composing rectangles have the same size.</para>
 
     </section>
 
-    See <xref linkend="v4l2-selection-targets-table" /> for more
+    See <xref linkend="v4l2-selection-targets" /> for more
     information.
 
   <section>
@@ -74,7 +74,7 @@ cropping/composing rectangles may have to be aligned, and both the source and
 the sink may have arbitrary upper and lower size limits. Therefore, as usual,
 drivers are expected to adjust the requested parameters and return the actual
 values selected. An application can control the rounding behaviour using <link
-linkend="v4l2-sel-flags"> constraint flags </link>.</para>
+linkend="v4l2-selection-flags"> constraint flags </link>.</para>
 
    <section>
 
@@ -117,7 +117,7 @@ the bounds rectangle. The composing rectangle must lie completely inside bounds
 rectangle. The driver must adjust the composing rectangle to fit to the
 bounding limits. Moreover, the driver can perform other adjustments according
 to hardware limitations. The application can control rounding behaviour using
-<link linkend="v4l2-sel-flags"> constraint flags </link>.</para>
+<link linkend="v4l2-selection-flags"> constraint flags </link>.</para>
 
 <para>For capture devices the default composing rectangle is queried using
 <constant> V4L2_SEL_TGT_COMPOSE_DEFAULT </constant>. It is usually equal to the
diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml
index d0411ab..7cec5c1 100644
--- a/Documentation/DocBook/media/v4l/selections-common.xml
+++ b/Documentation/DocBook/media/v4l/selections-common.xml
@@ -1,6 +1,6 @@
 <section id="v4l2-selections-common">
 
-  <title>Selection targets</title>
+  <title>Common selection definitions</title>
 
   <para>While the <link linkend="selection-api">V4L2 selection
   API</link> and <link linkend="v4l2-subdev-selections">V4L2 subdev
@@ -10,83 +10,155 @@
   sub-device's pad. On the V4L2 interface the selection rectangles
   refer to the in-memory pixel format.</para>
 
-  <para>The precise meaning of the selection targets may thus be
-  affected on which of the two interfaces they are used.</para>
+  <para>This section defines the common definitions of the
+  selection interfaces on the two APIs.</para>
 
-  <table pgwide="1" frame="none" id="v4l2-selection-targets-table">
-  <title>Selection target definitions</title>
-    <tgroup cols="4">
-      <colspec colname="c1" />
-      <colspec colname="c2" />
-      <colspec colname="c3" />
-      <colspec colname="c4" />
-      <colspec colname="c5" />
-      &cs-def;
-      <thead>
-	<row rowsep="1">
-	  <entry align="left">Target name</entry>
-	  <entry align="left">id</entry>
-	  <entry align="left">Definition</entry>
-	  <entry align="left">Valid for V4L2</entry>
-	  <entry align="left">Valid for V4L2 subdev</entry>
-	</row>
-      </thead>
-      <tbody valign="top">
-	<row>
-	  <entry><constant>V4L2_SEL_TGT_CROP</constant></entry>
-	  <entry>0x0000</entry>
-	  <entry>Crop rectangle. Defines the cropped area.</entry>
-	  <entry>Yes</entry>
-	  <entry>Yes</entry>
-	</row>
-	<row>
-          <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry>
-          <entry>0x0001</entry>
-          <entry>Suggested cropping rectangle that covers the "whole picture".</entry>
-	  <entry>Yes</entry>
-	  <entry>No</entry>
-	</row>
-	<row>
-	  <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry>
-	  <entry>0x0002</entry>
-	  <entry>Bounds of the crop rectangle. All valid crop
-	  rectangles fit inside the crop bounds rectangle.
-	  </entry>
-	  <entry>Yes</entry>
-	  <entry>Yes</entry>
-	</row>
-	<row>
-	  <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry>
-	  <entry>0x0100</entry>
-	  <entry>Compose rectangle. Used to configure scaling
-	  and composition.</entry>
-	  <entry>Yes</entry>
-	  <entry>Yes</entry>
-	</row>
-	<row>
-          <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry>
-          <entry>0x0101</entry>
-          <entry>Suggested composition rectangle that covers the "whole picture".</entry>
-	  <entry>Yes</entry>
-	  <entry>No</entry>
-	</row>
-	<row>
-	  <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
-	  <entry>0x0102</entry>
-	  <entry>Bounds of the compose rectangle. All valid compose
-	  rectangles fit inside the compose bounds rectangle.</entry>
-	  <entry>Yes</entry>
-	  <entry>Yes</entry>
-	</row>
-	<row>
-          <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
-          <entry>0x0103</entry>
-          <entry>The active area and all padding pixels that are inserted or
+  <section id="v4l2-selection-targets">
+
+    <title>Selection targets</title>
+
+    <para>The precise meaning of the selection targets may be
+    dependent on which of the two interfaces they are used.</para>
+
+    <table pgwide="1" frame="none" id="v4l2-selection-targets-table">
+    <title>Selection target definitions</title>
+      <tgroup cols="4">
+	<colspec colname="c1" />
+	<colspec colname="c2" />
+	<colspec colname="c3" />
+	<colspec colname="c4" />
+	<colspec colname="c5" />
+	&cs-def;
+	<thead>
+	  <row rowsep="1">
+	    <entry align="left">Target name</entry>
+	    <entry align="left">id</entry>
+	    <entry align="left">Definition</entry>
+	    <entry align="left">Valid for V4L2</entry>
+	    <entry align="left">Valid for V4L2 subdev</entry>
+	  </row>
+	</thead>
+	<tbody valign="top">
+	  <row>
+	    <entry><constant>V4L2_SEL_TGT_CROP</constant></entry>
+	    <entry>0x0000</entry>
+	    <entry>Crop rectangle. Defines the cropped area.</entry>
+	    <entry>Yes</entry>
+	    <entry>Yes</entry>
+	  </row>
+	  <row>
+	    <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry>
+	    <entry>0x0001</entry>
+	    <entry>Suggested cropping rectangle that covers the "whole picture".</entry>
+	    <entry>Yes</entry>
+	    <entry>No</entry>
+	  </row>
+	  <row>
+	    <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry>
+	    <entry>0x0002</entry>
+	    <entry>Bounds of the crop rectangle. All valid crop
+	    rectangles fit inside the crop bounds rectangle.
+	    </entry>
+	    <entry>Yes</entry>
+	    <entry>Yes</entry>
+	  </row>
+	  <row>
+	    <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry>
+	    <entry>0x0100</entry>
+	    <entry>Compose rectangle. Used to configure scaling
+	    and composition.</entry>
+	    <entry>Yes</entry>
+	    <entry>Yes</entry>
+	  </row>
+	  <row>
+	    <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry>
+	    <entry>0x0101</entry>
+	    <entry>Suggested composition rectangle that covers the "whole picture".</entry>
+	    <entry>Yes</entry>
+	    <entry>No</entry>
+	  </row>
+	  <row>
+	    <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
+	    <entry>0x0102</entry>
+	    <entry>Bounds of the compose rectangle. All valid compose
+	    rectangles fit inside the compose bounds rectangle.</entry>
+	    <entry>Yes</entry>
+	    <entry>Yes</entry>
+	  </row>
+	  <row>
+	    <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
+	    <entry>0x0103</entry>
+	    <entry>The active area and all padding pixels that are inserted or
 	    modified by hardware.</entry>
-	  <entry>Yes</entry>
-	  <entry>No</entry>
+	    <entry>Yes</entry>
+	    <entry>No</entry>
+	  </row>
+	</tbody>
+      </tgroup>
+    </table>
+
+  </section>
+
+  <section id="v4l2-selection-flags">
+
+    <title>Selection flags</title>
+
+    <table pgwide="1" frame="none" id="v4l2-selection-flags-table">
+    <title>Selection flag definitions</title>
+      <tgroup cols="4">
+	<colspec colname="c1" />
+	<colspec colname="c2" />
+	<colspec colname="c3" />
+	<colspec colname="c4" />
+	<colspec colname="c5" />
+	&cs-def;
+	<thead>
+	<row rowsep="1">
+	    <entry align="left">Flag name</entry>
+	    <entry align="left">id</entry>
+	    <entry align="left">Definition</entry>
+	    <entry align="left">Valid for V4L2</entry>
+	    <entry align="left">Valid for V4L2 subdev</entry>
 	</row>
-      </tbody>
-    </tgroup>
-  </table>
+	</thead>
+	<tbody valign="top">
+	  <row>
+	    <entry><constant>V4L2_SEL_FLAG_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_SEL_FLAG_LE</constant>) the
+	    behaviour is to choose the closest possible
+	    rectangle.</entry>
+	    <entry>Yes</entry>
+	    <entry>Yes</entry>
+	  </row>
+	  <row>
+	    <entry><constant>V4L2_SEL_FLAG_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>
+	    <entry>Yes</entry>
+	    <entry>Yes</entry>
+	  </row>
+	  <row>
+	    <entry><constant>V4L2_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>
+	    <entry>No</entry>
+	    <entry>Yes</entry>
+	  </row>
+	</tbody>
+      </tgroup>
+    </table>
+
+  </section>
+
 </section>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
index c6f8325..f76d8a6 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
@@ -154,32 +154,9 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
 
   </refsect1>
 
-  <para>Selection targets are documented in <xref
+  <para>Selection targets and flags are documented in <xref
   linkend="v4l2-selections-common"/>.</para>
 
-  <refsect1>
-    <table frame="none" pgwide="1" id="v4l2-sel-flags">
-      <title>Selection constraint flags</title>
-      <tgroup cols="3">
-	&cs-def;
-	<tbody valign="top">
-	  <row>
-            <entry><constant>V4L2_SEL_FLAG_GE</constant></entry>
-            <entry>0x00000001</entry>
-            <entry>Indicates that the adjusted rectangle must contain the original
-	    &v4l2-selection; <structfield>r</structfield> rectangle.</entry>
-	  </row>
-	  <row>
-            <entry><constant>V4L2_SEL_FLAG_LE</constant></entry>
-            <entry>0x00000002</entry>
-            <entry>Indicates that the adjusted rectangle must be inside the original
-	    &v4l2-rect; <structfield>r</structfield> rectangle.</entry>
-	  </row>
-	</tbody>
-      </tgroup>
-    </table>
-  </refsect1>
-
     <section>
       <figure id="sel-const-adjust">
 	<title>Size adjustments with constraint flags.</title>
@@ -216,7 +193,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
 	    <entry>__u32</entry>
 	    <entry><structfield>flags</structfield></entry>
             <entry>Flags controlling the selection rectangle adjustments, refer to
-	    <link linkend="v4l2-sel-flags">selection flags</link>.</entry>
+	    <link linkend="v4l2-selection-flags">selection flags</link>.</entry>
 	  </row>
 	  <row>
 	    <entry>&v4l2-rect;</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
index ace1478..f33cc81 100644
--- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
@@ -87,44 +87,9 @@
       <constant>EINVAL</constant>.</para>
     </section>
 
-    <para>Selection targets are documented in <xref
+    <para>Selection targets and flags are documented in <xref
     linkend="v4l2-selections-common"/>.</para>
 
-    <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">
@@ -151,7 +116,7 @@
 	    <entry>__u32</entry>
 	    <entry><structfield>flags</structfield></entry>
 	    <entry>Flags. See
-	    <xref linkend="v4l2-subdev-selection-flags">.</xref></entry>
+	    <xref linkend="v4l2-selection-flags" />.</entry>
 	  </row>
 	  <row>
 	    <entry>&v4l2-rect;</entry>
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 7/8] Feature removal: V4L2 selections API target and flag definitions
  2012-06-30 17:05 [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes Sakari Ailus
                   ` (5 preceding siblings ...)
  2012-06-30 17:03 ` [PATCH 6/8] v4l: Unify selection flags documentation Sakari Ailus
@ 2012-06-30 17:03 ` Sakari Ailus
  2012-06-30 17:03 ` [PATCH 8/8] v4l: Correct conflicting V4L2 subdev selection API documentation Sakari Ailus
  7 siblings, 0 replies; 17+ messages in thread
From: Sakari Ailus @ 2012-06-30 17:03 UTC (permalink / raw)
  To: linux-media; +Cc: sylwester.nawrocki, t.stanislaws, laurent.pinchart, hverkuil

From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>

After unification of the V4L2 and V4L2 subdev selection targets and flags
the old flags are no longer required. Thus they can be removed. However, as
the API is present in a kernel release, this must go through the feature
removal process.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 Documentation/feature-removal-schedule.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 09701af..b998030 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -558,3 +558,21 @@ Why:	The V4L2_CID_VCENTER, V4L2_CID_HCENTER controls have been deprecated
 	There are newer controls (V4L2_CID_PAN*, V4L2_CID_TILT*) that provide
 	similar	functionality.
 Who:	Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
+
+----------------------------
+
+What:	V4L2 selections API target rectangle and flags unification, the
+	following definitions will be removed: V4L2_SEL_TGT_CROP_ACTIVE,
+	V4L2_SEL_TGT_COMPOSE_ACTIVE, V4L2_SUBDEV_SEL_*, V4L2_SUBDEV_SEL_FLAG_*
+	in favor of common V4L2_SEL_TGT_* and V4L2_SEL_FLAG_* definitions.
+	For more details see include/linux/v4l2-common.h.
+When:	3.8
+Why:	The regular V4L2 selections and the subdev selection API originally
+	defined distinct names for the target rectangles and flags - V4L2_SEL_*
+	and V4L2_SUBDEV_SEL_*. Although, it turned out that the meaning of these
+	target rectangles is virtually identical and the APIs were consolidated
+	to use single set of names - V4L2_SEL_*. This didn't involve any ABI
+	changes. Alias definitions were created for the original ones to avoid
+	any instabilities in the user space interface. After few cycles these
+	backward compatibility definitions will be removed.
+Who:	Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 8/8] v4l: Correct conflicting V4L2 subdev selection API documentation
  2012-06-30 17:05 [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes Sakari Ailus
                   ` (6 preceding siblings ...)
  2012-06-30 17:03 ` [PATCH 7/8] Feature removal: V4L2 selections API target and flag definitions Sakari Ailus
@ 2012-06-30 17:03 ` Sakari Ailus
  2012-06-30 20:29   ` Sylwester Nawrocki
  7 siblings, 1 reply; 17+ messages in thread
From: Sakari Ailus @ 2012-06-30 17:03 UTC (permalink / raw)
  To: linux-media; +Cc: sylwester.nawrocki, t.stanislaws, laurent.pinchart, hverkuil

The API reference documents that the KEEP_CONFIG flag tells the
configuration should not be propagated by the driver whereas the interface
documentation (dev-subdev.xml) prohibited any changes to the rest of the
pipeline. Resolve the conflict by changing the API reference to disallow
changes.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 .../DocBook/media/v4l/selections-common.xml        |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml
index 7cec5c1..007e0c5 100644
--- a/Documentation/DocBook/media/v4l/selections-common.xml
+++ b/Documentation/DocBook/media/v4l/selections-common.xml
@@ -148,7 +148,7 @@
 	  <row>
 	    <entry><constant>V4L2_SEL_FLAG_KEEP_CONFIG</constant></entry>
 	    <entry>(1 &lt;&lt; 2)</entry>
-	    <entry>The configuration should not be propagated to any
+	    <entry>The configuration must 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>
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes
@ 2012-06-30 17:05 Sakari Ailus
  2012-06-30 17:03 ` [PATCH 1/8] V4L: Remove "_ACTIVE" from the selection target name definitions Sakari Ailus
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Sakari Ailus @ 2012-06-30 17:05 UTC (permalink / raw)
  To: linux-media
  Cc: Tomasz Stanislawski, Laurent Pinchart, Hans Verkuil, Sylwester Nawrocki

Hi,

Changed since the last time:

- Added V4L2 subdev backward compatibility definitions for *_ACTUAL
  targets (patch 2) and flags (patch 5). These are needed since the changes
  won't make it to 3.5.
- Added Sylwester's patch for feature removal documentation (patch 7).

Kind regards,

-- 
Sakari Ailus
sakari.ailus@iki.fi

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/8] v4l: Remove "_ACTUAL" from subdev selection API target definition names
  2012-06-30 17:03 ` [PATCH 2/8] v4l: Remove "_ACTUAL" from subdev selection API target definition names Sakari Ailus
@ 2012-06-30 20:21   ` Sylwester Nawrocki
  0 siblings, 0 replies; 17+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 20:21 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, t.stanislaws, laurent.pinchart, hverkuil

Hi Sakari,

On 06/30/2012 07:03 PM, Sakari Ailus wrote:
> The string "_ACTUAL" does not say anything more about the target names. Drop
> it. V4L2 selection API was changed by "V4L: Remove "_ACTIVE" from the
> selection target name definitions" by Sylwester Nawrocki. This patch does
> the same for the V4L2 subdev API.
>
> Signed-off-by: Sakari Ailus<sakari.ailus@iki.fi>

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

--
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
  2012-06-30 17:03 ` [PATCH 3/8] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces Sakari Ailus
@ 2012-06-30 20:22   ` Sylwester Nawrocki
  2012-07-01 11:13     ` Sakari Ailus
  0 siblings, 1 reply; 17+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 20:22 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, t.stanislaws, laurent.pinchart, hverkuil

Hi Sakari,

On 06/30/2012 07:03 PM, Sakari Ailus wrote:

Would be good to add at least a small description here, that this
patch converts users of V4L2_SUBDEV_SEL_TGT_* to use V4L2_SEL_TGT_*,
or something similar.

> Signed-off-by: Sakari Ailus<sakari.ailus@iki.fi>
> Signed-off-by: Sylwester Nawrocki<s.nawrocki@samsung.com>
> ---
>   drivers/media/video/omap3isp/ispccdc.c      |    6 +-
>   drivers/media/video/omap3isp/isppreview.c   |    6 +-
>   drivers/media/video/omap3isp/ispresizer.c   |    6 +-
>   drivers/media/video/s5p-fimc/fimc-capture.c |   18 ++++----
>   drivers/media/video/s5p-fimc/fimc-lite.c    |   11 ++---
>   drivers/media/video/smiapp/smiapp-core.c    |   30 +++++++-------
>   drivers/media/video/v4l2-subdev.c           |    4 +-
>   include/linux/v4l2-common.h                 |   57 +++++++++++++++++++++++++++
>   include/linux/v4l2-subdev.h                 |   19 +-------
>   include/linux/videodev2.h                   |   25 +----------
>   10 files changed, 103 insertions(+), 79 deletions(-)
>   create mode 100644 include/linux/v4l2-common.h
>
> diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c
> index f19774f..82df7a0 100644
> --- a/drivers/media/video/omap3isp/ispccdc.c
> +++ b/drivers/media/video/omap3isp/ispccdc.c
> @@ -2014,7 +2014,7 @@ static int ccdc_get_selection(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
>   		return -EINVAL;
>
>   	switch (sel->target) {
> -	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
> +	case V4L2_SEL_TGT_CROP_BOUNDS:
>   		sel->r.left = 0;
>   		sel->r.top = 0;
>   		sel->r.width = INT_MAX;
> @@ -2024,7 +2024,7 @@ static int ccdc_get_selection(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
>   		ccdc_try_crop(ccdc, format,&sel->r);
>   		break;
>
> -	case V4L2_SUBDEV_SEL_TGT_CROP:
> +	case V4L2_SEL_TGT_CROP:
>   		sel->r = *__ccdc_get_crop(ccdc, fh, sel->which);
>   		break;
>
> @@ -2052,7 +2052,7 @@ static int ccdc_set_selection(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
>   	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
>   	struct v4l2_mbus_framefmt *format;
>
> -	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP ||
> +	if (sel->target != V4L2_SEL_TGT_CROP ||
>   	    sel->pad != CCDC_PAD_SOURCE_OF)
>   		return -EINVAL;
>
> diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/video/omap3isp/isppreview.c
> index 1086f6a..6fa70f4 100644
> --- a/drivers/media/video/omap3isp/isppreview.c
> +++ b/drivers/media/video/omap3isp/isppreview.c
> @@ -1949,7 +1949,7 @@ static int preview_get_selection(struct v4l2_subdev *sd,
>   		return -EINVAL;
>
>   	switch (sel->target) {
> -	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
> +	case V4L2_SEL_TGT_CROP_BOUNDS:
>   		sel->r.left = 0;
>   		sel->r.top = 0;
>   		sel->r.width = INT_MAX;
> @@ -1960,7 +1960,7 @@ static int preview_get_selection(struct v4l2_subdev *sd,
>   		preview_try_crop(prev, format,&sel->r);
>   		break;
>
> -	case V4L2_SUBDEV_SEL_TGT_CROP:
> +	case V4L2_SEL_TGT_CROP:
>   		sel->r = *__preview_get_crop(prev, fh, sel->which);
>   		break;
>
> @@ -1988,7 +1988,7 @@ static int preview_set_selection(struct v4l2_subdev *sd,
>   	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
>   	struct v4l2_mbus_framefmt *format;
>
> -	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP ||
> +	if (sel->target != V4L2_SEL_TGT_CROP ||
>   	    sel->pad != PREV_PAD_SINK)
>   		return -EINVAL;
>
> diff --git a/drivers/media/video/omap3isp/ispresizer.c b/drivers/media/video/omap3isp/ispresizer.c
> index 9456652..ae17d91 100644
> --- a/drivers/media/video/omap3isp/ispresizer.c
> +++ b/drivers/media/video/omap3isp/ispresizer.c
> @@ -1249,7 +1249,7 @@ static int resizer_get_selection(struct v4l2_subdev *sd,
>   					     sel->which);
>
>   	switch (sel->target) {
> -	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
> +	case V4L2_SEL_TGT_CROP_BOUNDS:
>   		sel->r.left = 0;
>   		sel->r.top = 0;
>   		sel->r.width = INT_MAX;
> @@ -1259,7 +1259,7 @@ static int resizer_get_selection(struct v4l2_subdev *sd,
>   		resizer_calc_ratios(res,&sel->r, format_source,&ratio);
>   		break;
>
> -	case V4L2_SUBDEV_SEL_TGT_CROP:
> +	case V4L2_SEL_TGT_CROP:
>   		sel->r = *__resizer_get_crop(res, fh, sel->which);
>   		resizer_calc_ratios(res,&sel->r, format_source,&ratio);
>   		break;
> @@ -1293,7 +1293,7 @@ static int resizer_set_selection(struct v4l2_subdev *sd,
>   	struct v4l2_mbus_framefmt *format_sink, *format_source;
>   	struct resizer_ratio ratio;
>
> -	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP ||
> +	if (sel->target != V4L2_SEL_TGT_CROP ||
>   	    sel->pad != RESZ_PAD_SINK)
>   		return -EINVAL;
>
> diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
> index a3cd78d..521e371 100644
> --- a/drivers/media/video/s5p-fimc/fimc-capture.c
> +++ b/drivers/media/video/s5p-fimc/fimc-capture.c
> @@ -1429,9 +1429,9 @@ static int fimc_subdev_get_selection(struct v4l2_subdev *sd,
>   	mutex_lock(&fimc->lock);
>
>   	switch (sel->target) {
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
> +	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
>   		f =&ctx->d_frame;
> -	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
> +	case V4L2_SEL_TGT_CROP_BOUNDS:
>   		r->width = f->o_width;
>   		r->height = f->o_height;
>   		r->left = 0;
> @@ -1439,10 +1439,10 @@ static int fimc_subdev_get_selection(struct v4l2_subdev *sd,
>   		mutex_unlock(&fimc->lock);
>   		return 0;
>
> -	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
> +	case V4L2_SEL_TGT_CROP:
>   		try_sel = v4l2_subdev_get_try_crop(fh, sel->pad);
>   		break;
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL:
> +	case V4L2_SEL_TGT_COMPOSE:
>   		try_sel = v4l2_subdev_get_try_compose(fh, sel->pad);
>   		f =&ctx->d_frame;
>   		break;
> @@ -1486,9 +1486,9 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
>   	fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP);
>
>   	switch (sel->target) {
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
> +	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
>   		f =&ctx->d_frame;
> -	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
> +	case V4L2_SEL_TGT_CROP_BOUNDS:
>   		r->width = f->o_width;
>   		r->height = f->o_height;
>   		r->left = 0;
> @@ -1496,10 +1496,10 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
>   		mutex_unlock(&fimc->lock);
>   		return 0;
>
> -	case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL:
> +	case V4L2_SEL_TGT_CROP:
>   		try_sel = v4l2_subdev_get_try_crop(fh, sel->pad);
>   		break;
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL:
> +	case V4L2_SEL_TGT_COMPOSE:
>   		try_sel = v4l2_subdev_get_try_compose(fh, sel->pad);
>   		f =&ctx->d_frame;
>   		break;
> @@ -1515,7 +1515,7 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
>   		set_frame_crop(f, r->left, r->top, r->width, r->height);
>   		set_bit(ST_CAPT_APPLY_CFG,&fimc->state);
>   		spin_unlock_irqrestore(&fimc->slock, flags);
> -		if (sel->target == V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL)
> +		if (sel->target == V4L2_SEL_TGT_COMPOSE)
>   			ctx->state |= FIMC_COMPOSE;
>   	}
>
> diff --git a/drivers/media/video/s5p-fimc/fimc-lite.c b/drivers/media/video/s5p-fimc/fimc-lite.c
> index 52ede56..8785089 100644
> --- a/drivers/media/video/s5p-fimc/fimc-lite.c
> +++ b/drivers/media/video/s5p-fimc/fimc-lite.c
> @@ -1086,9 +1086,9 @@ static int fimc_lite_subdev_get_selection(struct v4l2_subdev *sd,
>   	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
>   	struct flite_frame *f =&fimc->inp_frame;
>
> -	if ((sel->target != V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL&&
> -	     sel->target != V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS) ||
> -	    sel->pad != FLITE_SD_PAD_SINK)
> +	if ((sel->target != V4L2_SEL_TGT_CROP&&
> +	     sel->target != V4L2_SEL_TGT_CROP_BOUNDS) ||
> +	     sel->pad != FLITE_SD_PAD_SINK)
>   		return -EINVAL;
>
>   	if (sel->which == V4L2_SUBDEV_FORMAT_TRY) {
> @@ -1097,7 +1097,7 @@ static int fimc_lite_subdev_get_selection(struct v4l2_subdev *sd,
>   	}
>
>   	mutex_lock(&fimc->lock);
> -	if (sel->target == V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL) {
> +	if (sel->target == V4L2_SEL_TGT_CROP) {
>   		sel->r = f->rect;
>   	} else {
>   		sel->r.left = 0;
> @@ -1122,8 +1122,7 @@ static int fimc_lite_subdev_set_selection(struct v4l2_subdev *sd,
>   	struct flite_frame *f =&fimc->inp_frame;
>   	int ret = 0;
>
> -	if (sel->target != V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL ||
> -	    sel->pad != FLITE_SD_PAD_SINK)
> +	if (sel->target != V4L2_SEL_TGT_CROP || sel->pad != FLITE_SD_PAD_SINK)
>   		return -EINVAL;
>
>   	mutex_lock(&fimc->lock);
> diff --git a/drivers/media/video/smiapp/smiapp-core.c b/drivers/media/video/smiapp/smiapp-core.c
> index 37622bb6..9bbb5d3 100644
> --- a/drivers/media/video/smiapp/smiapp-core.c
> +++ b/drivers/media/video/smiapp/smiapp-core.c
> @@ -1630,7 +1630,7 @@ static void smiapp_propagate(struct v4l2_subdev *subdev,
>   	smiapp_get_crop_compose(subdev, fh, crops,&comp, which);
>
>   	switch (target) {
> -	case V4L2_SUBDEV_SEL_TGT_CROP:
> +	case V4L2_SEL_TGT_CROP:
>   		comp->width = crops[SMIAPP_PAD_SINK]->width;
>   		comp->height = crops[SMIAPP_PAD_SINK]->height;
>   		if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
> @@ -1646,7 +1646,7 @@ static void smiapp_propagate(struct v4l2_subdev *subdev,
>   			}
>   		}
>   		/* Fall through */
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
> +	case V4L2_SEL_TGT_COMPOSE:
>   		*crops[SMIAPP_PAD_SRC] = *comp;
>   		break;
>   	default:
> @@ -1722,7 +1722,7 @@ static int smiapp_set_format(struct v4l2_subdev *subdev,
>   	if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE)
>   		ssd->sink_fmt = *crops[ssd->sink_pad];
>   	smiapp_propagate(subdev, fh, fmt->which,
> -			 V4L2_SUBDEV_SEL_TGT_CROP);
> +			 V4L2_SEL_TGT_CROP);
>
>   	mutex_unlock(&sensor->mutex);
>
> @@ -1957,7 +1957,7 @@ static int smiapp_set_compose(struct v4l2_subdev *subdev,
>
>   	*comp = sel->r;
>   	smiapp_propagate(subdev, fh, sel->which,
> -			 V4L2_SUBDEV_SEL_TGT_COMPOSE);
> +			 V4L2_SEL_TGT_COMPOSE);
>
>   	if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE)
>   		return smiapp_update_mode(sensor);
> @@ -1973,8 +1973,8 @@ static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
>
>   	/* We only implement crop in three places. */
>   	switch (sel->target) {
> -	case V4L2_SUBDEV_SEL_TGT_CROP:
> -	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
> +	case V4L2_SEL_TGT_CROP:
> +	case V4L2_SEL_TGT_CROP_BOUNDS:
>   		if (ssd == sensor->pixel_array
>   		&&  sel->pad == SMIAPP_PA_PAD_SRC)
>   			return 0;
> @@ -1987,8 +1987,8 @@ static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
>   		    == SMIAPP_DIGITAL_CROP_CAPABILITY_INPUT_CROP)
>   			return 0;
>   		return -EINVAL;
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
> +	case V4L2_SEL_TGT_COMPOSE:
> +	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
>   		if (sel->pad == ssd->source_pad)
>   			return -EINVAL;
>   		if (ssd == sensor->binner)
> @@ -2050,7 +2050,7 @@ static int smiapp_set_crop(struct v4l2_subdev *subdev,
>
>   	if (ssd != sensor->pixel_array&&  sel->pad == SMIAPP_PAD_SINK)
>   		smiapp_propagate(subdev, fh, sel->which,
> -				 V4L2_SUBDEV_SEL_TGT_CROP);
> +				 V4L2_SEL_TGT_CROP);
>
>   	return 0;
>   }
> @@ -2084,7 +2084,7 @@ static int __smiapp_get_selection(struct v4l2_subdev *subdev,
>   	}
>
>   	switch (sel->target) {
> -	case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS:
> +	case V4L2_SEL_TGT_CROP_BOUNDS:
>   		if (ssd == sensor->pixel_array) {
>   			sel->r.width =
>   				sensor->limits[SMIAPP_LIMIT_X_ADDR_MAX] + 1;
> @@ -2096,11 +2096,11 @@ static int __smiapp_get_selection(struct v4l2_subdev *subdev,
>   			sel->r = *comp;
>   		}
>   		break;
> -	case V4L2_SUBDEV_SEL_TGT_CROP:
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
> +	case V4L2_SEL_TGT_CROP:
> +	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
>   		sel->r = *crops[sel->pad];
>   		break;
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
> +	case V4L2_SEL_TGT_COMPOSE:
>   		sel->r = *comp;
>   		break;
>   	}
> @@ -2147,10 +2147,10 @@ static int smiapp_set_selection(struct v4l2_subdev *subdev,
>   			      sel->r.height);
>
>   	switch (sel->target) {
> -	case V4L2_SUBDEV_SEL_TGT_CROP:
> +	case V4L2_SEL_TGT_CROP:
>   		ret = smiapp_set_crop(subdev, fh, sel);
>   		break;
> -	case V4L2_SUBDEV_SEL_TGT_COMPOSE:
> +	case V4L2_SEL_TGT_COMPOSE:
>   		ret = smiapp_set_compose(subdev, fh, sel);
>   		break;
>   	default:
> diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
> index cd86f0c..9182f81 100644
> --- a/drivers/media/video/v4l2-subdev.c
> +++ b/drivers/media/video/v4l2-subdev.c
> @@ -245,7 +245,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
>   		memset(&sel, 0, sizeof(sel));
>   		sel.which = crop->which;
>   		sel.pad = crop->pad;
> -		sel.target = V4L2_SUBDEV_SEL_TGT_CROP;
> +		sel.target = V4L2_SEL_TGT_CROP;
>
>   		rval = v4l2_subdev_call(
>   			sd, pad, get_selection, subdev_fh,&sel);
> @@ -274,7 +274,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
>   		memset(&sel, 0, sizeof(sel));
>   		sel.which = crop->which;
>   		sel.pad = crop->pad;
> -		sel.target = V4L2_SUBDEV_SEL_TGT_CROP;
> +		sel.target = V4L2_SEL_TGT_CROP;
>   		sel.r = crop->rect;
>
>   		rval = v4l2_subdev_call(
> diff --git a/include/linux/v4l2-common.h b/include/linux/v4l2-common.h
> new file mode 100644
> index 0000000..b49a37a
> --- /dev/null
> +++ b/include/linux/v4l2-common.h
> @@ -0,0 +1,57 @@
> +/*
> + * include/linux/v4l2-common.h
> + *
> + * Common V4L2 and V4L2 subdev definitions.
> + *
> + * Users are advised to #include this file either through videodev2.h
> + * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer
> + * to this file directly.
> + *
> + * Copyright (C) 2012 Nokia Corporation
> + * Contact: Sakari Ailus<sakari.ailus@iki.fi>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * version 2 as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA
> + *
> + */
> +
> +#ifndef __V4L2_COMMON__
> +#define __V4L2_COMMON__
> +
> +/* Selection target definitions */
> +
> +/* Current cropping area */
> +#define V4L2_SEL_TGT_CROP		0x0000
> +/* Default cropping area */
> +#define V4L2_SEL_TGT_CROP_DEFAULT	0x0001
> +/* Cropping bounds */
> +#define V4L2_SEL_TGT_CROP_BOUNDS	0x0002
> +/* Current composing area */
> +#define V4L2_SEL_TGT_COMPOSE		0x0100
> +/* Default composing area */
> +#define V4L2_SEL_TGT_COMPOSE_DEFAULT	0x0101
> +/* Composing bounds */
> +#define V4L2_SEL_TGT_COMPOSE_BOUNDS	0x0102
> +/* Current composing area plus all padding pixels */
> +#define V4L2_SEL_TGT_COMPOSE_PADDED	0x0103
> +
> +/* Backward compatibility definitions */
> +#define V4L2_SEL_TGT_CROP_ACTIVE	V4L2_SEL_TGT_CROP
> +#define V4L2_SEL_TGT_COMPOSE_ACTIVE	V4L2_SEL_TGT_COMPOSE
> +#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL \
> +	V4L2_SUBDEV_SEL_TGT_CROP
> +#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL \
> +	V4L2_SUBDEV_SEL_TGT_COMPOSE

This should read:

#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL		V4L2_SEL_TGT_CROP
#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL	V4L2_SEL_TGT_COMPOSE

right ? As V4L2_SUBDEV_SEL_TGT_* defines are already annihilated
at this point ?

I would also increase indentation between symbols and numbers
and wouldn't use backslashes.

With this fixed:

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>


Thanks!
Sylwester

> +
> +#endif /* __V4L2_COMMON__  */
> diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h
> index 3cbe688..1d7d457 100644
> --- a/include/linux/v4l2-subdev.h
> +++ b/include/linux/v4l2-subdev.h
> @@ -25,6 +25,7 @@
>
>   #include<linux/ioctl.h>
>   #include<linux/types.h>
> +#include<linux/v4l2-common.h>
>   #include<linux/v4l2-mediabus.h>
>
>   /**
> @@ -127,27 +128,13 @@ struct v4l2_subdev_frame_interval_enum {
>   #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE			(1<<  1)
>   #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG		(1<<  2)
>
> -/* active cropping area */
> -#define V4L2_SUBDEV_SEL_TGT_CROP			0x0000
> -/* cropping bounds */
> -#define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS			0x0002
> -/* current composing area */
> -#define V4L2_SUBDEV_SEL_TGT_COMPOSE			0x0100
> -/* composing bounds */
> -#define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS		0x0102
> -
> -/* backward compatibility definitions */
> -#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL \
> -	V4L2_SUBDEV_SEL_TGT_CROP
> -#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL \
> -	V4L2_SUBDEV_SEL_TGT_COMPOSE
> -
>   /**
>    * struct v4l2_subdev_selection - selection info
>    *
>    * @which: either V4L2_SUBDEV_FORMAT_ACTIVE or V4L2_SUBDEV_FORMAT_TRY
>    * @pad: pad number, as reported by the media API
> - * @target: selection target, used to choose one of possible rectangles
> + * @target: Selection target, used to choose one of possible rectangles,
> + *	    defined in v4l2-common.h; V4L2_SEL_TGT_* .
>    * @flags: constraint flags
>    * @r: coordinates of the selection window
>    * @reserved: for future use, set to zero for now
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 0425c12..ce86855 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -64,6 +64,7 @@
>   #include<linux/compiler.h>
>   #include<linux/ioctl.h>
>   #include<linux/types.h>
> +#include<linux/v4l2-common.h>
>
>   /*
>    * Common stuff for both V4L1 and V4L2
> @@ -765,31 +766,11 @@ struct v4l2_crop {
>   #define V4L2_SEL_FLAG_GE	0x00000001
>   #define V4L2_SEL_FLAG_LE	0x00000002
>
> -/* Selection targets */
> -
> -/* Current cropping area */
> -#define V4L2_SEL_TGT_CROP		0x0000
> -/* Default cropping area */
> -#define V4L2_SEL_TGT_CROP_DEFAULT	0x0001
> -/* Cropping bounds */
> -#define V4L2_SEL_TGT_CROP_BOUNDS	0x0002
> -/* Current composing area */
> -#define V4L2_SEL_TGT_COMPOSE		0x0100
> -/* Default composing area */
> -#define V4L2_SEL_TGT_COMPOSE_DEFAULT	0x0101
> -/* Composing bounds */
> -#define V4L2_SEL_TGT_COMPOSE_BOUNDS	0x0102
> -/* Current composing area plus all padding pixels */
> -#define V4L2_SEL_TGT_COMPOSE_PADDED	0x0103
> -
> -/* Backward compatibility definitions */
> -#define V4L2_SEL_TGT_CROP_ACTIVE	V4L2_SEL_TGT_CROP
> -#define V4L2_SEL_TGT_COMPOSE_ACTIVE	V4L2_SEL_TGT_COMPOSE
> -
>   /**
>    * struct v4l2_selection - selection info
>    * @type:	buffer type (do not use *_MPLANE types)
> - * @target:	selection target, used to choose one of possible rectangles
> + * @target:	Selection target, used to choose one of possible rectangles;
> + *		defined in v4l2-common.h; V4L2_SEL_TGT_* .
>    * @flags:	constraints flags
>    * @r:		coordinates of selection window
>    * @reserved:	for future use, rounds structure size to 64 bytes, set to zero


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 5/8] v4l: Unify selection flags
  2012-06-30 17:03 ` [PATCH 5/8] v4l: Unify selection flags Sakari Ailus
@ 2012-06-30 20:23   ` Sylwester Nawrocki
  0 siblings, 0 replies; 17+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 20:23 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, t.stanislaws, laurent.pinchart, hverkuil

Hi Sakari,

On 06/30/2012 07:03 PM, Sakari Ailus wrote:
> Unify flags on the selection interfaces on V4L2 and V4L2 subdev. Flags are
> very similar to targets in this case: there are more similarities than
> differences between the two interfaces.
>
> Signed-off-by: Sakari Ailus<sakari.ailus@iki.fi>

Thanks for the patch.

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 8/8] v4l: Correct conflicting V4L2 subdev selection API documentation
  2012-06-30 17:03 ` [PATCH 8/8] v4l: Correct conflicting V4L2 subdev selection API documentation Sakari Ailus
@ 2012-06-30 20:29   ` Sylwester Nawrocki
  0 siblings, 0 replies; 17+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 20:29 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, t.stanislaws, laurent.pinchart, hverkuil

Hi Sakari,

On 06/30/2012 07:03 PM, Sakari Ailus wrote:
> The API reference documents that the KEEP_CONFIG flag tells the
> configuration should not be propagated by the driver whereas the interface
> documentation (dev-subdev.xml) prohibited any changes to the rest of the
> pipeline. Resolve the conflict by changing the API reference to disallow
> changes.
>
> Signed-off-by: Sakari Ailus<sakari.ailus@iki.fi>

Thanks for the patch. It seems much clearer to have the drivers
not propagating the configuration whenever KEEP_CONFIG is set, rather
than relying on not clearly defined additional conditions.

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/8] v4l: Common documentation for selection targets
  2012-06-30 17:03 ` [PATCH 4/8] v4l: Common documentation for selection targets Sakari Ailus
@ 2012-06-30 21:01   ` Sylwester Nawrocki
  0 siblings, 0 replies; 17+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 21:01 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, t.stanislaws, laurent.pinchart, hverkuil

On 06/30/2012 07:03 PM, Sakari Ailus wrote:
> Both V4L2 and V4L2 subdev interface have very similar selection APIs with
> differences foremost related to in-memory and media bus formats. However,
> the selection targets are the same for both. Most targets are and in the
> future will likely continue to be more the same than with any differences.
> Thus it makes sense to unify the documentation of the targets.
>
> Signed-off-by: Sakari Ailus<sakari.ailus@iki.fi>
> ---
..
> diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml
> new file mode 100644
> index 0000000..d0411ab
> --- /dev/null
> +++ b/Documentation/DocBook/media/v4l/selections-common.xml
> @@ -0,0 +1,92 @@
> +<section id="v4l2-selections-common">
> +
> +<title>Selection targets</title>
> +
> +<para>While the<link linkend="selection-api">V4L2 selection
> +  API</link>  and<link linkend="v4l2-subdev-selections">V4L2 subdev
> +  selection APIs</link>  are very similar, there's one fundamental
> +  difference between the two. On sub-device API, the selection
> +  rectangle refers to the media bus format, and is bound to a
> +  sub-device's pad. On the V4L2 interface the selection rectangles
> +  refer to the in-memory pixel format.</para>
> +
> +<para>The precise meaning of the selection targets may thus be
> +  affected on which of the two interfaces they are used.</para>
> +
> +<table pgwide="1" frame="none" id="v4l2-selection-targets-table">
> +<title>Selection target definitions</title>
> +<tgroup cols="4">

s/4/5

Looks good otherwise.

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

 > +<colspec colname="c1" />
 > +<colspec colname="c2" />
 > +<colspec colname="c3" />
 > +<colspec colname="c4" />
 > +<colspec colname="c5" />
 > +&cs-def;
 > +<thead>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 6/8] v4l: Unify selection flags documentation
  2012-06-30 17:03 ` [PATCH 6/8] v4l: Unify selection flags documentation Sakari Ailus
@ 2012-06-30 21:13   ` Sylwester Nawrocki
  0 siblings, 0 replies; 17+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 21:13 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, t.stanislaws, laurent.pinchart, hverkuil

On 06/30/2012 07:03 PM, Sakari Ailus wrote:
> As for the selection targets, the selection flags are now the same on V4L2
> and V4L2 subdev interfaces. Also document them so.
> 
> Signed-off-by: Sakari Ailus<sakari.ailus@iki.fi>
> ---
>   Documentation/DocBook/media/v4l/dev-subdev.xml     |    6 +-
>   Documentation/DocBook/media/v4l/selection-api.xml  |    6 +-
>   .../DocBook/media/v4l/selections-common.xml        |  226 +++++++++++++-------
>   .../DocBook/media/v4l/vidioc-g-selection.xml       |   27 +---
>   .../media/v4l/vidioc-subdev-g-selection.xml        |   39 +----
>   5 files changed, 159 insertions(+), 145 deletions(-)
> 
> diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml
> index afeb196..a3d9dd0 100644
> --- a/Documentation/DocBook/media/v4l/dev-subdev.xml
> +++ b/Documentation/DocBook/media/v4l/dev-subdev.xml
> @@ -323,10 +323,10 @@
>         <para>The drivers should always use the closest possible
>         rectangle the user requests on all selection targets, unless
>         specifically told otherwise.
> -<constant>V4L2_SUBDEV_SEL_FLAG_SIZE_GE</constant>  and
> -<constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant>  flags may be
> +<constant>V4L2_SEL_FLAG_GE</constant>  and
> +<constant>V4L2_SEL_FLAG_LE</constant>  flags may be
>         used to round the image size either up or down.<xref
> -      linkend="v4l2-subdev-selection-flags"></xref></para>
> +      linkend="v4l2-selection-flags" /></para>
>       </section>
> 
>       <section>
> diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml
> index 24dec10..e7ed507 100644
> --- a/Documentation/DocBook/media/v4l/selection-api.xml
> +++ b/Documentation/DocBook/media/v4l/selection-api.xml
> @@ -55,7 +55,7 @@ cropping and composing rectangles have the same size.</para>
> 
>       </section>
> 
> -    See<xref linkend="v4l2-selection-targets-table" />  for more
> +    See<xref linkend="v4l2-selection-targets" />  for more
>       information.
> 
>     <section>
> @@ -74,7 +74,7 @@ cropping/composing rectangles may have to be aligned, and both the source and
>   the sink may have arbitrary upper and lower size limits. Therefore, as usual,
>   drivers are expected to adjust the requested parameters and return the actual
>   values selected. An application can control the rounding behaviour using<link
> -linkend="v4l2-sel-flags">  constraint flags</link>.</para>
> +linkend="v4l2-selection-flags">  constraint flags</link>.</para>
> 
>      <section>
> 
> @@ -117,7 +117,7 @@ the bounds rectangle. The composing rectangle must lie completely inside bounds
>   rectangle. The driver must adjust the composing rectangle to fit to the
>   bounding limits. Moreover, the driver can perform other adjustments according
>   to hardware limitations. The application can control rounding behaviour using
> -<link linkend="v4l2-sel-flags">  constraint flags</link>.</para>
> +<link linkend="v4l2-selection-flags">  constraint flags</link>.</para>
> 
>   <para>For capture devices the default composing rectangle is queried using
>   <constant>  V4L2_SEL_TGT_COMPOSE_DEFAULT</constant>. It is usually equal to the
> diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml
> index d0411ab..7cec5c1 100644
> --- a/Documentation/DocBook/media/v4l/selections-common.xml
> +++ b/Documentation/DocBook/media/v4l/selections-common.xml
> @@ -1,6 +1,6 @@
>   <section id="v4l2-selections-common">
> 
> -<title>Selection targets</title>
> +<title>Common selection definitions</title>
> 
>     <para>While the<link linkend="selection-api">V4L2 selection
>     API</link>  and<link linkend="v4l2-subdev-selections">V4L2 subdev
> @@ -10,83 +10,155 @@
>     sub-device's pad. On the V4L2 interface the selection rectangles
>     refer to the in-memory pixel format.</para>
> 
> -<para>The precise meaning of the selection targets may thus be
> -  affected on which of the two interfaces they are used.</para>
> +<para>This section defines the common definitions of the
> +  selection interfaces on the two APIs.</para>
> 
> -<table pgwide="1" frame="none" id="v4l2-selection-targets-table">
> -<title>Selection target definitions</title>
> -<tgroup cols="4">
> -<colspec colname="c1" />
> -<colspec colname="c2" />
> -<colspec colname="c3" />
> -<colspec colname="c4" />
> -<colspec colname="c5" />
> -&cs-def;
> -<thead>
> -	<row rowsep="1">
> -	<entry align="left">Target name</entry>
> -	<entry align="left">id</entry>
> -	<entry align="left">Definition</entry>
> -	<entry align="left">Valid for V4L2</entry>
> -	<entry align="left">Valid for V4L2 subdev</entry>
> -	</row>
> -</thead>
> -<tbody valign="top">
> -	<row>
> -	<entry><constant>V4L2_SEL_TGT_CROP</constant></entry>
> -	<entry>0x0000</entry>
> -	<entry>Crop rectangle. Defines the cropped area.</entry>
> -	<entry>Yes</entry>
> -	<entry>Yes</entry>
> -	</row>
> -	<row>
> -<entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry>
> -<entry>0x0001</entry>
> -<entry>Suggested cropping rectangle that covers the "whole picture".</entry>
> -	<entry>Yes</entry>
> -	<entry>No</entry>
> -	</row>
> -	<row>
> -	<entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry>
> -	<entry>0x0002</entry>
> -	<entry>Bounds of the crop rectangle. All valid crop
> -	  rectangles fit inside the crop bounds rectangle.
> -	</entry>
> -	<entry>Yes</entry>
> -	<entry>Yes</entry>
> -	</row>
> -	<row>
> -	<entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry>
> -	<entry>0x0100</entry>
> -	<entry>Compose rectangle. Used to configure scaling
> -	  and composition.</entry>
> -	<entry>Yes</entry>
> -	<entry>Yes</entry>
> -	</row>
> -	<row>
> -<entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry>
> -<entry>0x0101</entry>
> -<entry>Suggested composition rectangle that covers the "whole picture".</entry>
> -	<entry>Yes</entry>
> -	<entry>No</entry>
> -	</row>
> -	<row>
> -	<entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
> -	<entry>0x0102</entry>
> -	<entry>Bounds of the compose rectangle. All valid compose
> -	  rectangles fit inside the compose bounds rectangle.</entry>
> -	<entry>Yes</entry>
> -	<entry>Yes</entry>
> -	</row>
> -	<row>
> -<entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
> -<entry>0x0103</entry>
> -<entry>The active area and all padding pixels that are inserted or
> +<section id="v4l2-selection-targets">
> +
> +<title>Selection targets</title>
> +
> +<para>The precise meaning of the selection targets may be
> +    dependent on which of the two interfaces they are used.</para>
> +
> +<table pgwide="1" frame="none" id="v4l2-selection-targets-table">
> +<title>Selection target definitions</title>
> +<tgroup cols="4">

s/4/5

> +	<colspec colname="c1" />
> +	<colspec colname="c2" />
> +	<colspec colname="c3" />
> +	<colspec colname="c4" />
> +	<colspec colname="c5" />
> +	&cs-def;
> +	<thead>
> +	<row rowsep="1">
> +	<entry align="left">Target name</entry>
> +	<entry align="left">id</entry>
> +	<entry align="left">Definition</entry>
> +	<entry align="left">Valid for V4L2</entry>
> +	<entry align="left">Valid for V4L2 subdev</entry>
> +	</row>
> +	</thead>
> +	<tbody valign="top">
> +	<row>
> +	<entry><constant>V4L2_SEL_TGT_CROP</constant></entry>
> +	<entry>0x0000</entry>
> +	<entry>Crop rectangle. Defines the cropped area.</entry>
> +	<entry>Yes</entry>
> +	<entry>Yes</entry>
> +	</row>
> +	<row>
> +	<entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry>
> +	<entry>0x0001</entry>
> +	<entry>Suggested cropping rectangle that covers the "whole picture".</entry>
> +	<entry>Yes</entry>
> +	<entry>No</entry>
> +	</row>
> +	<row>
> +	<entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry>
> +	<entry>0x0002</entry>
> +	<entry>Bounds of the crop rectangle. All valid crop
> +	    rectangles fit inside the crop bounds rectangle.
> +	</entry>
> +	<entry>Yes</entry>
> +	<entry>Yes</entry>
> +	</row>
> +	<row>
> +	<entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry>
> +	<entry>0x0100</entry>
> +	<entry>Compose rectangle. Used to configure scaling
> +	    and composition.</entry>
> +	<entry>Yes</entry>
> +	<entry>Yes</entry>
> +	</row>
> +	<row>
> +	<entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry>
> +	<entry>0x0101</entry>
> +	<entry>Suggested composition rectangle that covers the "whole picture".</entry>
> +	<entry>Yes</entry>
> +	<entry>No</entry>
> +	</row>
> +	<row>
> +	<entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
> +	<entry>0x0102</entry>
> +	<entry>Bounds of the compose rectangle. All valid compose
> +	    rectangles fit inside the compose bounds rectangle.</entry>
> +	<entry>Yes</entry>
> +	<entry>Yes</entry>
> +	</row>
> +	<row>
> +	<entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
> +	<entry>0x0103</entry>
> +	<entry>The active area and all padding pixels that are inserted or
>   	    modified by hardware.</entry>
> -	<entry>Yes</entry>
> -	<entry>No</entry>
> +	<entry>Yes</entry>
> +	<entry>No</entry>
> +	</row>
> +	</tbody>
> +</tgroup>
> +</table>
> +
> +</section>
> +
> +<section id="v4l2-selection-flags">
> +
> +<title>Selection flags</title>
> +
> +<table pgwide="1" frame="none" id="v4l2-selection-flags-table">
> +<title>Selection flag definitions</title>
> +<tgroup cols="4">

s/4/5

> +	<colspec colname="c1" />
> +	<colspec colname="c2" />
> +	<colspec colname="c3" />
> +	<colspec colname="c4" />
> +	<colspec colname="c5" />
> +	&cs-def;
> +	<thead>
> +	<row rowsep="1">
> +	<entry align="left">Flag name</entry>
> +	<entry align="left">id</entry>
> +	<entry align="left">Definition</entry>
> +	<entry align="left">Valid for V4L2</entry>
> +	<entry align="left">Valid for V4L2 subdev</entry>
>   	</row>
> -</tbody>
> -</tgroup>
> -</table>
> +	</thead>
> +	<tbody valign="top">
> +	<row>
> +	<entry><constant>V4L2_SEL_FLAG_GE</constant></entry>
> +	<entry>(1&lt;&lt; 0)</entry>

This field is quite badly formatted, due to too small width of column c2.
I couldn't fix that with "colwidth" though. It's minor issue anyway.

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
  2012-06-30 20:22   ` Sylwester Nawrocki
@ 2012-07-01 11:13     ` Sakari Ailus
  2012-07-01 11:45       ` Sylwester Nawrocki
  0 siblings, 1 reply; 17+ messages in thread
From: Sakari Ailus @ 2012-07-01 11:13 UTC (permalink / raw)
  To: Sylwester Nawrocki; +Cc: linux-media, t.stanislaws, laurent.pinchart, hverkuil

Hi Sylwester,

On Sat, Jun 30, 2012 at 10:22:30PM +0200, Sylwester Nawrocki wrote:
> On 06/30/2012 07:03 PM, Sakari Ailus wrote:
> 
> Would be good to add at least a small description here, that this
> patch converts users of V4L2_SUBDEV_SEL_TGT_* to use V4L2_SEL_TGT_*,
> or something similar.

Fixed.

...

> >diff --git a/include/linux/v4l2-common.h b/include/linux/v4l2-common.h
> >new file mode 100644
> >index 0000000..b49a37a
> >--- /dev/null
> >+++ b/include/linux/v4l2-common.h
> >@@ -0,0 +1,57 @@
> >+/*
> >+ * include/linux/v4l2-common.h
> >+ *
> >+ * Common V4L2 and V4L2 subdev definitions.
> >+ *
> >+ * Users are advised to #include this file either through videodev2.h
> >+ * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer
> >+ * to this file directly.
> >+ *
> >+ * Copyright (C) 2012 Nokia Corporation
> >+ * Contact: Sakari Ailus<sakari.ailus@iki.fi>
> >+ *
> >+ * This program is free software; you can redistribute it and/or
> >+ * modify it under the terms of the GNU General Public License
> >+ * version 2 as published by the Free Software Foundation.
> >+ *
> >+ * This program is distributed in the hope that it will be useful, but
> >+ * WITHOUT ANY WARRANTY; without even the implied warranty of
> >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> >+ * General Public License for more details.
> >+ *
> >+ * You should have received a copy of the GNU General Public License
> >+ * along with this program; if not, write to the Free Software
> >+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> >+ * 02110-1301 USA
> >+ *
> >+ */
> >+
> >+#ifndef __V4L2_COMMON__
> >+#define __V4L2_COMMON__
> >+
> >+/* Selection target definitions */
> >+
> >+/* Current cropping area */
> >+#define V4L2_SEL_TGT_CROP		0x0000
> >+/* Default cropping area */
> >+#define V4L2_SEL_TGT_CROP_DEFAULT	0x0001
> >+/* Cropping bounds */
> >+#define V4L2_SEL_TGT_CROP_BOUNDS	0x0002
> >+/* Current composing area */
> >+#define V4L2_SEL_TGT_COMPOSE		0x0100
> >+/* Default composing area */
> >+#define V4L2_SEL_TGT_COMPOSE_DEFAULT	0x0101
> >+/* Composing bounds */
> >+#define V4L2_SEL_TGT_COMPOSE_BOUNDS	0x0102
> >+/* Current composing area plus all padding pixels */
> >+#define V4L2_SEL_TGT_COMPOSE_PADDED	0x0103
> >+
> >+/* Backward compatibility definitions */
> >+#define V4L2_SEL_TGT_CROP_ACTIVE	V4L2_SEL_TGT_CROP
> >+#define V4L2_SEL_TGT_COMPOSE_ACTIVE	V4L2_SEL_TGT_COMPOSE
> >+#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL \
> >+	V4L2_SUBDEV_SEL_TGT_CROP
> >+#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL \
> >+	V4L2_SUBDEV_SEL_TGT_COMPOSE
> 
> This should read:
> 
> #define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL		V4L2_SEL_TGT_CROP
> #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL	V4L2_SEL_TGT_COMPOSE
> 
> right ? As V4L2_SUBDEV_SEL_TGT_* defines are already annihilated
> at this point ?

Correct. There's been so many variations of these that I've become blind to
small differences. ;-)

> I would also increase indentation between symbols and numbers
> and wouldn't use backslashes.
> 
> With this fixed:
> 
> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

Thanks!!

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	jabber/XMPP/Gmail: sailus@retiisi.org.uk

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
  2012-07-01 11:13     ` Sakari Ailus
@ 2012-07-01 11:45       ` Sylwester Nawrocki
  0 siblings, 0 replies; 17+ messages in thread
From: Sylwester Nawrocki @ 2012-07-01 11:45 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Sylwester Nawrocki, linux-media, t.stanislaws, laurent.pinchart,
	hverkuil

On 07/01/2012 01:13 PM, Sakari Ailus wrote:
> Correct. There's been so many variations of these that I've become blind to
> small differences. ;-)

I could imagine ;) That's where peer reviews are helpful.
I really like how it looks now though, you've done pretty good job.

Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-07-01 11:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-30 17:05 [PATCH v5 0/8] V4L2 and V4L2 subdev selection target and flag changes Sakari Ailus
2012-06-30 17:03 ` [PATCH 1/8] V4L: Remove "_ACTIVE" from the selection target name definitions Sakari Ailus
2012-06-30 17:03 ` [PATCH 2/8] v4l: Remove "_ACTUAL" from subdev selection API target definition names Sakari Ailus
2012-06-30 20:21   ` Sylwester Nawrocki
2012-06-30 17:03 ` [PATCH 3/8] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces Sakari Ailus
2012-06-30 20:22   ` Sylwester Nawrocki
2012-07-01 11:13     ` Sakari Ailus
2012-07-01 11:45       ` Sylwester Nawrocki
2012-06-30 17:03 ` [PATCH 4/8] v4l: Common documentation for selection targets Sakari Ailus
2012-06-30 21:01   ` Sylwester Nawrocki
2012-06-30 17:03 ` [PATCH 5/8] v4l: Unify selection flags Sakari Ailus
2012-06-30 20:23   ` Sylwester Nawrocki
2012-06-30 17:03 ` [PATCH 6/8] v4l: Unify selection flags documentation Sakari Ailus
2012-06-30 21:13   ` Sylwester Nawrocki
2012-06-30 17:03 ` [PATCH 7/8] Feature removal: V4L2 selections API target and flag definitions Sakari Ailus
2012-06-30 17:03 ` [PATCH 8/8] v4l: Correct conflicting V4L2 subdev selection API documentation Sakari Ailus
2012-06-30 20:29   ` Sylwester Nawrocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.