All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: mchehab@kernel.org, ezequiel@vanguardiasur.com.ar,
	p.zabel@pengutronix.de, gregkh@linuxfoundation.org,
	mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org,
	jonas@kwiboo.se, nicolas@ndufresne.ca,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, kernel@collabora.com,
	knaerzche@gmail.com, jc@kynesim.co.uk,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>
Subject: Re: [PATCH v3 12/14] media: uapi: Create a dedicated header for Hantro control
Date: Fri, 25 Feb 2022 20:16:38 +0100	[thread overview]
Message-ID: <2617680.mvXUDI8C0e@kista> (raw)
In-Reply-To: <20220225164600.1044663-13-benjamin.gaignard@collabora.com>

Hi!

Dne petek, 25. februar 2022 ob 17:45:58 CET je Benjamin Gaignard napisal(a):
> Hantro hardware needs a dedicated v4l2 control to perform HEVC
> decoding. Move it to a dedicated header file to prepare HEVC
> uAPI un-staging.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
>  .../userspace-api/media/drivers/hantro.rst    |  5 -----
>  drivers/staging/media/hantro/hantro_drv.c     |  1 +
>  include/media/hevc-ctrls.h                    | 13 -------------
>  include/uapi/linux/hantro-media.h             | 19 +++++++++++++++++++
>  include/uapi/linux/v4l2-controls.h            |  5 +++++
>  5 files changed, 25 insertions(+), 18 deletions(-)
>  create mode 100644 include/uapi/linux/hantro-media.h
> 
> diff --git a/Documentation/userspace-api/media/drivers/hantro.rst b/
Documentation/userspace-api/media/drivers/hantro.rst
> index cd9754b4e005..78dcd2a44a03 100644
> --- a/Documentation/userspace-api/media/drivers/hantro.rst
> +++ b/Documentation/userspace-api/media/drivers/hantro.rst
> @@ -12,8 +12,3 @@ The Hantro video decoder driver implements the following 
driver-specific control
>      to before syntax element "slice_temporal_mvp_enabled_flag".
>      If IDR, the skipped bits are just "pic_output_flag"
>      (separate_colour_plane_flag is not supported).
> -
> -.. note::
> -
> -        This control is not yet part of the public kernel API and
> -        it is expected to change.
> diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/
media/hantro/hantro_drv.c
> index 6f58c259d8fc..783a92a38c8e 100644
> --- a/drivers/staging/media/hantro/hantro_drv.c
> +++ b/drivers/staging/media/hantro/hantro_drv.c
> @@ -11,6 +11,7 @@
>   */
>  
>  #include <linux/clk.h>
> +#include <linux/hantro-media.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
> diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h
> index cbf41d180fe9..f29298c8c2f8 100644
> --- a/include/media/hevc-ctrls.h
> +++ b/include/media/hevc-ctrls.h
> @@ -443,17 +443,4 @@ struct v4l2_ctrl_hevc_scaling_matrix {
>  	__u8	scaling_list_dc_coef_32x32[2];
>  };
>  
> -/*  MPEG-class control IDs specific to the Hantro driver as defined by V4L2 
*/
> -#define V4L2_CID_CODEC_HANTRO_BASE				
(V4L2_CTRL_CLASS_CODEC | 0x1200)
> -/*
> - * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP -
> - * the number of data (in bits) to skip in the
> - * slice segment header.
> - * If non-IDR, the bits to be skipped go from syntax element 
"pic_output_flag"
> - * to before syntax element "slice_temporal_mvp_enabled_flag".
> - * If IDR, the skipped bits are just "pic_output_flag"
> - * (separate_colour_plane_flag is not supported).
> - */
> -#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP	
(V4L2_CID_CODEC_HANTRO_BASE + 0)
> -
>  #endif
> diff --git a/include/uapi/linux/hantro-media.h b/include/uapi/linux/hantro-
media.h
> new file mode 100644
> index 000000000000..b4e7ab7e6452
> --- /dev/null
> +++ b/include/uapi/linux/hantro-media.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */

I get
error: include/uapi/linux/hantro-media.h: missing "WITH Linux-syscall-note" 
for SPDX-License-Identifier
make[1]: *** [scripts/Makefile.headersinst:63: usr/include/linux/hantro-
media.h] Error 1

when installing headers.

Best regards,
Jernej

