[libcamera-devel] [PATCH v4 06/32] v4l2: camera_proxy: Call V4L2Camera::getBufferFd() directly

Niklas Söderlund niklas.soderlund at ragnatech.se
Sun Jan 12 02:01:46 CET 2020


From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

The V4L2Camera::getBufferFd() method doesn't need to run in the camera
thread. Call it directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
 src/v4l2/v4l2_camera_proxy.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index b4a9e2107c0f9f28..e4aba33e6d33f21b 100644
--- a/src/v4l2/v4l2_camera_proxy.cpp
+++ b/src/v4l2/v4l2_camera_proxy.cpp
@@ -92,8 +92,7 @@ void *V4L2CameraProxy::mmap(void *addr, size_t length, int prot, int flags,
 		return MAP_FAILED;
 	}
 
-	FileDescriptor fd = vcam_->invokeMethod(&V4L2Camera::getBufferFd,
-						ConnectionTypeBlocking, index);
+	FileDescriptor fd = vcam_->getBufferFd(index);
 	if (!fd.isValid()) {
 		errno = EINVAL;
 		return MAP_FAILED;
-- 
2.24.1



More information about the libcamera-devel mailing list