[RFC] Setting default virtual fb geometry

Started by Mark Jackson on Aug 12, 2009

Subsystems (2)

Maintainers (2)

open the first message on its own page

Message details and related content
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;

------------------------------------------------------------------------------
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
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help