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: 2772031 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EFABA9F3A0 for ; Mon, 24 Jun 2013 15:35:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B99CD20295 for ; Mon, 24 Jun 2013 15:35:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C98320251 for ; Mon, 24 Jun 2013 15:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751377Ab3FXPfq (ORCPT ); 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-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;