From patchwork Tue Jan 19 17:30:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2485 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Tue, 19 Jan 2010 17:30:41 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Tue, 19 Jan 2010 15:36:01 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NXHua-0001bz-O8; Tue, 19 Jan 2010 17:30:40 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753850Ab0ASRaj (ORCPT + 1 other); Tue, 19 Jan 2010 12:30:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753847Ab0ASRai (ORCPT ); Tue, 19 Jan 2010 12:30:38 -0500 Received: from ms01.sssup.it ([193.205.80.99]:38104 "EHLO sssup.it" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753327Ab0ASRah (ORCPT ); Tue, 19 Jan 2010 12:30:37 -0500 Received: from [193.205.82.7] (HELO gandalf.sssup.it) by sssup.it (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 57059442; Tue, 19 Jan 2010 18:28:15 +0100 Received: from [10.30.3.179] (vpn179.retis [10.30.3.179]) by gandalf.sssup.it (8.12.10/8.12.10) with ESMTP id o0JHUYeI022535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Jan 2010 18:30:35 +0100 Message-ID: <4B55EC3A.3060308@panicking.kicks-ass.org> Date: Tue, 19 Jan 2010 18:30:34 +0100 From: Michael Trimarchi User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: "Aguirre, Sergio" CC: "linux-media@vger.kernel.org" Subject: Re: omap34xxcam question? References: <4B4F0762.4040007@panicking.kicks-ass.org> <4B4F537B.7000708@panicking.kicks-ass.org> <4B4F56C8.7060108@panicking.kicks-ass.org> <4B502982.4050508@panicking.kicks-ass.org> In-Reply-To: <4B502982.4050508@panicking.kicks-ass.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Michael Trimarchi wrote: > Aguirre, Sergio wrote: >> >>> -----Original Message----- >>> From: Michael Trimarchi [mailto:michael@panicking.kicks-ass.org] >>> Sent: Thursday, January 14, 2010 11:39 AM >>> To: Aguirre, Sergio >>> Cc: linux-media@vger.kernel.org >>> Subject: Re: omap34xxcam question? >>> >>> Aguirre, Sergio wrote: >>>>> -----Original Message----- >>>>> From: Michael Trimarchi [mailto:michael@panicking.kicks-ass.org] >>>>> Sent: Thursday, January 14, 2010 11:25 AM >>>>> To: Aguirre, Sergio >>>>> Cc: linux-media@vger.kernel.org >>>>> Subject: Re: omap34xxcam question? >>>>> >>>>> Hi, >>>>> >>>>> Aguirre, Sergio wrote: >>>>>>> -----Original Message----- >>>>>>> From: Michael Trimarchi [mailto:michael@panicking.kicks-ass.org] >>>>>>> Sent: Thursday, January 14, 2010 6:01 AM >>>>>>> To: linux-media@vger.kernel.org >>>>>>> Cc: Aguirre, Sergio >>>>>>> Subject: omap34xxcam question? >>>>>>> >>>>>>> Hi >>>>>>> >>>>>>> Is ok that it try only the first format and size? why does it not >>>>> continue >>>>>>> and find a matching? >>>>>> Actually, that was the intention, but I guess it was badly >>> implemented. >>>>>> Thanks for the catch, and the contribution! >>>>>> >>>>>> Regards, >>>>>> Sergio >>>>>>> @@ -470,7 +471,7 @@ static int try_pix_parm(struct >>> omap34xxcam_videodev >>>>>>> *vdev, >>>>>>> pix_tmp_out = *wanted_pix_out; >>>>>>> rval = isp_try_fmt_cap(isp, &pix_tmp_in, >>>>>>> &pix_tmp_out); >>>>>>> if (rval) >>>>>>> - return rval; >>>>>>> + continue; >>>>>>> >>>>> Is the patch good? or you are going to provide a better fix >>>> Yes. Sorry if I wasn't clear enough. >>>> >>>> Looks good to me, and I don't have a better fix on top of my head for >>> the moment... >>>> I'm assuming you tested it in your environment, right? >>> Ok, my enviroment is not pretty stable but for sure this is required. >>> There is one problem: >>> >>> Suppose that the camera support this format: >>> >>> YUV and RAW10 >>> >>> The video4linux enumeration is done in this order. >>> We know that if you want to use resizer and previewer we can't use >>> the YUV >>> (go straight to memory) >>> but it is selected because is the first. So maybe the best thing is to >>> find the one that is suggest in the csi >>> configuration first. Hope that is clear. >> >> Hmm.. I see. >> >> So, if I got you right, you're saying that, there should be priorities >> for sensor baseformats, depending on the preference specified >> somewhere in the boardfile? > > Yes, that is the idea. Try to provide a better patch later, I'm working > hard on the sensor part :) > Somenthing like that. michael > Michael > >> >> Regards, >> Sergio >>> Michael >>> >>>> If yes, then I'll take the patch in my queue for submission to Sakari's >>> tree. >>>> Thanks for your time. >>>> >>>> Regards, >>>> Sergio >>>> >>>>> Michael >>>>> >>>>>>> Michael >>>>>> -- >>>>>> 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 >>>>>> >>>> -- >>>> 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 >>>> >> >> -- >> 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 >> > > -- > 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 > --- 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 diff --git a/drivers/media/video/omap34xxcam.c b/drivers/media/video/omap34xxcam index 53b587e..75bd858 100644 --- a/drivers/media/video/omap34xxcam.c +++ b/drivers/media/video/omap34xxcam.c @@ -448,6 +448,10 @@ static int try_pix_parm(struct omap34xxcam_videodev *vdev, break; dev_dbg(&vdev->vfd->dev, "trying fmt %8.8x (%d)\n", fmtd.pixelformat, fmtd_index); + + if (fmtd.pixelformat != best_pix_in->pixelformat) + continue; + /* * Get supported resolutions. */ @@ -470,7 +474,7 @@ static int try_pix_parm(struct omap34xxcam_videodev *vdev, pix_tmp_out = *wanted_pix_out; rval = isp_try_fmt_cap(isp, &pix_tmp_in, &pix_tmp_out); if (rval) - return rval; + continue; dev_dbg(&vdev->vfd->dev, "this w %d\th %d\tfmt %8.8x\t"