diff options
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 7 | ||||
-rw-r--r-- | include/video/atmel_lcdc.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 16e47eb2ff5d..9c5925927ece 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -242,9 +242,11 @@ static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo) | |||
242 | { | 242 | { |
243 | struct fb_info *info = sinfo->info; | 243 | struct fb_info *info = sinfo->info; |
244 | struct fb_var_screeninfo *var = &info->var; | 244 | struct fb_var_screeninfo *var = &info->var; |
245 | unsigned int smem_len; | ||
245 | 246 | ||
246 | info->fix.smem_len = (var->xres_virtual * var->yres_virtual | 247 | smem_len = (var->xres_virtual * var->yres_virtual |
247 | * ((var->bits_per_pixel + 7) / 8)); | 248 | * ((var->bits_per_pixel + 7) / 8)); |
249 | info->fix.smem_len = max(smem_len, sinfo->smem_len); | ||
248 | 250 | ||
249 | info->screen_base = dma_alloc_writecombine(info->device, info->fix.smem_len, | 251 | info->screen_base = dma_alloc_writecombine(info->device, info->fix.smem_len, |
250 | (dma_addr_t *)&info->fix.smem_start, GFP_KERNEL); | 252 | (dma_addr_t *)&info->fix.smem_start, GFP_KERNEL); |
@@ -796,6 +798,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | |||
796 | sinfo->default_monspecs = pdata_sinfo->default_monspecs; | 798 | sinfo->default_monspecs = pdata_sinfo->default_monspecs; |
797 | sinfo->atmel_lcdfb_power_control = pdata_sinfo->atmel_lcdfb_power_control; | 799 | sinfo->atmel_lcdfb_power_control = pdata_sinfo->atmel_lcdfb_power_control; |
798 | sinfo->guard_time = pdata_sinfo->guard_time; | 800 | sinfo->guard_time = pdata_sinfo->guard_time; |
801 | sinfo->smem_len = pdata_sinfo->smem_len; | ||
799 | sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight; | 802 | sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight; |
800 | sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode; | 803 | sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode; |
801 | } else { | 804 | } else { |
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h index 613173b5db69..920c4e9cb93d 100644 --- a/include/video/atmel_lcdc.h +++ b/include/video/atmel_lcdc.h | |||
@@ -41,6 +41,7 @@ struct atmel_lcdfb_info { | |||
41 | struct work_struct task; | 41 | struct work_struct task; |
42 | 42 | ||
43 | unsigned int guard_time; | 43 | unsigned int guard_time; |
44 | unsigned int smem_len; | ||
44 | struct platform_device *pdev; | 45 | struct platform_device *pdev; |
45 | struct clk *bus_clk; | 46 | struct clk *bus_clk; |
46 | struct clk *lcdc_clk; | 47 | struct clk *lcdc_clk; |