Skip to contentSkip to conversation

Setting default virtual fb geometry

RFC New Mark Jackson 1 participant 1 message Aug 12, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 Setting default virtual fb geometry

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(-)
drivers/video/atmel_lcdfb.c +5 -0
index 2864e05..54df737 100644
@@ -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;

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july