Re: framebuffer questions
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2008-02-10 11:11:29
On Sat, 9 Feb 2008, Scott D. Davilla wrote:
1) "info = framebuffer_alloc(sizeof(u32) * 16, &dev->dev)" is used to allocate memory for the framebuffer info structure (struct fb_info *info). struct fb_info is greater than 16 * sizeof(u32) so it seems this should be "info = framebuffer_alloc(sizeof(struct fb_info), &dev->dev)" or imacfb is going to be read/writing beyond what was allocated. Side note efifb.c has this same code as it was derived from imacfb.
That's OK. `sizeof(u32) * 16' is the amount of extra private memory used by the driver, in addition to sizeof(struct fb_info).
3) imacfb (and efifb) do not any removal routines for unloading the module. So what happens when X11 takes over? Should there be an removal routine for unloading? The console video buffer is still mapped (screen_base). How does X11 know not to use this area? What does X11 do regarding the console framebuffer when it runs and it is does not unlaod the console module, how does it avoid using the console mapped video memory?
X and imacfb will coexist and use the same memory.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/