From 584943aa0692fea9ec3356c7d4677dd7a225cdef Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 21 Mar 2012 08:03:20 -0300 Subject: [PATCH] [media] mx2_camera: Fix sizeimage computation in try_fmt() The try_fmt() handler restricts the image width based on the hardware limits and updates the bytesperline value, but doesn't update sizeimage. Fix it. Signed-off-by: Laurent Pinchart Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/mx2_camera.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 7c3c0e8eda42..36d17f3483eb 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -1416,6 +1416,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, pix->bytesperline = soc_mbus_bytes_per_line(pix->width, xlate->host_fmt); BUG_ON(pix->bytesperline < 0); + pix->sizeimage = pix->height * pix->bytesperline; } } -- 2.20.1