summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-2.6.18/lcdc-do-not-clear-mem-if-fbmem_start-is-set.patch
blob: b354047f60e61f9275f36fc40812422e134c5b5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: linux-2.6.18/drivers/video/sidsafb.c
===================================================================
--- linux-2.6.18.orig/drivers/video/sidsafb.c	2006-12-20 13:43:17.000000000 +0100
+++ linux-2.6.18/drivers/video/sidsafb.c	2006-12-20 13:46:44.000000000 +0100
@@ -765,7 +765,10 @@
 	printk("fb%d: Atmel LCDC at 0x%08lx (mapped at %p), irq %lu\n",
 	       info->node, info->fix.mmio_start, sinfo->regs, sinfo->irq_base);
 
-	memset_io(info->screen_base, 0, info->fix.smem_len);
+	/* Only clear framebuffer if fbmem_start was not declared, assume the
+	 * user have filled the framebuffer before the kernel was started. */
+	if (!fb_data->fbmem_start)
+		memset_io(info->screen_base, 0, info->fix.smem_len);
 	info->var.activate |= FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW;
 	ret = fb_set_var(info, &info->var);
 	if (ret)