From 324efdc2952b09c2f1191ab93ded6726366b2e8b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 19 Nov 2008 17:11:18 +0000 Subject: From a54bd9e2376337320c36965830fd3167c4063356 Mon Sep 17 00:00:00 2001 Subject: [PATCH] glamofb: Initialize only visible part of the memory. 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 --- drivers/mfd/glamo/glamo-fb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/mfd/glamo/glamo-fb.c') diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c index 66462672f52..1b07e17ad1f 100644 --- a/drivers/mfd/glamo/glamo-fb.c +++ b/drivers/mfd/glamo/glamo-fb.c @@ -884,7 +884,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); -- cgit v1.2.3