[libcamera-devel,v3,06/33] v4l2: camera_proxy: Call V4L2Camera::getBufferFd() directly

Message ID 20200110193808.2266294-7-niklas.soderlund@ragnatech.se
State Superseded
Headers show
Series
  • libcamera: Rework buffer API
Related show

Commit Message

Niklas Söderlund Jan. 10, 2020, 7:37 p.m. UTC
From: Laurent Pinchart <laurent.pinchart@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@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/v4l2/v4l2_camera_proxy.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index 3c8eba6b29be4811..838cbb4bfac17dfc 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;
 	}
 
-	int fd = vcam_->invokeMethod(&V4L2Camera::getBufferFd,
-				     ConnectionTypeBlocking, index);
+	int fd = vcam_->getBufferFd(index);
 	if (fd < 0) {
 		errno = -fd;
 		return MAP_FAILED;