From patchwork Mon Aug 23 07:06:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 123431 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.4/8.14.3) with ESMTP id o7N77QZc010707 for ; Mon, 23 Aug 2010 07:07:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751843Ab0HWHHT (ORCPT ); Mon, 23 Aug 2010 03:07:19 -0400 Received: from compulab.co.il ([67.18.134.219]:52733 "EHLO compulab.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751783Ab0HWHHT (ORCPT ); Mon, 23 Aug 2010 03:07:19 -0400 Received: from mail.linux-boards.com ([192.114.83.142] helo=zimbra-mta.compulab.co.il) by compulab.site5.com with esmtp (Exim 4.69) (envelope-from ) id 1OnR7m-0002bf-2r; Mon, 23 Aug 2010 02:07:18 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 315EA7E8B5A; Mon, 23 Aug 2010 10:07:17 +0300 (IDT) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TreZuSNPaipA; Mon, 23 Aug 2010 10:07:14 +0300 (IDT) Received: from [10.1.1.77] (droid.compulab.local [10.1.1.77]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id E40B87E904C; Mon, 23 Aug 2010 10:07:13 +0300 (IDT) Message-ID: <4C721DFA.9010009@compulab.co.il> Date: Mon, 23 Aug 2010 10:06:34 +0300 From: Mike Rapoport User-Agent: Thunderbird 2.0.0.23 (X11/20100106) MIME-Version: 1.0 To: Ameya Palande CC: tomi.valkeinen@nokia.com, linux-omap , Mike Rapoport Subject: Re: DSS2 broken with 36-rc1 References: <1281962906.1888.25.camel@chotu> <4C72192A.9050801@compulab.co.il> In-Reply-To: <4C72192A.9050801@compulab.co.il> X-Enigmail-Version: 0.95.7 X-ACL-Warn: { X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - compulab.site5.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Source: X-Source-Args: X-Source-Dir: 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]); Mon, 23 Aug 2010 07:07:27 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/plat/vram.h b/arch/arm/plat-omap/include/plat/vram.h index 0aa4ecd..b1b137c 100644 --- a/arch/arm/plat-omap/include/plat/vram.h +++ b/arch/arm/plat-omap/include/plat/vram.h @@ -33,6 +33,7 @@ extern int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr); extern int omap_vram_reserve(unsigned long paddr, size_t size); extern void omap_vram_get_info(unsigned long *vram, unsigned long *free_vram, unsigned long *largest_free_block); +extern void __iomem *omap_vram_remap(size_t size, unsigned long paddr); #ifdef CONFIG_OMAP2_VRAM extern void omap_vram_set_sdram_vram(u32 size, u32 start); diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 04034d4..39f53b1 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -1436,7 +1436,7 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size, } if (ofbi->rotation_type != OMAP_DSS_ROT_VRFB) { - vaddr = ioremap_wc(paddr, size); + vaddr = omap_vram_remap(size, paddr); if (!vaddr) { dev_err(fbdev->dev, "failed to ioremap framebuffer\n"); diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c index f6fdc20..37557b6 100644 --- a/drivers/video/omap2/vram.c +++ b/drivers/video/omap2/vram.c @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -425,6 +426,15 @@ void omap_vram_get_info(unsigned long *vram, } EXPORT_SYMBOL(omap_vram_get_info); +void __iomem *omap_vram_remap(size_t size, unsigned long paddr) +{ + if (region_mem_type(paddr) == OMAP_VRAM_MEMTYPE_SDRAM) + return phys_to_virt(paddr); + + return ioremap_wc(paddr, size); +} +EXPORT_SYMBOL(omap_vram_remap); + #if defined(CONFIG_DEBUG_FS) static int vram_debug_show(struct seq_file *s, void *unused) {