From: Mark J. <mpf...@mi...> - 2009-08-12 09:16:37
|
At the moment you can set fbmem from the kernel bootargs, and xres / yres are usually setup in the board init files. However, there doesn;t seem to be any simple way to specify the virtual size of the display (eg. for double buffering). I have "hacked" the Atmel display driver in a quick and dirty way to fulfil my needs, but I guess it needs a more formal approach. Anyone care to comment on how this "issue" might be resolved ? Regards Mark --- drivers/video/atmel_lcdfb.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 2864e05..54df737 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -353,6 +353,11 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var, return -EINVAL; } + /* Calculate virtual yres based on fbmem size */ + var->yres_virtual = info->fix.smem_len / + (var->xres * var->yres * (var->bits_per_pixel / 8)); + var->yres_virtual *= var->yres; + /* Do not allow to have real resoulution larger than virtual */ if (var->xres > var->xres_virtual) var->xres_virtual = var->xres; |