* [PATCH 2/2] atmel_lcdfb: Add board parameter specify framebuffer memory size
@ 2008-08-08 12:47 Stanislaw Gruszka
2008-08-08 16:55 ` Krzysztof Helt
0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2008-08-08 12:47 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: linux-fbdev-devel
Specify how much physically continuous, DMA capable memory will be allocated
at driver initialization time. This allow to create framebuffer device with
larger virtual resolution. Combine with y-panning this can be used to
implement double buffering acceleration method.
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
---
drivers/video/atmel_lcdfb.c | 7 +++++--
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 e1acfa7..a471a60 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)
{
struct fb_info *info = sinfo->info;
struct fb_var_screeninfo *var = &info->var;
+ unsigned int smem_len;
- info->fix.smem_len = (var->xres_virtual * var->yres_virtual
- * ((var->bits_per_pixel + 7) / 8));
+ smem_len = (var->xres_virtual * var->yres_virtual
+ * ((var->bits_per_pixel + 7) / 8));
+ info->fix.smem_len = max(smem_len, sinfo->smem_len);
info->screen_base = dma_alloc_writecombine(info->device, info->fix.smem_len,
(dma_addr_t *)&info->fix.smem_start, GFP_KERNEL);
@@ -796,6 +798,7 @@ static int __init atmel_lcdfb_probe(struct platform_device
*pdev)
sinfo->default_monspecs = pdata_sinfo->default_monspecs;
sinfo->atmel_lcdfb_power_control = pdata_sinfo->atmel_lcdfb_power_control;
sinfo->guard_time = pdata_sinfo->guard_time;
+ sinfo->smem_len = pdata_sinfo->smem_len;
sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight;
sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode;
} else {
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
index 613173b..920c4e9 100644
--- a/include/video/atmel_lcdc.h
+++ b/include/video/atmel_lcdc.h
@@ -41,6 +41,7 @@ struct atmel_lcdfb_info {
struct work_struct task;
unsigned int guard_time;
+ unsigned int smem_len;
struct platform_device *pdev;
struct clk *bus_clk;
struct clk *lcdc_clk;
--
1.5.2.5
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 2/2] atmel_lcdfb: Add board parameter specify framebuffer memory size
2008-08-08 12:47 [PATCH 2/2] atmel_lcdfb: Add board parameter specify framebuffer memory size Stanislaw Gruszka
@ 2008-08-08 16:55 ` Krzysztof Helt
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Helt @ 2008-08-08 16:55 UTC (permalink / raw)
To: Stanislaw Gruszka, Andrew Morton; +Cc: linux-fbdev-devel
On Fri, 8 Aug 2008 14:47:05 +0200
Stanislaw Gruszka <stf_xl@wp.pl> wrote:
> Specify how much physically continuous, DMA capable memory will be allocated
> at driver initialization time. This allow to create framebuffer device with
> larger virtual resolution. Combine with y-panning this can be used to
> implement double buffering acceleration method.
>
> Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
> ---
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
> drivers/video/atmel_lcdfb.c | 7 +++++--
> 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 e1acfa7..a471a60 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)
> {
> struct fb_info *info = sinfo->info;
> struct fb_var_screeninfo *var = &info->var;
> + unsigned int smem_len;
>
> - info->fix.smem_len = (var->xres_virtual * var->yres_virtual
> - * ((var->bits_per_pixel + 7) / 8));
> + smem_len = (var->xres_virtual * var->yres_virtual
> + * ((var->bits_per_pixel + 7) / 8));
> + info->fix.smem_len = max(smem_len, sinfo->smem_len);
>
> info->screen_base = dma_alloc_writecombine(info->device, info->fix.smem_len,
> (dma_addr_t *)&info->fix.smem_start, GFP_KERNEL);
> @@ -796,6 +798,7 @@ static int __init atmel_lcdfb_probe(struct platform_device
> *pdev)
> sinfo->default_monspecs = pdata_sinfo->default_monspecs;
> sinfo->atmel_lcdfb_power_control = pdata_sinfo->atmel_lcdfb_power_control;
> sinfo->guard_time = pdata_sinfo->guard_time;
> + sinfo->smem_len = pdata_sinfo->smem_len;
> sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight;
> sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode;
> } else {
> diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
> index 613173b..920c4e9 100644
> --- a/include/video/atmel_lcdc.h
> +++ b/include/video/atmel_lcdc.h
> @@ -41,6 +41,7 @@ struct atmel_lcdfb_info {
> struct work_struct task;
>
> unsigned int guard_time;
> + unsigned int smem_len;
> struct platform_device *pdev;
> struct clk *bus_clk;
> struct clk *lcdc_clk;
> --
> 1.5.2.5
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Linux-fbdev-devel mailing list
> Linux-fbdev-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
>
----------------------------------------------------------------------
Taniej na zagraniczne komorki!
Sprawdz >>> http://link.interia.pl/f1ece
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-08 16:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 12:47 [PATCH 2/2] atmel_lcdfb: Add board parameter specify framebuffer memory size Stanislaw Gruszka
2008-08-08 16:55 ` Krzysztof Helt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).