aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2008-04-28 02:15:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 08:58:38 -0700
commit01d3a5e7fab7732cfc5d5d4533e9378ea435295a (patch)
tree3bf547f6eaeec9c69f78e1b70cb66f67399d1abd /drivers
parent20e061fb750d36ec0ffcb2e44ed7dafa9018223b (diff)
atmel_lcdfb: don't initialize a pre-allocated framebuffer
If the user specified a fixed framebuffer address on the command line, it may have been initialized already with a splash image or something, so we shouldn't clear it. Therefore, we should only initialize the framebuffer if we allocated it ourselves. This patch also updates the AVR32 setup code to clear the framebuffer if it allocated it itself, i.e. the user didn't provide a fixed address or the reservation failed. I've updated the at91 platform code as well so that it initializes the framebuffer if it is located in SRAM, but I haven't tested that it actually works. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Nicolas FERRE <nicolas.ferre@rfo.atmel.com> Cc: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/atmel_lcdfb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index fc65c02306d..4d68b1b880d 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -250,6 +250,8 @@ static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo)
return -ENOMEM;
}
+ memset(info->screen_base, 0, info->fix.smem_len);
+
return 0;
}
@@ -634,7 +636,6 @@ static int __init atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo)
struct fb_info *info = sinfo->info;
int ret = 0;
- memset_io(info->screen_base, 0, info->fix.smem_len);
info->var.activate |= FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW;
dev_info(info->device,
@@ -764,6 +765,11 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len);
if (!info->screen_base)
goto release_intmem;
+
+ /*
+ * Don't clear the framebuffer -- someone may have set
+ * up a splash image.
+ */
} else {
/* alocate memory buffer */
ret = atmel_lcdfb_alloc_video_memory(sinfo);