From patchwork Tue Jul 9 14:25:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Neuhaus X-Patchwork-Id: 2825310 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4B969C0AB2 for ; Tue, 9 Jul 2013 14:27:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06D05201B7 for ; Tue, 9 Jul 2013 14:27:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6413201A4 for ; Tue, 9 Jul 2013 14:27:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753985Ab3GIO0s (ORCPT ); Tue, 9 Jul 2013 10:26:48 -0400 Received: from co9ehsobe004.messaging.microsoft.com ([207.46.163.27]:10921 "EHLO co9outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753955Ab3GIO0H convert rfc822-to-8bit (ORCPT ); Tue, 9 Jul 2013 10:26:07 -0400 Received: from mail154-co9-R.bigfish.com (10.236.132.244) by CO9EHSOBE012.bigfish.com (10.236.130.75) with Microsoft SMTP Server id 14.1.225.22; Tue, 9 Jul 2013 14:26:05 +0000 Received: from mail154-co9 (localhost [127.0.0.1]) by mail154-co9-R.bigfish.com (Postfix) with ESMTP id BA80C42029A; Tue, 9 Jul 2013 14:26:05 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.250.181; KIP:(null); UIP:(null); IPV:NLI; H:AMSPRD0711HT004.eurprd07.prod.outlook.com; RD:none; EFVD:NLI X-SpamScore: -1 X-BigFish: PS-1(zz936eIzz1f42h1ee6h1de0h1d18h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzzz2dh2a8h668h839h947hd25hf0ah1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah1d07h1d0ch1d2eh1d3fh1dc1h1de9h1dfeh1dffh1e1dh1155h) Received: from mail154-co9 (localhost.localdomain [127.0.0.1]) by mail154-co9 (MessageSwitch) id 1373379963690334_14221; Tue, 9 Jul 2013 14:26:03 +0000 (UTC) Received: from CO9EHSMHS032.bigfish.com (unknown [10.236.132.238]) by mail154-co9.bigfish.com (Postfix) with ESMTP id A4EAA2C005F; Tue, 9 Jul 2013 14:26:03 +0000 (UTC) Received: from AMSPRD0711HT004.eurprd07.prod.outlook.com (157.56.250.181) by CO9EHSMHS032.bigfish.com (10.236.130.42) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 9 Jul 2013 14:26:02 +0000 Received: from AMSPRD0711MB532.eurprd07.prod.outlook.com ([169.254.4.80]) by AMSPRD0711HT004.eurprd07.prod.outlook.com ([10.242.14.165]) with mapi id 14.16.0329.000; Tue, 9 Jul 2013 14:25:48 +0000 From: Florian Neuhaus To: Laurent Pinchart CC: "linux-media@vger.kernel.org" Subject: omap_vout: rotation issue on the first start Thread-Topic: omap_vout: rotation issue on the first start Thread-Index: Ac58rgJ/YFJwVr1ARCWj30C70p2XRA== Date: Tue, 9 Jul 2013 14:25:48 +0000 Message-ID: <6EE9CD707FBED24483D4CB0162E8546745F4BAAA@AMSPRD0711MB532.eurprd07.prod.outlook.com> Accept-Language: de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [188.61.151.119] 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=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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, Sorry to insist on this, but for you it's probably peanuts to see a possible error. Any hints/workarounds are welcome... From the mail with subject AW: AW: mt9p031 shows purple coloured capture Florian Neuhaus wrote onĀ 2013-06-24: >> 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: > It would be very nice if you could test the above patch with one of your omap-devices. > 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? I noticed, that it happens only with 90 or 270 degree rotation and not with 0 and 180 degree. Also only on the first start of the stream. All following streamings are correct. I have a 480x800 Portrait display. I try to rotate the output to 800x480 landscape. 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..6fd8a16 100644 --- a/videoout.c +++ b/videoout.c @@ -60,6 +60,7 @@ struct videoout *vo_init(const char *devname, struct v4l2_format fmt; struct videoout *vo; int ret; + int rotation = 90; /* rotate for testing purposes */ /* Allocate the video output object. */ vo = malloc(sizeof *vo); @@ -76,6 +77,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;