Re: DSS2 broken with 36-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Rapoport wrote:
Hi Ameya,

Ameya Palande wrote:
Hi Tomi,

When I tried to boot 2.6.36-rc1 kernel on Nokia N900, omapfb failed with
following error messages:

[    0.124145] OMAP DSS rev 2.0
[    0.124237] OMAP DISPC rev 3.0

[    0.303833] acx565akm spi1.2: omapfb: acx565akm rev 8b LCD detected

[    0.805419] omapfb omapfb: failed to allocate framebuffer
[    0.810882] omapfb omapfb: failed to allocate fbmem
[    0.815856] omapfb omapfb: failed to setup omapfb
[    0.820648] omapfb: probe of omapfb failed with error -12


Please discard the previous patch, it's buggy :(
Sorry for the noise.

From 81e9278ad27bc91be42105321e0e26d0be9e883b Mon Sep 17 00:00:00 2001
From: Mike Rapoport <mike@xxxxxxxxxxxxxx>
Date: Mon, 23 Aug 2010 09:40:09 +0300
Subject: [PATCH] OMAP: DSS2: OMAPFB: use phys_to_virt for RAM mappings

After commit 309caa9cc6ff39d261264ec4ff10e29489afc8f8 (ARM: Prohibit
ioremap() on kernel managed RAM) it is impossible to ioremap SDRAM for
the framebuffer. Use phys_to_virt for kernel managed RAM mapping and
ioremap for other memory types

Reported-by: Ameya Palande <ameya.palande@xxxxxxxxx>
Signed-off-by: Mike Rapoport <mike@xxxxxxxxxxxxxx>
---
 arch/arm/plat-omap/include/plat/vram.h   |    1 +
 drivers/video/omap2/omapfb/omapfb-main.c |    2 +-
 drivers/video/omap2/vram.c               |   10 ++++++++++
 3 files changed, 12 insertions(+), 1 deletions(-)

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



--
Sincerely yours,
Mike.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux