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: fix USERPTR test if PREPARE_BUF is not supported
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Sun Jul 28 16:00:38 2019 +0200

If the driver under test does not support VIDIOC_PREPARE_BUF, then
the USERPTR streaming test will fail since length of the buffer was
zeroed. But that should only be done if PREPARE_BUF was supported,
so move the code that zeroes length, bytesused and userptr under
the 'if (ret == 0)' (the VIDIOC_PREPARE_BUF return code).

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 utils/v4l2-compliance/v4l2-test-buffers.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=f17d23f7a1fb0735f1d07d984ee9ab10e544efa5
diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp 
b/utils/v4l2-compliance/v4l2-test-buffers.cpp
index 8fd5165c1db2..fefe3e7b5669 100644
--- a/utils/v4l2-compliance/v4l2-test-buffers.cpp
+++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp
@@ -1488,11 +1488,11 @@ static int setupUserPtr(struct node *node, cv4l_queue 
&q)
                        if (ret == 0) {
                                fail_on_test(buf.querybuf(node, i));
                                fail_on_test(buf.check(q, Prepared, i));
-                       }
-                       for (unsigned p = 0; p < buf.g_num_planes(); p++) {
-                               buf.s_userptr(0UL, p);
-                               buf.s_bytesused(0, p);
-                               buf.s_length(0, p);
+                               for (unsigned p = 0; p < buf.g_num_planes(); 
p++) {
+                                       buf.s_userptr(0UL, p);
+                                       buf.s_bytesused(0, p);
+                                       buf.s_length(0, p);
+                               }
                        }
                }
                if (ret == ENOTTY) {

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to