aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/glamo/glamo-fb.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@openmoko.com>2008-11-19 17:11:18 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:11:18 +0000
commit324efdc2952b09c2f1191ab93ded6726366b2e8b (patch)
tree47258cb894404a2dac707ada4c0ae7170d65596d /drivers/mfd/glamo/glamo-fb.c
parent21f6d336852a942547ddb218f50ce49c6abb8eaf (diff)
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 <olv@openmoko.com>
Diffstat (limited to 'drivers/mfd/glamo/glamo-fb.c')
-rw-r--r--drivers/mfd/glamo/glamo-fb.c5
1 files changed, 4 insertions, 1 deletions
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);