Message ID | 201011021714.37544.jkrzyszt@tis.icnet.pl (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-path: <mchehab@gaivota> Envelope-to: mchehab@gaivota Delivery-date: Tue, 02 Nov 2010 14:22:59 -0400 Received: from mchehab by gaivota with local (Exim 4.72) (envelope-from <mchehab@gaivota>) id 1PDLVb-0000rp-Ml for mchehab@gaivota; Tue, 02 Nov 2010 14:22:59 -0400 Received: from casper.infradead.org [85.118.1.10] by gaivota with IMAP (fetchmail-6.3.17) for <mchehab@localhost> (single-drop); Tue, 02 Nov 2010 14:22:59 -0400 (EDT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PDJVu-00085F-7e; Tue, 02 Nov 2010 16:15:10 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753732Ab0KBQPI (ORCPT <rfc822; kmpark@infradead.org> + 1 other); Tue, 2 Nov 2010 12:15:08 -0400 Received: from d1.icnet.pl ([212.160.220.21]:35736 "EHLO d1.icnet.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751596Ab0KBQPH (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 2 Nov 2010 12:15:07 -0400 Received: from 87-205-12-81.ip.netia.com.pl ([87.205.12.81] helo=vclass.intranet) by d1.icnet.pl with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1PDJVq-0006xC-At; Tue, 02 Nov 2010 17:15:06 +0100 From: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Organization: Tele-Info-System, Poznan, PL To: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Subject: [PATCH] SoC Camera: ov6650: minor cleanups Date: Tue, 2 Nov 2010 17:14:36 +0100 User-Agent: KMail/1.9.10 Cc: Linux Media Mailing List <linux-media@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201011021714.37544.jkrzyszt@tis.icnet.pl> X-SA-Exim-Scanned: No (on d1.icnet); SAEximRunCond expanded to false Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org Sender: Mauro Carvalho Chehab <mchehab@gaivota> |
Commit Message
Janusz Krzysztofik
Nov. 2, 2010, 4:14 p.m. UTC
This is a followup patch that addresses two minor issues left in the recently
added ov6650 sensor driver, as I've promised to the subsystem maintainer:
- remove a pair of extra brackets,
- drop useless case for not possible v4l2_mbus_pixelcode enum value of 0.
Created against linux-2.6.37-rc1.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
drivers/media/video/ov6650.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--
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
Comments
Hi Janusz On Tue, 2 Nov 2010, Janusz Krzysztofik wrote: > This is a followup patch that addresses two minor issues left in the recently > added ov6650 sensor driver, as I've promised to the subsystem maintainer: > - remove a pair of extra brackets, > - drop useless case for not possible v4l2_mbus_pixelcode enum value of 0. > > Created against linux-2.6.37-rc1. > > Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Applied together with other your 3 patches and pushed for 2.6.37-rc2. Thanks Guennadi > --- > > drivers/media/video/ov6650.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > --- linux-2.6.37-rc1/drivers/media/video/ov6650.c.orig 2010-11-01 22:41:59.000000000 +0100 > +++ linux-2.6.37-rc1/drivers/media/video/ov6650.c 2010-11-02 16:56:49.000000000 +0100 > @@ -754,7 +754,7 @@ static int ov6650_g_fmt(struct v4l2_subd > > static bool is_unscaled_ok(int width, int height, struct v4l2_rect *rect) > { > - return (width > rect->width >> 1 || height > rect->height >> 1); > + return width > rect->width >> 1 || height > rect->height >> 1; > } > > static u8 to_clkrc(struct v4l2_fract *timeperframe, > @@ -840,8 +840,6 @@ static int ov6650_s_fmt(struct v4l2_subd > coma_mask |= COMA_BW | COMA_BYTE_SWAP | COMA_WORD_SWAP; > coma_set |= COMA_RAW_RGB | COMA_RGB; > break; > - case 0: > - break; > default: > dev_err(&client->dev, "Pixel format not handled: 0x%x\n", code); > return -EINVAL; > --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- 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
Monday 08 November 2010 22:20:33 Guennadi Liakhovetski wrote: > On Tue, 2 Nov 2010, Janusz Krzysztofik wrote: > > This is a followup patch that addresses two minor issues left in the > > recently added ov6650 sensor driver, as I've promised to the subsystem > > maintainer: > > - remove a pair of extra brackets, > > - drop useless case for not possible v4l2_mbus_pixelcode enum value of 0. > > > > Created against linux-2.6.37-rc1. > > > > Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> > > Applied together with other your 3 patches and pushed for 2.6.37-rc2. Hi Guennadi, Thanks for taking my fixes. Thursday 30 September 2010 13:35:49 Janusz Krzysztofik wrote: > There are still two SG mode specific corner cases to be corrected, > previously not detected because of poor sensor driver functionality: 1) > frame size not exceeding one page, resulting in "unexpected end of frame" > message and capture restart every frame, and 2) last sgbuf lenght less than > bytes_per_line, resulting in unstable picture. I'm going to address those > two with fixes. Since both issues don't affect typical usage (one of standard resolutions) and both are videobuf-sg related, I'm wondering if I should better wait for videobuf2 and try to port my driver instead of making things still more complicated than they already are. What do you think? Thanks, Janusz -- 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
On Sat, 13 Nov 2010, Janusz Krzysztofik wrote: > Thursday 30 September 2010 13:35:49 Janusz Krzysztofik wrote: > > There are still two SG mode specific corner cases to be corrected, > > previously not detected because of poor sensor driver functionality: 1) > > frame size not exceeding one page, resulting in "unexpected end of frame" > > message and capture restart every frame, and 2) last sgbuf lenght less than > > bytes_per_line, resulting in unstable picture. I'm going to address those > > two with fixes. > > Since both issues don't affect typical usage (one of standard resolutions) and > both are videobuf-sg related, I'm wondering if I should better wait for > videobuf2 and try to port my driver instead of making things still more > complicated than they already are. What do you think? Well, I _would_ say: restrict the driver to avoid those corner cases. I.e., add a test to omap1_cam_set_fmt() and / or omap1_cam_set_crop() in SG case to verify, that the frame is at least one page large and that the lasg sgbuf is large enough. If this is not the case adjust the frame to satisfy these restrictions. But the problem is - at S_FMT / S_CROP time you don't know yet, whether you're going to use SG. I haven't studied videobuf2 in enough detail to understand, why and how it would help you? Isn't this a principal problem with your SG implementation? Maybe we should take this as yet one more argument against your "emulated sg" mode and remove it completely from the driver, relying on contiguous video buffers, selecting and implementing some boot-time memory reservation, and, possibly, adding the omap1 camera driver to the list of other drivers, waiting to break down again with 2.6.37, unless the "conflicting mapping mode" problem on ARM gets resolved before then? Also, please, move use_sg inside struct omap1_cam_dev. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- 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.37-rc1/drivers/media/video/ov6650.c.orig 2010-11-01 22:41:59.000000000 +0100 +++ linux-2.6.37-rc1/drivers/media/video/ov6650.c 2010-11-02 16:56:49.000000000 +0100 @@ -754,7 +754,7 @@ static int ov6650_g_fmt(struct v4l2_subd static bool is_unscaled_ok(int width, int height, struct v4l2_rect *rect) { - return (width > rect->width >> 1 || height > rect->height >> 1); + return width > rect->width >> 1 || height > rect->height >> 1; } static u8 to_clkrc(struct v4l2_fract *timeperframe, @@ -840,8 +840,6 @@ static int ov6650_s_fmt(struct v4l2_subd coma_mask |= COMA_BW | COMA_BYTE_SWAP | COMA_WORD_SWAP; coma_set |= COMA_RAW_RGB | COMA_RGB; break; - case 0: - break; default: dev_err(&client->dev, "Pixel format not handled: 0x%x\n", code); return -EINVAL;