Skip to content

Commit

Permalink
[media] mx2_camera: Fix sizeimage computation in try_fmt()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed May 15, 2012
1 parent 9ce3ce4 commit 584943a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/mx2_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 584943a

Please sign in to comment.