From patchwork Fri May 14 12:17:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 99592 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4ECIBbh013395 for ; Fri, 14 May 2010 12:18:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754015Ab0ENMSI (ORCPT ); Fri, 14 May 2010 08:18:08 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:46144 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753906Ab0ENMSE (ORCPT ); Fri, 14 May 2010 08:18:04 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o4ECHwYt006201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 May 2010 07:17:58 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o4ECHwRX029348; Fri, 14 May 2010 07:17:58 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id o4ECHwRW000873; Fri, 14 May 2010 07:17:58 -0500 (CDT) Received: from [128.247.75.1] (128.247.75.1) by dlee73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server id 8.1.358.0; Fri, 14 May 2010 07:17:57 -0500 Message-ID: <4BED3F75.2040306@ti.com> Date: Fri, 14 May 2010 07:17:57 -0500 From: Nishanth Menon User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: Koen Kooi CC: "Guruswamy, Senthilvadivu" , Tomi Valkeinen , "linux-omap@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , "tony@atomide.com" , "Hiremath, Vaibhav" Subject: Re: [PATCH v2 0/2] DSS2:Allow FB to build without VRFB References: <1273764028-25822-1-git-send-email-svadivu@ti.com> <1273821814.2814.63.camel@tubuntu.research.nokia.com> <4BED2CD9.9000303@ti.com> <5FC7083E-FFD9-4297-AC5D-522FBCBF11F0@dominion.thruhere.net> In-Reply-To: <5FC7083E-FFD9-4297-AC5D-522FBCBF11F0@dominion.thruhere.net> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 14 May 2010 12:18:12 +0000 (UTC) diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS index 0af0e9e..b3df400 100644 --- a/Documentation/arm/OMAP/DSS +++ b/Documentation/arm/OMAP/DSS @@ -279,8 +279,11 @@ omapfb.test= - Draw test pattern to framebuffer whenever framebuffer settings change. You need to have OMAPFB debug support enabled in kernel config. -omapfb.vrfb= - - Use VRFB rotation for all framebuffers. +omapfb.rotation_type= 0|1|2 + - Select rotation type on hardware + 0 - Default: Use Optimal rotation style for the silicon + 1 - Force use VRFB rotation for all framebuffers if available + 2 - Use DSS to rotate all framebuffers omapfb.rotate= - Default rotation applied to all framebuffers. diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 7514174..52aebae 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -444,6 +444,7 @@ extern u32 omap3_features; #define OMAP3_HAS_NEON BIT(3) #define OMAP3_HAS_ISP BIT(4) #define OMAP3_HAS_192MHZ_CLK BIT(5) +#define OMAP3_HAS_VRFB BIT(6) #define OMAP3_HAS_FEATURE(feat,flag) \ static inline unsigned int omap3_has_ ##feat(void) \ @@ -457,5 +458,6 @@ OMAP3_HAS_FEATURE(iva, IVA) OMAP3_HAS_FEATURE(neon, NEON) OMAP3_HAS_FEATURE(isp, ISP) OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) +OMAP3_HAS_FEATURE(vrfb, VRFB) #endif diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 4b4506d..b0cc251 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "omapfb.h" @@ -43,7 +44,7 @@ static char *def_mode; static char *def_vram; -static int def_vrfb; +static int def_rotate_type; static int def_rotate; static int def_mirror; @@ -1872,8 +1873,14 @@ static int omapfb_create_framebuffers(struct omapfb2_device *fbdev) ofbi->id = i; /* assign these early, so that fb alloc can use them */ - ofbi->rotation_type = def_vrfb ? OMAP_DSS_ROT_VRFB : - OMAP_DSS_ROT_DMA; + + /* Unless forced to use otherwise, use vrfb */ + if (omap3_has_vrfb()) + ofbi->rotation_type = (def_rot_style == 2) ? + OMAP_DSS_ROT_DMA : OMAP_DSS_ROT_VRFB; + else + ofbi->rotation_type = OMAP_DSS_ROT_DMA; + ofbi->mirror = def_mirror;