public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.39] soc_camera: OMAP1: fix missing bytesperline and sizeimage initialization
@ 2011-04-08 23:57 Janusz Krzysztofik
  2011-04-10 16:00 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 11+ messages in thread
From: Janusz Krzysztofik @ 2011-04-08 23:57 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Guennadi Liakhovetski

Since commit 0e4c180d3e2cc11e248f29d4c604b6194739d05a, bytesperline and 
sizeimage memebers of v4l2_pix_format structure have no longer been 
calculated inside soc_camera_g_fmt_vid_cap(), but rather passed via 
soc_camera_device structure from a host driver callback invoked by 
soc_camera_set_fmt().

OMAP1 camera host driver has never been providing these parameters, so 
it no longer works correctly. Fix it by adding suitable assignments to 
omap1_cam_set_fmt().

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
 drivers/media/video/omap1_camera.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- linux-2.6.39-rc2/drivers/media/video/omap1_camera.c.orig	2011-04-06 14:30:37.000000000 +0200
+++ linux-2.6.39-rc2/drivers/media/video/omap1_camera.c	2011-04-09 00:16:36.000000000 +0200
@@ -1292,6 +1292,12 @@ static int omap1_cam_set_fmt(struct soc_
 	pix->colorspace  = mf.colorspace;
 	icd->current_fmt = xlate;
 
+	pix->bytesperline = soc_mbus_bytes_per_line(pix->width,
+						    xlate->host_fmt);
+	if (pix->bytesperline < 0)
+		return pix->bytesperline;
+	pix->sizeimage = pix->height * pix->bytesperline;
+
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-04-12  8:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 23:57 [PATCH 2.6.39] soc_camera: OMAP1: fix missing bytesperline and sizeimage initialization Janusz Krzysztofik
2011-04-10 16:00 ` Guennadi Liakhovetski
2011-04-10 22:00   ` Janusz Krzysztofik
2011-04-10 22:46     ` Guennadi Liakhovetski
2011-04-11  9:02     ` Guennadi Liakhovetski
2011-04-12  2:26   ` Kassey Lee
2011-04-12  6:28     ` Guennadi Liakhovetski
2011-04-12  7:57       ` Sylwester Nawrocki
     [not found]       ` <BANLkTimc_3wcLMP116B+BkGdJaapZSVkpw@mail.gmail.com>
2011-04-12  8:06         ` Kassey Lee
2011-04-12  8:24           ` Guennadi Liakhovetski
2011-04-12  8:41             ` Kassey Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox