Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94173
b: refs/heads/master
c: 01d3a5e
h: refs/heads/master
i:
  94171: 00f4dce
v: v3
  • Loading branch information
Haavard Skinnemoen authored and Linus Torvalds committed Apr 28, 2008
1 parent 757b164 commit 6345097
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20e061fb750d36ec0ffcb2e44ed7dafa9018223b
refs/heads/master: 01d3a5e7fab7732cfc5d5d4533e9378ea435295a
11 changes: 11 additions & 0 deletions trunk/arch/arm/mach-at91/at91sam9261_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,17 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
at91_set_B_periph(AT91_PIN_PB28, 0); /* LCDD23 */
#endif

if (ARRAY_SIZE(lcdc_resources) > 2) {
void __iomem *fb;
struct resource *fb_res = &lcdc_resources[2];
size_t fb_len = fb_res->end - fb_res->start + 1;

fb = ioremap_writecombine(fb_res->start, fb_len);
if (fb) {
memset(fb, 0, fb_len);
iounmap(fb, fb_len);
}
}
lcdc_data = *data;
platform_device_register(&at91_lcdc_device);
}
Expand Down
14 changes: 14 additions & 0 deletions trunk/arch/arm/mach-at91/at91sam9rl_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,20 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
at91_set_B_periph(AT91_PIN_PC24, 0); /* LCDD22 */
at91_set_B_periph(AT91_PIN_PC25, 0); /* LCDD23 */

#ifdef CONFIG_FB_INTSRAM
{
void __iomem *fb;
struct resource *fb_res = &lcdc_resources[2];
size_t fb_len = fb_res->end - fb_res->start + 1;

fb = ioremap_writecombine(fb_res->start, fb_len);
if (fb) {
memset(fb, 0, fb_len);
iounmap(fb, fb_len);
}
}
#endif

lcdc_data = *data;
platform_device_register(&at91_lcdc_device);
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/avr32/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ static int __init early_parse_fbmem(char *p)
printk(KERN_WARNING
"Failed to allocate framebuffer memory\n");
fbmem_size = 0;
} else {
memset(__va(fbmem_start), 0, fbmem_size);
}
}

Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/video/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo)
return -ENOMEM;
}

memset(info->screen_base, 0, info->fix.smem_len);

return 0;
}

Expand Down Expand Up @@ -634,7 +636,6 @@ static int __init atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo)
struct fb_info *info = sinfo->info;
int ret = 0;

memset_io(info->screen_base, 0, info->fix.smem_len);
info->var.activate |= FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW;

dev_info(info->device,
Expand Down Expand Up @@ -764,6 +765,11 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len);
if (!info->screen_base)
goto release_intmem;

/*
* Don't clear the framebuffer -- someone may have set
* up a splash image.
*/
} else {
/* alocate memory buffer */
ret = atmel_lcdfb_alloc_video_memory(sinfo);
Expand Down

0 comments on commit 6345097

Please sign in to comment.