[media] mx2_camera: Fix sizeimage computation in try_fmt()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 21 Mar 2012 11:03:20 +0000 (08:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 15 May 2012 19:07:12 +0000 (16:07 -0300)
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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mx2_camera.c

index 7c3c0e8eda4275cf3bbeb6d684d2bc94096ccaa2..36d17f3483ebccd6e20c6a511c510edf30d715a4 100644 (file)
@@ -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;
                }
        }
 
This page took 0.044713 seconds and 5 git commands to generate.