media: v4l2-subdev: Clearly document that the crop API won't be extended
diff mbox series

Message ID 20240404145649.24039-1-laurent.pinchart@ideasonboard.com
State Not Applicable
Headers show
Series
  • media: v4l2-subdev: Clearly document that the crop API won't be extended
Related show

Commit Message

Laurent Pinchart April 4, 2024, 2:56 p.m. UTC
The V4L2 subdev crop API has been marked as obsolete, deprecated by the
selection API. Despite this, it has recently been extended with streams
support. In hindsight this was a mistake. Make sure it doesn't happen
again by clearly documenting that no new extensions will be accepted.

Suggested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 .../userspace-api/media/v4l/vidioc-subdev-g-crop.rst        | 6 +++---
 include/uapi/linux/v4l2-subdev.h                            | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

Comments

Umang Jain April 4, 2024, 6:29 p.m. UTC | #1
Hi Laurent,

It seems this is meant for linux-media instead ?

On 04/04/24 8:26 pm, Laurent Pinchart wrote:
> The V4L2 subdev crop API has been marked as obsolete, deprecated by the
> selection API. Despite this, it has recently been extended with streams
> support. In hindsight this was a mistake. Make sure it doesn't happen
> again by clearly documenting that no new extensions will be accepted.
>
> Suggested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>   .../userspace-api/media/v4l/vidioc-subdev-g-crop.rst        | 6 +++---
>   include/uapi/linux/v4l2-subdev.h                            | 4 ++++
>   2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> index 92d933631fda..88a748103a71 100644
> --- a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> +++ b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> @@ -37,9 +37,9 @@ Description
>   
>   .. note::
>   
> -    This is an :ref:`obsolete` interface and may be removed
> -    in the future. It is superseded by
> -    :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`.
> +    This is an :ref:`obsolete` interface and may be removed in the future. It is
> +    superseded by :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`. No new
> +    extensions to the :c:type:`v4l2_subdev_crop` structure will be accepted.
>   
>   To retrieve the current crop rectangle applications set the ``pad``
>   field of a struct :c:type:`v4l2_subdev_crop` to the
> diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h
> index 7048c51581c6..81a24bd38003 100644
> --- a/include/uapi/linux/v4l2-subdev.h
> +++ b/include/uapi/linux/v4l2-subdev.h
> @@ -50,6 +50,10 @@ struct v4l2_subdev_format {
>    * @rect: pad crop rectangle boundaries
>    * @stream: stream number, defined in subdev routing
>    * @reserved: drivers and applications must zero this array
> + *
> + * The subdev crop API is an obsolete interface and may be removed in the
> + * future. It is superseded by the selection API. No new extensions to this
> + * structure will be accepted.
>    */
>   struct v4l2_subdev_crop {
>   	__u32 which;
Sakari Ailus April 4, 2024, 8:07 p.m. UTC | #2
Hi Laurent,

On Thu, Apr 04, 2024 at 05:56:49PM +0300, Laurent Pinchart wrote:
> The V4L2 subdev crop API has been marked as obsolete, deprecated by the
> selection API. Despite this, it has recently been extended with streams
> support. In hindsight this was a mistake. Make sure it doesn't happen
> again by clearly documenting that no new extensions will be accepted.
> 
> Suggested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  .../userspace-api/media/v4l/vidioc-subdev-g-crop.rst        | 6 +++---
>  include/uapi/linux/v4l2-subdev.h                            | 4 ++++
>  2 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> index 92d933631fda..88a748103a71 100644
> --- a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> +++ b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> @@ -37,9 +37,9 @@ Description
>  
>  .. note::
>  
> -    This is an :ref:`obsolete` interface and may be removed
> -    in the future. It is superseded by
> -    :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`.
> +    This is an :ref:`obsolete` interface and may be removed in the future. It is
> +    superseded by :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`. No new
> +    extensions to the :c:type:`v4l2_subdev_crop` structure will be accepted.
>  
>  To retrieve the current crop rectangle applications set the ``pad``
>  field of a struct :c:type:`v4l2_subdev_crop` to the
> diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h
> index 7048c51581c6..81a24bd38003 100644
> --- a/include/uapi/linux/v4l2-subdev.h
> +++ b/include/uapi/linux/v4l2-subdev.h
> @@ -50,6 +50,10 @@ struct v4l2_subdev_format {
>   * @rect: pad crop rectangle boundaries
>   * @stream: stream number, defined in subdev routing
>   * @reserved: drivers and applications must zero this array
> + *
> + * The subdev crop API is an obsolete interface and may be removed in the
> + * future. It is superseded by the selection API. No new extensions to this

I'm not sure we could ever remove this, however that doesn't mean the text
couldn't be added. :-) I'd still drop the latter part of the first
sentence. Up to you.

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

> + * structure will be accepted.
>   */
>  struct v4l2_subdev_crop {
>  	__u32 which;
Laurent Pinchart April 4, 2024, 9:56 p.m. UTC | #3
On Thu, Apr 04, 2024 at 11:59:12PM +0530, Umang Jain wrote:
> Hi Laurent,
> 
> It seems this is meant for linux-media instead ?

Oops :-S My fingers are too used to typing libcamera. Thanks for
noticing.

> On 04/04/24 8:26 pm, Laurent Pinchart wrote:
> > The V4L2 subdev crop API has been marked as obsolete, deprecated by the
> > selection API. Despite this, it has recently been extended with streams
> > support. In hindsight this was a mistake. Make sure it doesn't happen
> > again by clearly documenting that no new extensions will be accepted.
> >
> > Suggested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >   .../userspace-api/media/v4l/vidioc-subdev-g-crop.rst        | 6 +++---
> >   include/uapi/linux/v4l2-subdev.h                            | 4 ++++
> >   2 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> > index 92d933631fda..88a748103a71 100644
> > --- a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> > +++ b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> > @@ -37,9 +37,9 @@ Description
> >   
> >   .. note::
> >   
> > -    This is an :ref:`obsolete` interface and may be removed
> > -    in the future. It is superseded by
> > -    :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`.
> > +    This is an :ref:`obsolete` interface and may be removed in the future. It is
> > +    superseded by :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`. No new
> > +    extensions to the :c:type:`v4l2_subdev_crop` structure will be accepted.
> >   
> >   To retrieve the current crop rectangle applications set the ``pad``
> >   field of a struct :c:type:`v4l2_subdev_crop` to the
> > diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h
> > index 7048c51581c6..81a24bd38003 100644
> > --- a/include/uapi/linux/v4l2-subdev.h
> > +++ b/include/uapi/linux/v4l2-subdev.h
> > @@ -50,6 +50,10 @@ struct v4l2_subdev_format {
> >    * @rect: pad crop rectangle boundaries
> >    * @stream: stream number, defined in subdev routing
> >    * @reserved: drivers and applications must zero this array
> > + *
> > + * The subdev crop API is an obsolete interface and may be removed in the
> > + * future. It is superseded by the selection API. No new extensions to this
> > + * structure will be accepted.
> >    */
> >   struct v4l2_subdev_crop {
> >   	__u32 which;
Laurent Pinchart April 4, 2024, 9:58 p.m. UTC | #4
Hi Sakari,

On Thu, Apr 04, 2024 at 08:07:55PM +0000, Sakari Ailus wrote:
> On Thu, Apr 04, 2024 at 05:56:49PM +0300, Laurent Pinchart wrote:
> > The V4L2 subdev crop API has been marked as obsolete, deprecated by the
> > selection API. Despite this, it has recently been extended with streams
> > support. In hindsight this was a mistake. Make sure it doesn't happen
> > again by clearly documenting that no new extensions will be accepted.
> > 
> > Suggested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >  .../userspace-api/media/v4l/vidioc-subdev-g-crop.rst        | 6 +++---
> >  include/uapi/linux/v4l2-subdev.h                            | 4 ++++
> >  2 files changed, 7 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> > index 92d933631fda..88a748103a71 100644
> > --- a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> > +++ b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
> > @@ -37,9 +37,9 @@ Description
> >  
> >  .. note::
> >  
> > -    This is an :ref:`obsolete` interface and may be removed
> > -    in the future. It is superseded by
> > -    :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`.
> > +    This is an :ref:`obsolete` interface and may be removed in the future. It is
> > +    superseded by :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`. No new
> > +    extensions to the :c:type:`v4l2_subdev_crop` structure will be accepted.
> >  
> >  To retrieve the current crop rectangle applications set the ``pad``
> >  field of a struct :c:type:`v4l2_subdev_crop` to the
> > diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h
> > index 7048c51581c6..81a24bd38003 100644
> > --- a/include/uapi/linux/v4l2-subdev.h
> > +++ b/include/uapi/linux/v4l2-subdev.h
> > @@ -50,6 +50,10 @@ struct v4l2_subdev_format {
> >   * @rect: pad crop rectangle boundaries
> >   * @stream: stream number, defined in subdev routing
> >   * @reserved: drivers and applications must zero this array
> > + *
> > + * The subdev crop API is an obsolete interface and may be removed in the
> > + * future. It is superseded by the selection API. No new extensions to this
> 
> I'm not sure we could ever remove this, however that doesn't mean the text
> couldn't be added. :-) I'd still drop the latter part of the first
> sentence. Up to you.

I've added it to match the existing text in vidioc-subdev-g-crop.rst. If
we decide to drop it, we should drop both.

> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> 
> > + * structure will be accepted.
> >   */
> >  struct v4l2_subdev_crop {
> >  	__u32 which;

Patch
diff mbox series

diff --git a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
index 92d933631fda..88a748103a71 100644
--- a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
+++ b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
@@ -37,9 +37,9 @@  Description
 
 .. note::
 
-    This is an :ref:`obsolete` interface and may be removed
-    in the future. It is superseded by
-    :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`.
+    This is an :ref:`obsolete` interface and may be removed in the future. It is
+    superseded by :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`. No new
+    extensions to the :c:type:`v4l2_subdev_crop` structure will be accepted.
 
 To retrieve the current crop rectangle applications set the ``pad``
 field of a struct :c:type:`v4l2_subdev_crop` to the
diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h
index 7048c51581c6..81a24bd38003 100644
--- a/include/uapi/linux/v4l2-subdev.h
+++ b/include/uapi/linux/v4l2-subdev.h
@@ -50,6 +50,10 @@  struct v4l2_subdev_format {
  * @rect: pad crop rectangle boundaries
  * @stream: stream number, defined in subdev routing
  * @reserved: drivers and applications must zero this array
+ *
+ * The subdev crop API is an obsolete interface and may be removed in the
+ * future. It is superseded by the selection API. No new extensions to this
+ * structure will be accepted.
  */
 struct v4l2_subdev_crop {
 	__u32 which;