[v1,1/1] staging: media: imx: imx7-media-csi: Increase video mem limit

Message ID 20220709073100.158374-2-petko.manolov@konsulko.com (mailing list archive)
State Accepted
Delegated to: Hans Verkuil
Headers
Series staging: media: imx: imx7-media-csi: Increase video mem limit |

Commit Message

Petko Manolov July 9, 2022, 7:31 a.m. UTC
  Some high resolution (like Sony IMX492 47Mpix) sensors requre large amount space
for buffering.  64MB is far from sufficient so this patch increases the limit to
512MB.

Signed-off-by: Petko Manolov <petko.manolov@konsulko.com>
---
 drivers/staging/media/imx/imx7-media-csi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Laurent Pinchart July 11, 2022, 10:43 p.m. UTC | #1
Hi Petko,

Thank you for the patch.

On Sat, Jul 09, 2022 at 10:31:00AM +0300, Petko Manolov wrote:
> Some high resolution (like Sony IMX492 47Mpix) sensors requre large amount space
> for buffering.  64MB is far from sufficient so this patch increases the limit to
> 512MB.
> 
> Signed-off-by: Petko Manolov <petko.manolov@konsulko.com>
> ---
>  drivers/staging/media/imx/imx7-media-csi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c
> index 0066af8d111f..c62f893cd769 100644
> --- a/drivers/staging/media/imx/imx7-media-csi.c
> +++ b/drivers/staging/media/imx/imx7-media-csi.c
> @@ -160,7 +160,7 @@
>  
>  #define IMX7_CSI_VIDEO_NAME		"imx-capture"
>  /* In bytes, per queue */
> -#define IMX7_CSI_VIDEO_MEM_LIMIT	SZ_64M
> +#define IMX7_CSI_VIDEO_MEM_LIMIT	SZ_512M

The limit is really something that the V4L2 core should handle (or
assist with). In the meantime,

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

>  #define IMX7_CSI_VIDEO_EOF_TIMEOUT	2000
>  
>  #define IMX7_CSI_DEF_MBUS_CODE		MEDIA_BUS_FMT_UYVY8_2X8
  
Petko Manolov July 12, 2022, 4:10 a.m. UTC | #2
On 22-07-12 01:43:40, Laurent Pinchart wrote:
> Hi Petko,
> 
> Thank you for the patch.
> 
> On Sat, Jul 09, 2022 at 10:31:00AM +0300, Petko Manolov wrote:
> > Some high resolution (like Sony IMX492 47Mpix) sensors requre large amount space
> > for buffering.  64MB is far from sufficient so this patch increases the limit to
> > 512MB.
> > 
> > Signed-off-by: Petko Manolov <petko.manolov@konsulko.com>
> > ---
> >  drivers/staging/media/imx/imx7-media-csi.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c
> > index 0066af8d111f..c62f893cd769 100644
> > --- a/drivers/staging/media/imx/imx7-media-csi.c
> > +++ b/drivers/staging/media/imx/imx7-media-csi.c
> > @@ -160,7 +160,7 @@
> >  
> >  #define IMX7_CSI_VIDEO_NAME		"imx-capture"
> >  /* In bytes, per queue */
> > -#define IMX7_CSI_VIDEO_MEM_LIMIT	SZ_64M
> > +#define IMX7_CSI_VIDEO_MEM_LIMIT	SZ_512M
> 
> The limit is really something that the V4L2 core should handle (or assist
> with). In the meantime,

Thanks for the review.

This "limit" isn't actually a limit, but a constant used in very few
calculations. Perhaps this is a number that will be better handled by more
knowledgeable part of the system.


		Petko


> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> >  #define IMX7_CSI_VIDEO_EOF_TIMEOUT	2000
> >  
> >  #define IMX7_CSI_DEF_MBUS_CODE		MEDIA_BUS_FMT_UYVY8_2X8
> 
> -- 
> Regards,
> 
> Laurent Pinchart
  

Patch

diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c
index 0066af8d111f..c62f893cd769 100644
--- a/drivers/staging/media/imx/imx7-media-csi.c
+++ b/drivers/staging/media/imx/imx7-media-csi.c
@@ -160,7 +160,7 @@ 
 
 #define IMX7_CSI_VIDEO_NAME		"imx-capture"
 /* In bytes, per queue */
-#define IMX7_CSI_VIDEO_MEM_LIMIT	SZ_64M
+#define IMX7_CSI_VIDEO_MEM_LIMIT	SZ_512M
 #define IMX7_CSI_VIDEO_EOF_TIMEOUT	2000
 
 #define IMX7_CSI_DEF_MBUS_CODE		MEDIA_BUS_FMT_UYVY8_2X8