Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 584943aa authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9ce3ce4d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
		}
	}