Revert "media: videobuf2: Fix length check for single plane dmabuf queueing"
authorNaushir Patuck <naush@raspberrypi.com>
Tue, 15 Dec 2020 14:51:55 +0000 (14:51 +0000)
committerpopcornmix <popcornmix@gmail.com>
Wed, 27 Jan 2021 19:13:27 +0000 (19:13 +0000)
This reverts commit 961d3b27a2aff52dda0b97d35085a743a27c2f46.

The updated length check for dmabuf types broke existing usage in v4l2
userland clients.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
drivers/media/common/videobuf2/videobuf2-v4l2.c

index 96d3b2b..3f61f58 100644 (file)
@@ -118,8 +118,7 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b)
                                return -EINVAL;
                }
        } else {
-               length = (b->memory == VB2_MEMORY_USERPTR ||
-                         b->memory == VB2_MEMORY_DMABUF)
+               length = (b->memory == VB2_MEMORY_USERPTR)
                        ? b->length : vb->planes[0].length;
 
                if (b->bytesused > length)