From 01d3a5e7fab7732cfc5d5d4533e9378ea435295a Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Mon, 28 Apr 2008 02:15:19 -0700 Subject: 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 Cc: "Antonino A. Daplas" Cc: Nicolas FERRE Cc: Andrew Victor Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/avr32/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/avr32') diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index 2687b730e2d..ce48c14f434 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c @@ -274,6 +274,8 @@ static int __init early_parse_fbmem(char *p) printk(KERN_WARNING "Failed to allocate framebuffer memory\n"); fbmem_size = 0; + } else { + memset(__va(fbmem_start), 0, fbmem_size); } } -- cgit v1.2.3-70-g09d2