[PATCH] glamofb: Initialize only visible part of the memory.

Chia-I Wu olv at openmoko.com
Fri Oct 31 15:04:23 CET 2008


It takes lots of time (0.5 seconds) to initialize the whole memory.  As
only the visible part matters, we could just initialize that part.

Signed-off-by: Chia-I Wu <olv at openmoko.com>
---
 drivers/mfd/glamo/glamo-fb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c
index 5cd6e05..90e2bd7 100644
--- a/drivers/mfd/glamo/glamo-fb.c
+++ b/drivers/mfd/glamo/glamo-fb.c
@@ -830,7 +830,10 @@ static int __init glamofb_probe(struct platform_device *pdev)
 	fbinfo->var.hsync_len = mach_info->hsync_len;
 	fbinfo->var.vsync_len = mach_info->vsync_len;
 
-	memset(fbinfo->screen_base, 0, fbinfo->fix.smem_len);
+	memset(fbinfo->screen_base, 0,
+			mach_info->xres.max *
+			mach_info->yres.max *
+			mach_info->bpp.max / 8);
 
 	glamo_engine_enable(mach_info->glamo, GLAMO_ENGINE_LCD);
 	glamo_engine_reset(mach_info->glamo, GLAMO_ENGINE_LCD);
-- 
1.5.6.3


--ew6BAiZeqk4r7MaW--



More information about the openmoko-kernel mailing list