diff options
Diffstat (limited to 'drivers/video/sm501fb.c')
-rw-r--r-- | drivers/video/sm501fb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index e1d6085bc347..8c39e4d5b08f 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
@@ -1276,6 +1276,7 @@ static int sm501fb_start(struct sm501fb_info *info, | |||
1276 | { | 1276 | { |
1277 | struct resource *res; | 1277 | struct resource *res; |
1278 | struct device *dev; | 1278 | struct device *dev; |
1279 | int k; | ||
1279 | int ret; | 1280 | int ret; |
1280 | 1281 | ||
1281 | info->dev = dev = &pdev->dev; | 1282 | info->dev = dev = &pdev->dev; |
@@ -1337,6 +1338,13 @@ static int sm501fb_start(struct sm501fb_info *info, | |||
1337 | 1338 | ||
1338 | info->fbmem_len = (res->end - res->start)+1; | 1339 | info->fbmem_len = (res->end - res->start)+1; |
1339 | 1340 | ||
1341 | /* clear framebuffer memory - avoids garbage data on unused fb */ | ||
1342 | memset(info->fbmem, 0, info->fbmem_len); | ||
1343 | |||
1344 | /* clear palette ram - undefined at power on */ | ||
1345 | for (k = 0; k < (256 * 3); k++) | ||
1346 | writel(0, info->regs + SM501_DC_PANEL_PALETTE + (k * 4)); | ||
1347 | |||
1340 | /* enable display controller */ | 1348 | /* enable display controller */ |
1341 | sm501_unit_power(dev->parent, SM501_GATE_DISPLAY, 1); | 1349 | sm501_unit_power(dev->parent, SM501_GATE_DISPLAY, 1); |
1342 | 1350 | ||