From 1fa89647941384a5b53cfb2e4e9430b5fd72b50d Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 15 Dec 2020 14:51:55 +0000 Subject: [PATCH] Revert "media: videobuf2: Fix length check for single plane dmabuf queueing" This reverts commit 961d3b27a2aff52dda0b97d35085a743a27c2f46. The updated length check for dmabuf types broke existing usage in v4l2 userland clients. Signed-off-by: Naushir Patuck --- drivers/media/common/videobuf2/videobuf2-v4l2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c index 96d3b2b..3f61f58 100644 --- a/drivers/media/common/videobuf2/videobuf2-v4l2.c +++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c @@ -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) -- 2.7.4