diff mbox

DSS2 broken with 36-rc1

Message ID 4C721DFA.9010009@compulab.co.il (mailing list archive)
State New, archived
Delegated to: Tomi Valkeinen
Headers show

Commit Message

Mike Rapoport Aug. 23, 2010, 7:06 a.m. UTC
None
diff mbox

Patch

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 <linux/debugfs.h>
  #include <linux/jiffies.h>
  #include <linux/module.h>
+#include <linux/io.h>

  #include <asm/setup.h>

@@ -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)
  {