diff mbox series

[v5,24/24] v4l: subdev: increase V4L2_FRAME_DESC_ENTRY_MAX to 8

Message ID 20210415130450.421168-25-tomi.valkeinen@ideasonboard.com
State New
Headers show
Series v4l: subdev internal routing | expand

Commit Message

Tomi Valkeinen April 15, 2021, 1:04 p.m. UTC
V4L2_FRAME_DESC_ENTRY_MAX is currently set to 4. In theory it's possible
to have an arbitrary amount of streams in a single pad, so preferably
there should be no hardcoded maximum number.

However, I believe a reasonable max is 8, which would cover a CSI-2 pad
with 4 streams of pixel data and 4 streams of metadata.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 include/media/v4l2-subdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart April 18, 2021, 7:06 p.m. UTC | #1
Hi Tomi,

Thank you for the patch.

On Thu, Apr 15, 2021 at 04:04:50PM +0300, Tomi Valkeinen wrote:
> V4L2_FRAME_DESC_ENTRY_MAX is currently set to 4. In theory it's possible

> to have an arbitrary amount of streams in a single pad, so preferably

> there should be no hardcoded maximum number.

> 

> However, I believe a reasonable max is 8, which would cover a CSI-2 pad

> with 4 streams of pixel data and 4 streams of metadata.

> 

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

> ---

>  include/media/v4l2-subdev.h | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h

> index 730631f9a091..49969d3699cb 100644

> --- a/include/media/v4l2-subdev.h

> +++ b/include/media/v4l2-subdev.h

> @@ -356,7 +356,7 @@ struct v4l2_mbus_frame_desc_entry {

>  	} bus;

>  };

>  


With

 /*
  * FIXME: If this number is too small, it should be dropped altogether and the
  * API switched to a dynamic number of frame descriptor entries.
  */

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


> -#define V4L2_FRAME_DESC_ENTRY_MAX	4

> +#define V4L2_FRAME_DESC_ENTRY_MAX	8

>  

>  enum v4l2_mbus_frame_desc_type {

>  	V4L2_MBUS_FRAME_DESC_TYPE_PLATFORM,


-- 
Regards,

Laurent Pinchart
diff mbox series

Patch

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 730631f9a091..49969d3699cb 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -356,7 +356,7 @@  struct v4l2_mbus_frame_desc_entry {
 	} bus;
 };
 
-#define V4L2_FRAME_DESC_ENTRY_MAX	4
+#define V4L2_FRAME_DESC_ENTRY_MAX	8
 
 enum v4l2_mbus_frame_desc_type {
 	V4L2_MBUS_FRAME_DESC_TYPE_PLATFORM,