mbox series

[v6,0/4] v4l2-compliance: Add tests for DELETE_BUFS

Message ID 20231107104132.445705-1-benjamin.gaignard@collabora.com
Headers show
Series v4l2-compliance: Add tests for DELETE_BUFS | expand

Message

Benjamin Gaignard Nov. 7, 2023, 10:41 a.m. UTC
Before being able to add VIDIOC_DELETE_BUFS ioctl, it was needed
to change how v4l2 queues store buffers and how many of them they
can store. That led to add max_num_buffers field into 
v4l2_create_buffers struct.
This series add tests for this new field and VIDIOC_DELETE_BUFS ioctl.

version 6:
- fix compilation issue in "v4l2-compliance: Test queue maximum buffers allocation"

version 5:
- change g_max_buffers() to g_max_num_buffers().
- change v4l_queue_g_max_buffers() to v4l_queue_g_max_num_buffers().
- rename struct v4l_queue max_buffers field to max_num_buffers.
- fix V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS name in bufcap_def array.
- add V4L2_BUF_CAP_SUPPORTS_DELETE_BUFS in bufcap_def array.
- only test MMAP streaming mode.
- rework test code.

Benjamin Gaignard (4):
  v4l-utils: Add max_num_buffers field to v4l2_create_buffers struct
  v4l2-compliance: Test queue maximum buffers allocation
  v4l2-utils: Add VIDIOC_DELETE_BUFS ioctl
  v4l2-compliance: Add a test for DELETE_BUFS ioctl

 include/linux/videodev2.h                   |  23 +++-
 utils/common/cv4l-helpers.h                 |   5 +
 utils/common/v4l-helpers.h                  |  22 ++++
 utils/common/v4l2-info.cpp                  |   2 +
 utils/v4l2-compliance/v4l2-compliance.cpp   |   2 +
 utils/v4l2-compliance/v4l2-compliance.h     |   2 +
 utils/v4l2-compliance/v4l2-test-buffers.cpp | 122 ++++++++++++++++++++
 7 files changed, 177 insertions(+), 1 deletion(-)