From patchwork Fri Apr 8 23:57:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 6373 Return-path: Envelope-to: mchehab@pedra Delivery-date: Fri, 08 Apr 2011 23:53:28 -0300 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1Q8OIi-0001bd-3o for mchehab@pedra; Fri, 08 Apr 2011 23:53:28 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Fri, 08 Apr 2011 23:53:28 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Q8LZq-0007m9-Gy; Fri, 08 Apr 2011 23:58:58 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757982Ab1DHX6y (ORCPT + 1 other); Fri, 8 Apr 2011 19:58:54 -0400 Received: from d1.icnet.pl ([212.160.220.21]:40507 "EHLO d1.icnet.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757977Ab1DHX6x (ORCPT ); Fri, 8 Apr 2011 19:58:53 -0400 Received: from 87-205-12-81.ip.netia.com.pl ([87.205.12.81] helo=vclass.localnet) by d1.icnet.pl with asmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1Q8LZk-0005sd-Qd; Sat, 09 Apr 2011 01:58:52 +0200 From: Janusz Krzysztofik Organization: Tele-Info-System, Poznan, PL To: Linux Media Mailing List Subject: [PATCH 2.6.39] soc_camera: OMAP1: fix missing bytesperline and sizeimage initialization Date: Sat, 9 Apr 2011 01:57:38 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.36-gentoo-r5; KDE/4.4.5; i686; ; ) Cc: Guennadi Liakhovetski MIME-Version: 1.0 Message-Id: <201104090158.04827.jkrzyszt@tis.icnet.pl> X-SA-Exim-Scanned: No (on d1.icnet); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: 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 --- drivers/media/video/omap1_camera.c | 6 ++++++ 1 file changed, 6 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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; }