This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: v4l2-compliance: clarify a create_bufs test
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Wed Jun 26 16:49:54 2024 +0200

Make the code easier to understand and improve the comments.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>
Reported-by: Jacopo Mondi <jacopo.mo...@ideasonboard.com>

 utils/v4l2-compliance/v4l2-test-buffers.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=dd7e77c6ce3d123377fda037907c08d004bb2e50
diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp 
b/utils/v4l2-compliance/v4l2-test-buffers.cpp
index 941355bc1dfe..3d09b6c7b331 100644
--- a/utils/v4l2-compliance/v4l2-test-buffers.cpp
+++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp
@@ -879,10 +879,12 @@ int testReqBufs(struct node *node)
                                }
 
                                if (fmt.g_num_planes() < VIDEO_MAX_PLANES) {
-                                       // Add an extra plane, but with size 0
+                                       // Add an extra plane, but with size 0. 
The vb2
+                                       // framework should test for this.
                                        fmt.s_num_planes(fmt.g_num_planes() + 
1);
                                        fmt.s_sizeimage(0, fmt.g_num_planes() - 
1);
                                        fail_on_test(q.create_bufs(node, 1, 
&fmt) != EINVAL);
+                                       node->g_fmt(fmt, q.g_type());
 
                                        // This test is debatable: should we 
allow CREATE_BUFS
                                        // to create buffers with more planes 
than required
@@ -891,6 +893,10 @@ int testReqBufs(struct node *node)
                                        // For now disallow this. If there is a 
really good
                                        // reason for allowing this, then that 
should be
                                        // documented and carefully tested.
+                                       //
+                                       // It is the driver in queue_setup that 
has to check
+                                       // this.
+                                       fmt.s_num_planes(fmt.g_num_planes() + 
1);
                                        fmt.s_sizeimage(65536, 
fmt.g_num_planes() - 1);
                                        fail_on_test(q.create_bufs(node, 1, 
&fmt) != EINVAL);
                                        node->g_fmt(fmt, q.g_type());

Reply via email to