diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-03-21 07:03:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-15 15:07:12 -0400 |
commit | 584943aa0692fea9ec3356c7d4677dd7a225cdef (patch) | |
tree | 2bcf2cee154013bb59f2ce6a2256d834df2660e1 /drivers/media/video | |
parent | 9ce3ce4d4a8dc80b2a2265650be54a86e854561e (diff) |
[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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/mx2_camera.c | 1 |
1 files changed, 1 insertions, 0 deletions
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, | |||
1416 | pix->bytesperline = soc_mbus_bytes_per_line(pix->width, | 1416 | pix->bytesperline = soc_mbus_bytes_per_line(pix->width, |
1417 | xlate->host_fmt); | 1417 | xlate->host_fmt); |
1418 | BUG_ON(pix->bytesperline < 0); | 1418 | BUG_ON(pix->bytesperline < 0); |
1419 | pix->sizeimage = pix->height * pix->bytesperline; | ||
1419 | } | 1420 | } |
1420 | } | 1421 | } |
1421 | 1422 | ||