summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_camera_proxy.h
diff options
context:
space:
mode:
authorVedant Paranjape <vedantparanjape160201@gmail.com>2022-01-19 11:25:12 +0530
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-01-21 16:30:19 +0200
commitb5225f00cde0f84437349955050c27d89a76e550 (patch)
treeaa4a0f7bd5f002659065e506443c38f53a072ced /src/v4l2/v4l2_camera_proxy.h
parente8137953a13c5780bad77e4bf033a359f61920c8 (diff)
v4l2: V4L2CameraProxy: Add support for PREPARE_BUF as one of the supported ioctl
Add support for PREPARE_BUF as one of the ioctl. Since this is a compat layer, there doesn't seem to be an equivalent to the "transfer ownership of the buffer to kernel driver" in V4L2Camera class. Thus, simply duplicate the checks done by vidioc_qbuf. To match the error checks done by kernel implementation, we'd have to check if dmabuf fd is valid and that the buffer size is large enough. Doing so will not add any particular value to the program as applications most likely don't depend on these conditions being handled correctly. Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/v4l2/v4l2_camera_proxy.h')
-rw-r--r--src/v4l2/v4l2_camera_proxy.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h
index a38b28c7..76ca2d8a 100644
--- a/src/v4l2/v4l2_camera_proxy.h
+++ b/src/v4l2/v4l2_camera_proxy.h
@@ -58,6 +58,7 @@ private:
int vidioc_s_input(V4L2CameraFile *file, int *arg);
int vidioc_reqbufs(V4L2CameraFile *file, struct v4l2_requestbuffers *arg);
int vidioc_querybuf(V4L2CameraFile *file, struct v4l2_buffer *arg);
+ int vidioc_prepare_buf(V4L2CameraFile *file, struct v4l2_buffer *arg);
int vidioc_qbuf(V4L2CameraFile *file, struct v4l2_buffer *arg);
int vidioc_dqbuf(V4L2CameraFile *file, struct v4l2_buffer *arg,
libcamera::Mutex *lock) LIBCAMERA_TSA_REQUIRES(*lock);