Thread (4 messages) 4 messages, 3 authors, 2005-01-29

Re: Re: Added 915G to intelfb of 2.6.10-kernel-sources

From: Antonino A. Daplas <hidden>
Date: 2005-01-29 00:20:54

On Saturday 29 January 2005 06:41, Buttchereit, Axel (XLsigned) wrote:
Antonino A. Daplas wrote:
quoted
Because the modedb array is marked __init.  You can however pass
the vesa_modes array instead to fb_find_mode().
Ah, yes!
At the moment "intelfb" does not pass any "modedb" in its call(s) to
"fb_find_mode()" which results in using the "__init modedb" in case
of "static link" and using no modedb (actually using a not-initialized one)
at all, otherwise.
Passing "vesa_modes" would make things better when loading
"intelfb" as a module, but would change "well known behaviour",
when linked statically, though I could perfectly live with an "initfb"
that is always using "vesa_modedb".

Any suggestions?
If you really must, you can pass modedb if compiled statically, and
vesa_modedb if compiled as a module.
Bumping into driver development for the first time it's quite
clear that I do not know many important things that I should know.
So please be "forgiving", if I ask stupid questions like this one:

How do I detect, if something (intelfb) is loaded as a module or
statically linked into the kernel?
What do you mean, detect by whom? Detect by another module
in the kernel or by userspace?

You can do several things:

1. Use #ifdef MODULE/#endif
2. Check if CONFIG_FB_INTELFB_MODULE is defined
3. Check struct fb_info.flags if FBINFO_MODULE is set
4. Use symbol_get()/symbol_put() and check the return value before calling
any of the functions of the driver.
quoted
quoted
quoted
loaded, if
"video=intelfb:..." is specified as kernel-parameter?
If you want it loaded automatically, compile the driver statically. If
you don't want to load a compiled-in driver, use:

video=intelfb:off
This is not exactly what I was asking for. :-)
It would be nice, if the module would automatically be loaded in
"early boot stage", when specified as a kernel-parameter. But this is
Because at this stage, userspace hasn't been initialized yet, so you cannot
automatically load modules (which are stored in the filesystem) without help
from userspace.
not really important (for me), because using "udev" and "hotplug/coldplug"
(on gentoo) finally loads it anyway.
Yes, that is a better solution.

Tony




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help