If the VIDIOC_QBUF ioctl fails due a wrong dmabuf length, it's
useful to get the invalid and minimum lengths as a debug info.
Before this patch:
vb2-core: __qbuf_dmabuf: invalid dmabuf length for plane 1
After this patch:
vb2-core: __qbuf_dmabuf: invalid dmabuf length 221248 for plane 1, minimum length 410880
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
planes[plane].length = dbuf->size;
if (planes[plane].length < vb->planes[plane].min_length) {
- dprintk(1, "invalid dmabuf length for plane %d\n",
- plane);
+ dprintk(1, "invalid dmabuf length %u for plane %d, "
+ "minimum length %u\n",
+ planes[plane].length, plane,
+ vb->planes[plane].min_length);
dma_buf_put(dbuf);
ret = -EINVAL;
goto err;