[libcamera-devel] [PATCH] libcamera: v4l2_videodevice: remove confusing memory MMAP assignment before QUERYBUF

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Feb 4 00:17:40 CET 2021


Hi Helen,

Thank you for the patch.

On Wed, Feb 03, 2021 at 11:29:55AM -0300, Helen Koike wrote:
> QUERYBUF doesn't require the memory field to be pre-filled.
> Also, V4L2VideoDevice::createBuffer uses dmabuf file descriptors, thus
> using V4L2_MEMORY_MMAP makes things confusing, so remove it.
> 
> Signed-off-by: Helen Koike <helen.koike at collabora.com>

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

> ---
>  src/libcamera/v4l2_videodevice.cpp | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
> index a9509bff..c77e1aff 100644
> --- a/src/libcamera/v4l2_videodevice.cpp
> +++ b/src/libcamera/v4l2_videodevice.cpp
> @@ -1255,7 +1255,6 @@ std::unique_ptr<FrameBuffer> V4L2VideoDevice::createBuffer(unsigned int index)
>  
>  	buf.index = index;
>  	buf.type = bufferType_;
> -	buf.memory = V4L2_MEMORY_MMAP;
>  	buf.length = std::size(v4l2Planes);
>  	buf.m.planes = v4l2Planes;
>  

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list