From: Mike Rapoport <mike@compulab.co.il>
To: Ameya Palande <ameya.palande@nokia.com>
Cc: tomi.valkeinen@nokia.com, linux-omap <linux-omap@vger.kernel.org>,
Mike Rapoport <mike@compulab.co.il>
Subject: Re: DSS2 broken with 36-rc1
Date: Mon, 23 Aug 2010 10:06:34 +0300 [thread overview]
Message-ID: <4C721DFA.9010009@compulab.co.il> (raw)
In-Reply-To: <4C72192A.9050801@compulab.co.il>
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@compulab.co.il>
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@nokia.com>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
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.
next prev parent reply other threads:[~2010-08-23 7:07 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-16 12:48 DSS2 broken with 36-rc1 Ameya Palande
2010-08-16 12:59 ` Pawel Moll
2010-08-16 13:05 ` Ameya Palande
2010-08-23 6:46 ` Mike Rapoport
2010-08-23 7:06 ` Mike Rapoport [this message]
2010-08-25 0:21 ` Laine Walker-Avina
2010-08-25 8:05 ` Tomi Valkeinen
2010-08-25 8:47 ` Shilimkar, Santosh
2010-08-25 9:21 ` Grazvydas Ignotas
2010-08-25 11:43 ` Tomi Valkeinen
2010-08-25 18:51 ` Russell King - ARM Linux
2010-08-23 7:15 ` Tomi Valkeinen
2010-08-23 7:19 ` Mike Rapoport
2010-08-23 7:35 ` Tomi Valkeinen
2010-08-23 8:51 ` Mike Rapoport
2010-08-25 8:09 ` Tomi Valkeinen
2010-10-15 12:44 ` Felipe Contreras
2010-10-15 12:46 ` [PATCH 1/2] video: omap: vram: remove from normal memory Felipe Contreras
2010-10-15 12:46 ` Felipe Contreras
2010-10-18 13:10 ` Tomi Valkeinen
2010-10-18 13:10 ` Tomi Valkeinen
2010-10-18 14:03 ` Tomi Valkeinen
2010-10-18 14:03 ` Tomi Valkeinen
2010-10-18 22:55 ` Tony Lindgren
2010-10-18 22:55 ` Tony Lindgren
2010-10-19 7:27 ` Felipe Contreras
2010-10-19 7:27 ` Felipe Contreras
2010-10-19 12:03 ` Tomi Valkeinen
2010-10-19 12:03 ` Tomi Valkeinen
2010-11-07 22:49 ` Felipe Contreras
2010-11-07 22:49 ` Felipe Contreras
2010-11-08 11:40 ` Tomi Valkeinen
2010-11-08 11:40 ` Tomi Valkeinen
2010-10-15 12:46 ` [PATCH 2/2] omap: rx51: mark reserved memory earlier Felipe Contreras
2010-10-15 12:46 ` Felipe Contreras
2010-10-15 12:49 ` Felipe Contreras
2010-10-15 12:49 ` Felipe Contreras
2010-11-12 13:28 ` Tomi Valkeinen
2010-11-12 13:28 ` Tomi Valkeinen
2011-02-10 14:40 ` Felipe Contreras
2011-02-10 14:40 ` Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C721DFA.9010009@compulab.co.il \
--to=mike@compulab.co.il \
--cc=ameya.palande@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.