| Message ID | 20261019020229.1817327-1-ragaprasanth@gmail.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
Quoting Prasanth R (2026-10-19 03:02:29) > Commit b5225f0 added VIDIOC_PREPARE_BUF to the supported ioctls, > but did not add it to the switch casr. s/casr/case/ > Add the missing case. > > Fixes: b5225f0 If you add this into your ~/.gitconfig: [alias] fixes = show -s --format='Fixes: %h (\"%s\")' --abbrev=12 you can run "git fixes b5225f0" and get a well formatted fix string: kbingham@Monstersaurus:~/iob/libcamera/libcamera$ git fixes b5225f0 Fixes: b5225f00cde0 ("v4l2: V4L2CameraProxy: Add support for PREPARE_BUF as one of the supported ioctl") > > Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp> > --- > src/v4l2/v4l2_camera_proxy.cpp | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp > index 7f8522d5e..011f6e586 100644 > --- a/src/v4l2/v4l2_camera_proxy.cpp > +++ b/src/v4l2/v4l2_camera_proxy.cpp > @@ -997,6 +997,9 @@ int V4L2CameraProxy::ioctl(V4L2CameraFile *file, unsigned long longRequest, void > case VIDIOC_QUERYBUF: > ret = vidioc_querybuf(file, static_cast<struct v4l2_buffer *>(arg)); > break; > + case VIDIOC_PREPARE_BUF: > + ret = vidioc_prepare_buf(file, static_cast<struct v4l2_buffer *>(arg)); > + break; > case VIDIOC_QBUF: > ret = vidioc_qbuf(file, static_cast<struct v4l2_buffer *>(arg)); > break; > -- > 2.34.1 >
Hi Kieran, Sure, I will use that hereby, Do I need to recreate this patch? Thanks, Prasanth R On Mon, 19 Oct, 2026, 4:58 pm Kieran Bingham, < kieran.bingham@ideasonboard.com> wrote: > Quoting Prasanth R (2026-10-19 03:02:29) > > Commit b5225f0 added VIDIOC_PREPARE_BUF to the supported ioctls, > > but did not add it to the switch casr. > > s/casr/case/ > > > Add the missing case. > > > > Fixes: b5225f0 > > If you add this into your ~/.gitconfig: > > [alias] > fixes = show -s --format='Fixes: %h (\"%s\")' --abbrev=12 > > > you can run "git fixes b5225f0" and get a well formatted fix string: > > kbingham@Monstersaurus:~/iob/libcamera/libcamera$ git fixes b5225f0 > Fixes: b5225f00cde0 ("v4l2: V4L2CameraProxy: Add support for PREPARE_BUF > as one of the supported ioctl") > > > > > > Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp> > > --- > > src/v4l2/v4l2_camera_proxy.cpp | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/src/v4l2/v4l2_camera_proxy.cpp > b/src/v4l2/v4l2_camera_proxy.cpp > > index 7f8522d5e..011f6e586 100644 > > --- a/src/v4l2/v4l2_camera_proxy.cpp > > +++ b/src/v4l2/v4l2_camera_proxy.cpp > > @@ -997,6 +997,9 @@ int V4L2CameraProxy::ioctl(V4L2CameraFile *file, > unsigned long longRequest, void > > case VIDIOC_QUERYBUF: > > ret = vidioc_querybuf(file, static_cast<struct > v4l2_buffer *>(arg)); > > break; > > + case VIDIOC_PREPARE_BUF: > > + ret = vidioc_prepare_buf(file, static_cast<struct > v4l2_buffer *>(arg)); > > + break; > > case VIDIOC_QBUF: > > ret = vidioc_qbuf(file, static_cast<struct v4l2_buffer > *>(arg)); > > break; > > -- > > 2.34.1 > > >
On Mon, Oct 19, 2026 at 06:34:15PM +0900, Prasanth Ramesh wrote: > Hi Kieran, > > Sure, I will use that hereby, > > Do I need to recreate this patch? I suppose the Fixes tag can be fixed when applying. I'm more concerned about how your patch ended up using a 7 characters hash. How did that come to be, would there be any documentation improvements that would have helped ? > On Mon, 19 Oct, 2026, 4:58 pm Kieran Bingham wrote: > > Quoting Prasanth R (2026-10-19 03:02:29) > > > Commit b5225f0 added VIDIOC_PREPARE_BUF to the supported ioctls, > > > but did not add it to the switch casr. > > > > s/casr/case/ > > > > > Add the missing case. > > > > > > Fixes: b5225f0 > > > > If you add this into your ~/.gitconfig: > > > > [alias] > > fixes = show -s --format='Fixes: %h (\"%s\")' --abbrev=12 > > > > > > you can run "git fixes b5225f0" and get a well formatted fix string: > > > > kbingham@Monstersaurus:~/iob/libcamera/libcamera$ git fixes b5225f0 > > Fixes: b5225f00cde0 ("v4l2: V4L2CameraProxy: Add support for PREPARE_BUF > > as one of the supported ioctl") > > > > > Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp> > > > --- > > > src/v4l2/v4l2_camera_proxy.cpp | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/src/v4l2/v4l2_camera_proxy.cpp > > b/src/v4l2/v4l2_camera_proxy.cpp > > > index 7f8522d5e..011f6e586 100644 > > > --- a/src/v4l2/v4l2_camera_proxy.cpp > > > +++ b/src/v4l2/v4l2_camera_proxy.cpp > > > @@ -997,6 +997,9 @@ int V4L2CameraProxy::ioctl(V4L2CameraFile *file, unsigned long longRequest, void > > > case VIDIOC_QUERYBUF: > > > ret = vidioc_querybuf(file, static_cast<struct v4l2_buffer *>(arg)); > > > break; > > > + case VIDIOC_PREPARE_BUF: > > > + ret = vidioc_prepare_buf(file, static_cast<struct v4l2_buffer *>(arg)); > > > + break; There's more that needs to be fixed. V4L2CameraProxy::vidioc_qbuf() doesn't set the V4L2_BUF_FLAG_PREPARED flag, and V4L2CameraProxy::vidioc_streamoff() doesn't clear it. That seems to be wrong (a second opinion would be good though). Would you fix that in a v2 ? > > > case VIDIOC_QBUF: > > > ret = vidioc_qbuf(file, static_cast<struct v4l2_buffer *>(arg)); > > > break;
Hi Laurent, I manually wrote that hash, and I'm not familiar with Git that fixes. I usually use the first 6 or 7 characters of the hash to represent the commits. 'll make sure to use the fixes from now on. My bad! Thanks, Prasanth R On Mon, Oct 19, 2026 at 8:59 PM Laurent Pinchart < laurent.pinchart@ideasonboard.com> wrote: > On Mon, Oct 19, 2026 at 06:34:15PM +0900, Prasanth Ramesh wrote: > > Hi Kieran, > > > > Sure, I will use that hereby, > > > > Do I need to recreate this patch? > > I suppose the Fixes tag can be fixed when applying. I'm more concerned > about how your patch ended up using a 7 characters hash. How did that > come to be, would there be any documentation improvements that would > have helped ? > > > On Mon, 19 Oct, 2026, 4:58 pm Kieran Bingham wrote: > > > Quoting Prasanth R (2026-10-19 03:02:29) > > > > Commit b5225f0 added VIDIOC_PREPARE_BUF to the supported ioctls, > > > > but did not add it to the switch casr. > > > > > > s/casr/case/ > > > > > > > Add the missing case. > > > > > > > > Fixes: b5225f0 > > > > > > If you add this into your ~/.gitconfig: > > > > > > [alias] > > > fixes = show -s --format='Fixes: %h (\"%s\")' --abbrev=12 > > > > > > > > > you can run "git fixes b5225f0" and get a well formatted fix string: > > > > > > kbingham@Monstersaurus:~/iob/libcamera/libcamera$ git fixes b5225f0 > > > Fixes: b5225f00cde0 ("v4l2: V4L2CameraProxy: Add support for > PREPARE_BUF > > > as one of the supported ioctl") > > > > > > > Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp> > > > > --- > > > > src/v4l2/v4l2_camera_proxy.cpp | 3 +++ > > > > 1 file changed, 3 insertions(+) > > > > > > > > diff --git a/src/v4l2/v4l2_camera_proxy.cpp > > > b/src/v4l2/v4l2_camera_proxy.cpp > > > > index 7f8522d5e..011f6e586 100644 > > > > --- a/src/v4l2/v4l2_camera_proxy.cpp > > > > +++ b/src/v4l2/v4l2_camera_proxy.cpp > > > > @@ -997,6 +997,9 @@ int V4L2CameraProxy::ioctl(V4L2CameraFile *file, > unsigned long longRequest, void > > > > case VIDIOC_QUERYBUF: > > > > ret = vidioc_querybuf(file, static_cast<struct > v4l2_buffer *>(arg)); > > > > break; > > > > + case VIDIOC_PREPARE_BUF: > > > > + ret = vidioc_prepare_buf(file, static_cast<struct > v4l2_buffer *>(arg)); > > > > + break; > > There's more that needs to be fixed. V4L2CameraProxy::vidioc_qbuf() > doesn't set the V4L2_BUF_FLAG_PREPARED flag, and > V4L2CameraProxy::vidioc_streamoff() doesn't clear it. That seems to be > wrong (a second opinion would be good though). > > Would you fix that in a v2 ? > > > > > case VIDIOC_QBUF: > > > > ret = vidioc_qbuf(file, static_cast<struct > v4l2_buffer *>(arg)); > > > > break; > > -- > Regards, > > Laurent Pinchart >
diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp index 7f8522d5e..011f6e586 100644 --- a/src/v4l2/v4l2_camera_proxy.cpp +++ b/src/v4l2/v4l2_camera_proxy.cpp @@ -997,6 +997,9 @@ int V4L2CameraProxy::ioctl(V4L2CameraFile *file, unsigned long longRequest, void case VIDIOC_QUERYBUF: ret = vidioc_querybuf(file, static_cast<struct v4l2_buffer *>(arg)); break; + case VIDIOC_PREPARE_BUF: + ret = vidioc_prepare_buf(file, static_cast<struct v4l2_buffer *>(arg)); + break; case VIDIOC_QBUF: ret = vidioc_qbuf(file, static_cast<struct v4l2_buffer *>(arg)); break;
Commit b5225f0 added VIDIOC_PREPARE_BUF to the supported ioctls, but did not add it to the switch casr. Add the missing case. Fixes: b5225f0 Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp> --- src/v4l2/v4l2_camera_proxy.cpp | 3 +++ 1 file changed, 3 insertions(+)