> +
> +#ifndef __UAPI_HANTRO_MEDIA_H__
> +#define __UAPI_HANTRO_MEDIA_H__
> +
> +#include <linux/v4l2-controls.h>
> +
> +/*
> + * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP -
> + * the number of data (in bits) to skip in the
> + * slice segment header.
> + * If non-IDR, the bits to be skipped go from syntax element 
"pic_output_flag"
> + * to before syntax element "slice_temporal_mvp_enabled_flag".
> + * If IDR, the skipped bits are just "pic_output_flag"
> + * (separate_colour_plane_flag is not supported).
> + */
> +#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP	
(V4L2_CID_USER_HANTRO_BASE + 0)
> +
> +#endif /* __UAPI_HANTRO_MEDIA_H__ */
> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-
controls.h
> index c8e0f84d204d..d56a1c7fb91d 100644
> --- a/include/uapi/linux/v4l2-controls.h
> +++ b/include/uapi/linux/v4l2-controls.h
> @@ -218,6 +218,11 @@ enum v4l2_colorfx {
>   * We reserve 16 controls for this driver.
>   */
>  #define V4L2_CID_USER_ALLEGRO_BASE		(V4L2_CID_USER_BASE + 
0x1170)
> +/*
> + * The base for Hantro driver controls.
> + * We reserve 128 controls for this driver.
> + */
> +#define V4L2_CID_USER_HANTRO_BASE		(V4L2_CID_USER_BASE + 
0x1180)
>  
>  /* MPEG-class control IDs */
>  /* The MPEG controls are applicable to all codec controls
> -- 
> 2.32.0
> 
> 



WARNING: multiple messages have this Message-ID (diff)
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: mchehab@kernel.org, ezequiel@vanguardiasur.com.ar,
	p.zabel@pengutronix.de, gregkh@linuxfoundation.org,
	mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org,
	jonas@kwiboo.se, nicolas@ndufresne.ca,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, kernel@collabora.com,
	knaerzche@gmail.com, jc@kynesim.co.uk,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>
Subject: Re: [PATCH v3 12/14] media: uapi: Create a dedicated header for Hantro control
Date: Fri, 25 Feb 2022 20:16:38 +0100	[thread overview]
Message-ID: <2617680.mvXUDI8C0e@kista> (raw)
In-Reply-To: <20220225164600.1044663-13-benjamin.gaignard@collabora.com>

Hi!

Dne petek, 25. februar 2022 ob 17:45:58 CET je Benjamin Gaignard napisal(a):
> Hantro hardware needs a dedicated v4l2 control to perform HEVC
> decoding. Move it to a dedicated header file to prepare HEVC
> uAPI un-staging.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
>  .../userspace-api/media/drivers/hantro.rst    |  5 -----
>  drivers/staging/media/hantro/hantro_drv.c     |  1 +
>  include/media/hevc-ctrls.h                    | 13 -------------
>  include/uapi/linux/hantro-media.h             | 19 +++++++++++++++++++
>  include/uapi/linux/v4l2-controls.h            |  5 +++++
>  5 files changed, 25 insertions(+), 18 deletions(-)
>  create mode 100644 include/uapi/linux/hantro-media.h
> 
> diff --git a/Documentation/userspace-api/media/drivers/hantro.rst b/
Documentation/userspace-api/media/drivers/hantro.rst
> index cd9754b4e005..78dcd2a44a03 100644
> --- a/Documentation/userspace-api/media/drivers/hantro.rst
> +++ b/Documentation/userspace-api/media/drivers/hantro.rst
> @@ -12,8 +12,3 @@ The Hantro video decoder driver implements the following 
driver-specific control
>      to before syntax element "slice_temporal_mvp_enabled_flag".
>      If IDR, the skipped bits are just "pic_output_flag"
>      (separate_colour_plane_flag is not supported).
> -
> -.. note::
> -
> -        This control is not yet part of the public kernel API and
> -        it is expected to change.
> diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/
media/hantro/hantro_drv.c
> index 6f58c259d8fc..783a92a38c8e 100644
> --- a/drivers/staging/media/hantro/hantro_drv.c
> +++ b/drivers/staging/media/hantro/hantro_drv.c
> @@ -11,6 +11,7 @@
>   */
>  
>  #include <linux/clk.h>
> +#include <linux/hantro-media.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
> diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h
> index cbf41d180fe9..f29298c8c2f8 100644
> --- a/include/media/hevc-ctrls.h
> +++ b/include/media/hevc-ctrls.h
> @@ -443,17 +443,4 @@ struct v4l2_ctrl_hevc_scaling_matrix {
>  	__u8	scaling_list_dc_coef_32x32[2];
>  };
>  
> -/*  MPEG-class control IDs specific to the Hantro driver as defined by V4L2 
*/
> -#define V4L2_CID_CODEC_HANTRO_BASE				
(V4L2_CTRL_CLASS_CODEC | 0x1200)
> -/*
> - * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP -
> - * the number of data (in bits) to skip in the
> - * slice segment header.
> - * If non-IDR, the bits to be skipped go from syntax element 
"pic_output_flag"
> - * to before syntax element "slice_temporal_mvp_enabled_flag".
> - * If IDR, the skipped bits are just "pic_output_flag"
> - * (separate_colour_plane_flag is not supported).
> - */
> -#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP	
(V4L2_CID_CODEC_HANTRO_BASE + 0)
> -
>  #endif
> diff --git a/include/uapi/linux/hantro-media.h b/include/uapi/linux/hantro-
media.h
> new file mode 100644
> index 000000000000..b4e7ab7e6452
> --- /dev/null
> +++ b/include/uapi/linux/hantro-media.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */

I get
error: include/uapi/linux/hantro-media.h: missing "WITH Linux-syscall-note" 
for SPDX-License-Identifier
make[1]: *** [scripts/Makefile.headersinst:63: usr/include/linux/hantro-
media.h] Error 1

