mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-07 01:49:42 +01:00
media: videobuf2: Fix length check for single plane dmabuf queueing
Check against length in v4l2_buffer rather than vb2_buffer when the buffer is a dmabuf. This makes the single plane test the same as the existing multiplanar test. Signed-off-by: John Cox <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
1 parent
906dceb48d
commit
961d3b27a2
1 file changed
+2
-1
@@ -117,7 +117,8 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b)
|
||||
return -EINVAL;
|
||||
}
|
||||
} else {
|
||||
length = (b->memory == VB2_MEMORY_USERPTR)
|
||||
length = (b->memory == VB2_MEMORY_USERPTR ||
|
||||
b->memory == VB2_MEMORY_DMABUF)
|
||||
? b->length : vb->planes[0].length;
|
||||
|
||||
if (b->bytesused > length)
|
||||
|
||||
Reference in new issue
Block a user