Skip to contentSkip to conversation

V4L2 and V4L2 subdev selection target and flag changes

GIT PULL In review Sakari Ailus 2 participants 5 messages Jun 15, 2012 – Jun 30, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Mauro,

This patchset contains changes to unify the selection targets and flags across the V4L2 and V4L2 subdev interfaces, as well as a fix to conflicting information in the documentation.

Since the patchset (v4) I've addressed Laurent's comments:

- Fixed badly formatted xref references
- Spelling corrections and references to wrong defines
- Always tell KEEP_CONFIG will not change any other processing steps than the one it applies to

The following changes since commit 5472d3f17845c4398c6a510b46855820920c2181:

[media] mt9m032: Implement V4L2_CID_PIXEL_RATE control (2012-05-24
09:27:24 -0300)

are available in the git repository at:
ssh://linuxtv.org/git/sailus/media_tree.git media-for-3.5-unify-targets

Sakari Ailus (6):
v4l: Remove "_ACTUAL" from subdev selection API target definition
names
v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
v4l: Common documentation for selection targets
v4l: Unify selection flags
v4l: Unify selection flags documentation
v4l: Correct conflicting V4L2 subdev selection API documentation

Sylwester Nawrocki (1):
V4L: Remove "_ACTIVE" from the selection target name definitions

 Documentation/DocBook/media/v4l/compat.xml         |    9 +-
 Documentation/DocBook/media/v4l/dev-subdev.xml     |   36 ++--
 Documentation/DocBook/media/v4l/selection-api.xml  |   34 ++--
 .../DocBook/media/v4l/selections-common.xml        |  164
++++++++++++++++++++
 Documentation/DocBook/media/v4l/v4l2.xml           |    5 +
 .../DocBook/media/v4l/vidioc-g-selection.xml       |   86 ++---------
 .../media/v4l/vidioc-subdev-g-selection.xml        |   79 +---------
 drivers/media/video/omap3isp/ispccdc.c             |    8 +-
 drivers/media/video/omap3isp/isppreview.c          |    8 +-
 drivers/media/video/omap3isp/ispresizer.c          |    6 +-
 drivers/media/video/s5p-fimc/fimc-capture.c        |   32 ++--
 drivers/media/video/s5p-fimc/fimc-lite.c           |   15 +-
 drivers/media/video/s5p-jpeg/jpeg-core.c           |    4 +-
 drivers/media/video/s5p-tv/mixer_video.c           |    8 +-
 drivers/media/video/smiapp/smiapp-core.c           |   40 +++---
 drivers/media/video/v4l2-ioctl.c                   |    8 +-
 drivers/media/video/v4l2-subdev.c                  |    4 +-
 include/linux/v4l2-common.h                        |   58 +++++++
 include/linux/v4l2-subdev.h                        |   20 +--
 include/linux/videodev2.h                          |   27 +---
 20 files changed, 359 insertions(+), 292 deletions(-)
 create mode 100644 Documentation/DocBook/media/v4l/selections-common.xml
 create mode 100644 include/linux/v4l2-common.h

Kind regards,

Signature · 2 lines
Sakari Ailus
[email protected]
#1 lore raw

PATCH 1/1 Schedule the selections API compatibility definitions for removal

---
 Documentation/feature-removal-schedule.txt |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
Documentation/feature-removal-schedule.txt +15 -0
index 09701af..ef9f942 100644
@@ -558,3 +558,18 @@ 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 <[email protected]>
+
+----------------------------
+
+What:	Remove the backward compatibility V4L2 selections target and selections
+	flags definitions
+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 consolidation didn't
+	change the ABI in any way. Alias definitions were created for the
+	original ones to avoid any instabilities in the user space interface.
+	After few cycles these comptibility definitions will be removed.
+Who:	Sylwester Nawrocki <[email protected]>
Signature · 1 line
1.7.4.1
#2 lore raw

Re: [PATCH] [media] Schedule the selections API compatibility definitions for removal

Quoted 2 lines · Sylwester Nawrocki

---

Hi Sakari,

Let me add an explanation that was supposed to be originally included in that patch..

Here is the patch for Documentation/feature-removal-schedule.txt that is mentioned in the description of the first patch in this series.

This change set looks good to me, except there seem to be missing compatibility definitions for the selections flags. I presume we are going to need those since the original subdev selections API will exist in v3.5 kernels, and this change set is going to be applied only to v3.6.

So something like that might be needed:

#define V4L2_SUBDEV_SEL_FLAG_SIZE_GE      V4L2_SEL_FLAG_SIZE_GE
#define V4L2_SUBDEV_SEL_FLAG_SIZE_LE      V4L2_SEL_FLAG_SIZE_LE
#define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG  V4L2_SEL_FLAG_KEEP_CONFIG

After adding that this series seems good for merging to me.

Thanks and regards,
Sylwester

Quoted 26 lines
  Documentation/feature-removal-schedule.txt |   15 +++++++++++++++
  1 files changed, 15 insertions(+), 0 deletions(-)
Documentation/feature-removal-schedule.txt +15 -0
index 09701af..ef9f942 100644
@@ -558,3 +558,18 @@ 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<[email protected]>
+
+----------------------------
+
+What:	Remove the backward compatibility V4L2 selections target and selections
+	flags definitions
+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 consolidation didn't
+	change the ABI in any way. Alias definitions were created for the
+	original ones to avoid any instabilities in the user space interface.
+	After few cycles these comptibility definitions will be removed.
+Who:	Sylwester Nawrocki<[email protected]>
#3 lore raw

PATCH v2 1/1 Feature removal: V4L2 selections API target and flag definitions

In reply to Sylwester Nawrocki

---
Added more precise description of what is being removed.

---
 Documentation/feature-removal-schedule.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
Documentation/feature-removal-schedule.txt +18 -0
index 09701af..b998030 100644
@@ -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 <[email protected]>
+
+----------------------------
+
+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 <[email protected]>

--
1.7.4.1

#4 lore raw

Re: [PATCH v2] [media] Feature removal: V4L2 selections API target and flag definitions

Quoted 23 lines · Sylwester Nawrocki

---
Added more precise description of what is being removed.

---
 Documentation/feature-removal-schedule.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
Documentation/feature-removal-schedule.txt +8 -0
index 09701af..b998030 100644
@@ -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 <[email protected]>
+
+----------------------------
+
+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.

Documentation/feature-removal-schedule.txt Why: The V4L2_CID_VCENTER, V4L2_CID_HCENTER controls have been deprecated · line 578

Quoted 10 lines
Documentation/feature-removal-schedule.txt +10 -0
+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 <[email protected]>

Thanks, Sylwester!

I've added this to my patchset.

Cheers,

Signature · 2 lines
Sakari Ailus
e-mail: [email protected]	jabber/XMPP/Gmail: [email protected]