Re: [PATCH 2/7] fbdev: Make fb_find_mode() return failure if modular

From
James Simmons <hidden>
Date
2005-02-17 22:09:27
Reply to
Antonino A. Daplas, 2005-02-17
On Thursday 17 February 2005 22:29, David Vrabel wrote:
quoted
Antonino A. Daplas wrote:
quoted
A few drivers call fb_find_mode() even if compiled as a module.  If the
modedb parameter is NULL, the function will use default modedb array
which is marked __init. This will cause a crash.  To avoid this, check if
the driver is compiled as a module, and if it is, fail.
Why limit the default mode DB to built-in drivers only?
The default db is used by drivers only once.  After that, it just consumes
memory.
For modules it wouldn't be that hard to add the modedb from userland after 
loading. First insmod your module. Normally modular fbdev driver don't set 
the hardware explictly. Once we have sysfs it will be easy. Next send the 
new modes to the db. Next select the mode you want. 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Thread (5 messages) 5 messages, 3 authors, last reply 2005-02-17
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