when installing headers.

Best regards,
Jernej

> +
> +#ifndef __UAPI_HANTRO_MEDIA_H__
> +#define __UAPI_HANTRO_MEDIA_H__
> +
> +#include <linux/v4l2-controls.h>
> +
> +/*
> + * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP -
> + * the number of data (in bits) to skip in the
> + * slice segment header.
> + * If non-IDR, the bits to be skipped go from syntax element 
"pic_output_flag"
> + * to before syntax element "slice_temporal_mvp_enabled_flag".
> + * If IDR, the skipped bits are just "pic_output_flag"
> + * (separate_colour_plane_flag is not supported).
> + */
> +#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP	
(V4L2_CID_USER_HANTRO_BASE + 0)
> +
> +#endif /* __UAPI_HANTRO_MEDIA_H__ */
> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-
controls.h
> index c8e0f84d204d..d56a1c7fb91d 100644
> --- a/include/uapi/linux/v4l2-controls.h
> +++ b/include/uapi/linux/v4l2-controls.h
> @@ -218,6 +218,11 @@ enum v4l2_colorfx {
>   * We reserve 16 controls for this driver.
>   */
>  #define V4L2_CID_USER_ALLEGRO_BASE		(V4L2_CID_USER_BASE + 
0x1170)
> +/*
> + * The base for Hantro driver controls.
> + * We reserve 128 controls for this driver.
> + */
> +#define V4L2_CID_USER_HANTRO_BASE		(V4L2_CID_USER_BASE + 
0x1180)
>  
>  /* MPEG-class control IDs */
>  /* The MPEG controls are applicable to all codec controls
> -- 
> 2.32.0
> 
> 



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-02-25 19:16 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25 16:45 [PATCH v3 00/14] Move HEVC stateless controls out of staging Benjamin Gaignard
2022-02-25 16:45 ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 01/14] videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 02/14] v4l2-ctrls: add support for dynamically allocated arrays Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 03/14] vivid: add dynamic array test control Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 04/14] media: uapi: HEVC: Add missing fields in HEVC controls Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 05/14] media: uapi: HEVC: Rename HEVC stateless controls with STATELESS prefix Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 22:19   ` Jernej Škrabec
2022-02-25 22:19     ` Jernej Škrabec
2022-02-25 16:45 ` [PATCH v3 06/14] media: uapi: HEVC: Add document uAPI structure Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 07/14] media: uapi: HEVC: Define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS as a dynamic array Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 08/14] media: uapi: Move parsed HEVC pixel format out of staging Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 09/14] media: uapi: Add V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSET control Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 19:30   ` Jernej Škrabec
2022-02-25 19:30     ` Jernej Škrabec
2022-02-26 17:59     ` Jernej Škrabec
2022-02-26 17:59       ` Jernej Škrabec
2022-02-26 18:17       ` Jernej Škrabec
2022-02-26 18:17         ` Jernej Škrabec
2022-02-28  9:47         ` John Cox
2022-02-28  9:47           ` John Cox
2022-02-28 10:24           ` Benjamin Gaignard
2022-02-28 10:24             ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 10/14] media: uapi: Move the HEVC stateless control type out of staging Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 11/14] media: controls: Log HEVC stateless control in .std_log Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:45 ` [PATCH v3 12/14] media: uapi: Create a dedicated header for Hantro control Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 19:16   ` Jernej Škrabec [this message]
2022-02-25 19:16     ` Jernej Škrabec
2022-02-25 16:45 ` [PATCH v3 13/14] media: uapi: HEVC: fix padding in v4l2 control structures Benjamin Gaignard
2022-02-25 16:45   ` Benjamin Gaignard
2022-02-25 16:46 ` [PATCH v3 14/14] media: uapi: move HEVC stateless controls out of staging Benjamin Gaignard
2022-02-25 19:33 ` [PATCH v3 00/14] Move " Jernej Škrabec
2022-02-25 19:33   ` Jernej Škrabec
2022-02-26 22:25 ` Adam Ford
2022-02-26 22:25   ` Adam Ford
2022-02-28 10:13   ` Benjamin Gaignard
2022-02-28 10:13     ` Benjamin Gaignard
2022-03-03  1:23     ` Adam Ford
2022-03-03  1:23       ` Adam Ford
2022-03-03 10:13       ` Benjamin Gaignard
2022-03-03 10:13         ` Benjamin Gaignard
2022-03-04 12:59         ` Adam Ford
2022-03-04 12:59           ` Adam Ford
2022-03-04 13:03           ` Benjamin Gaignard
2022-03-04 13:03             ` Benjamin Gaignard
2022-03-04 22:46             ` Adam Ford
2022-03-04 22:46               ` Adam Ford
2022-03-07  8:49               ` Benjamin Gaignard
2022-03-07  8:49                 ` Benjamin Gaignard

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=2617680.mvXUDI8C0e@kista \
    --to=jernej.skrabec@gmail.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=gregkh@linuxfoundation.org \
    --cc=jc@kynesim.co.uk \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=knaerzche@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=p.zabel@pengutronix.de \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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.