From patchwork Mon Jun 24 15:35:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Neuhaus X-Patchwork-Id: 19058 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1Ur8o3-0000e2-C3; Mon, 24 Jun 2013 17:35:51 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-5) with esmtp id 1Ur8o0-00019B-8o; Mon, 24 Jun 2013 17:35:51 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751377Ab3FXPfq (ORCPT + 1 other); Mon, 24 Jun 2013 11:35:46 -0400 Received: from ch1ehsobe002.messaging.microsoft.com ([216.32.181.182]:1912 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161Ab3FXPfp convert rfc822-to-8bit (ORCPT ); Mon, 24 Jun 2013 11:35:45 -0400 Received: from mail88-ch1-R.bigfish.com (10.43.68.250) by CH1EHSOBE022.bigfish.com (10.43.70.79) with Microsoft SMTP Server id 14.1.225.23; Mon, 24 Jun 2013 15:35:44 +0000 Received: from mail88-ch1 (localhost [127.0.0.1]) by mail88-ch1-R.bigfish.com (Postfix) with ESMTP id 363133A010C; Mon, 24 Jun 2013 15:35:44 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.250.181; KIP:(null); UIP:(null); IPV:NLI; H:AMSPRD0711HT002.eurprd07.prod.outlook.com; RD:none; EFVD:NLI X-SpamScore: -2 X-BigFish: PS-2(zz936eI1432Izz1f42h1ee6h1de0h1d18h1fdah1202h1e76h1d1ah1d2ah1fc6hzzz2dh2a8h668h839h947hd25hf0ah1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah1d07h1d0ch1d2eh1d3fh1de9h1dfeh1dffh1e1dh1155h) Received: from mail88-ch1 (localhost.localdomain [127.0.0.1]) by mail88-ch1 (MessageSwitch) id 137208814289283_1393; Mon, 24 Jun 2013 15:35:42 +0000 (UTC) Received: from CH1EHSMHS035.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.240]) by mail88-ch1.bigfish.com (Postfix) with ESMTP id 08AA230004C; Mon, 24 Jun 2013 15:35:42 +0000 (UTC) Received: from AMSPRD0711HT002.eurprd07.prod.outlook.com (157.56.250.181) by CH1EHSMHS035.bigfish.com (10.43.70.35) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 24 Jun 2013 15:35:41 +0000 Received: from AMSPRD0711MB532.eurprd07.prod.outlook.com ([169.254.4.80]) by AMSPRD0711HT002.eurprd07.prod.outlook.com ([10.242.14.163]) with mapi id 14.16.0324.000; Mon, 24 Jun 2013 15:35:40 +0000 From: Florian Neuhaus To: Laurent Pinchart CC: "a.andreyanau@sam-solutions.com" , Guennadi Liakhovetski , "linux-media@vger.kernel.org" Subject: AW: AW: mt9p031 shows purple coloured capture Thread-Topic: AW: mt9p031 shows purple coloured capture Thread-Index: Ac5mipwLgVQkMK7IS4qIfpObhxgj1QFx9FsAAI7JJvAAEpIQAACFdfLw Date: Mon, 24 Jun 2013 15:35:40 +0000 Message-ID: <6EE9CD707FBED24483D4CB0162E8546745F43748@AMSPRD0711MB532.eurprd07.prod.outlook.com> References: <6EE9CD707FBED24483D4CB0162E8546745F30330@AMSPRD0711MB532.eurprd07.prod.outlook.com> <3299481.jsSH8LsWuG@avalon> <6EE9CD707FBED24483D4CB0162E8546745F4216D@AMSPRD0711MB532.eurprd07.prod.outlook.com> <1843832.zr84IyNLqN@avalon> In-Reply-To: <1843832.zr84IyNLqN@avalon> Accept-Language: de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [178.198.61.220] MIME-Version: 1.0 X-OriginatorOrg: reberinformatik.ch Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.6.24.152724 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, RCVD_FROM_IP_DATE 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, WEBMAIL_XOIP 0, WEBMAIL_X_IP_HDR 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __C230066_P2 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_XOIP 0, __HAS_X_MAILING_LIST 0, __IMS_MSGID 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS ' Hi Laurent, Laurent Pinchart wrote onĀ 2013-06-22: >>>> If I use omap3isp-live to capture a stream on my beagleboard, the >>>> first time I start the app, the picture has always a green taint. >>>> The second time I start the app, the picture is good. As the camera >>>> is reset by a gpio upon device open, probably the CCDC or previewer >>>> is not initialized correctly? @Laurent: As I am unable to test it >>>> with another cam, does this also happen with your hardware or is it >>>> a problem specific to the mt9p031? >>> >>> Last time I've tested my MT9P031 sensor with the Beagleboard-xM >>> there was no such issue. >> >> If I test it with yavta, it works also from the very first start. So >> there must be an issue in my (adapted) omap3-isp-live. > > Have you tested the unmodified omap3-is-live ? I did today and indeed, with the unmodified app there is no green taint on the first start. I have now tracked down the issue to my implemented rotation on the video-out: I do a rotation by 90 or 270 degrees. So there seems to be an issue with the vrfb-rotation in omap_vout? I am already rotating the omapfb - is this a problem? omapfb.rotate=1 omapfb.vrfb=y Another possibility to rotate the captured stream? >> The color problem goes away nearly completely, if I do a power-off and >> on in the mt9p031_s_stream function. It then happens only 1 out of 10 >> times. At least an improvement ;) I have the feeling, that the CCDC >> doesn't get all data on a stream restart and that causes a buffer >> corruption. Probably the sensor doesn't start outputting from the >> beginning (even with a frame restart). >> Any ideas on this? Probably this issue is in relation with omap_vout as well. I will do more tests. Regards, Florian --- 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/videoout.c b/videoout.c index 51bed8b..627363a 100644 --- a/videoout.c +++ b/videoout.c @@ -76,6 +76,14 @@ struct videoout *vo_init(const char *devname, goto error; } + /* setup the rotation here, we have to do it BEFORE + * setting the format. */ + ret = v4l2_set_control(vo->dev, V4L2_CID_ROTATE, &rotation); + if (ret < 0){ + perror("Failed to setup rotation\n"); + goto error; + } + pixfmt.pixelformat = format->pixelformat; pixfmt.width = format->width; pixfmt.height = format->height;