* [RFC] Setting default virtual fb geometry
@ 2009-08-12 8:59 Mark Jackson
0 siblings, 0 replies; only message in thread
From: Mark Jackson @ 2009-08-12 8:59 UTC (permalink / raw)
To: linux-fbdev-devel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-12 9:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-12 8:59 [RFC] Setting default virtual fb geometry Mark Jackson
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).