linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fb_console_init fix.
@ 2004-02-20 21:58 James Simmons
  2004-02-20 22:56 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: James Simmons @ 2004-02-20 21:58 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Fbdev development list, Linux Kernel Mailing List


Hi!

  This patch fixes fb_console_init from being called twice. I still need 
to fix set_con2fb but this helps but this is still important to get in.

--- linus-2.6/drivers/video/console/fbcon.c	2004-02-18 20:59:11.000000000 -0800
+++ fbdev-2.6/drivers/video/console/fbcon.c	2004-02-19 18:14:52.000000000 -0800
@@ -2335,6 +2335,7 @@
 {
 	if (!num_registered_fb)
 		return -ENODEV;
+
 	take_over_console(&fb_con, first_fb_vc, last_fb_vc, fbcon_is_default);
 	acquire_console_sem();
 	if (!fbcon_event_notifier_registered) {
@@ -2342,10 +2343,11 @@
 		fbcon_event_notifier_registered = 1;
 	} 
 	release_console_sem();
-
 	return 0;
 }
 
+#ifdef MODULE
+
 void __exit fb_console_exit(void)
 {
 	acquire_console_sem();
@@ -2360,6 +2362,8 @@
 module_init(fb_console_init);
 module_exit(fb_console_exit);
 
+#endif
+
 /*
  *  Visible symbols for modules
  */



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fb_console_init fix.
  2004-02-20 21:58 fb_console_init fix James Simmons
@ 2004-02-20 22:56 ` Benjamin Herrenschmidt
  2004-02-20 23:54   ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-20 22:56 UTC (permalink / raw)
  To: James Simmons
  Cc: Linus Torvalds, Linux Fbdev development list,
	Linux Kernel Mailing List

On Sat, 2004-02-21 at 08:58, James Simmons wrote:
> Hi!
> 
>   This patch fixes fb_console_init from being called twice. I still need 
> to fix set_con2fb but this helps but this is still important to get in.

I hate those #ifdef MODULE. They are plaguing the drivers too, because
of our crazy initialization scheme...

(Linus: that patch should still go in, doing better is probably a
2.7 target in this case).

If we want the fb stuff to be initialized before other drivers, we
probably want to create an init step before devices and after PCI
probe, but is that really necessary ?

The core fbdev should just need a subsys initcall. fbcon could use
that too and register a notifier. Then we could use the notifier
mecanism to notify fbcon when fbdev's are added (from
register_framebuffer) and get rid of all of the init crap

The only remaining junk is to deal with the setup= stuff, but
then, it could be done by having the drivers provide their
"name" string & setup function in the ops structure passed
on register, and have us call back the driver straight away,
though that's a big change of the way drivers are initialized.

Or we could add an fb_check_setup("name", my_driver_setup) call
to be done by the drivers before register_framebuffer is called


Ben
.




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fb_console_init fix.
  2004-02-20 22:56 ` Benjamin Herrenschmidt
@ 2004-02-20 23:54   ` Greg KH
  2004-02-21  0:16     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2004-02-20 23:54 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: James Simmons, Linus Torvalds, Linux Fbdev development list,
	Linux Kernel Mailing List

On Sat, Feb 21, 2004 at 09:56:56AM +1100, Benjamin Herrenschmidt wrote:
> 
> If we want the fb stuff to be initialized before other drivers, we
> probably want to create an init step before devices and after PCI
> probe, but is that really necessary ?
> 
> The core fbdev should just need a subsys initcall. fbcon could use
> that too and register a notifier. Then we could use the notifier
> mecanism to notify fbcon when fbdev's are added (from
> register_framebuffer) and get rid of all of the init crap

What's wrong with the current range of init call sections?  Can't that
work for fb devices today?

thanks,

greg k-h


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fb_console_init fix.
  2004-02-20 23:54   ` Greg KH
@ 2004-02-21  0:16     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-21  0:16 UTC (permalink / raw)
  To: Greg KH
  Cc: James Simmons, Linus Torvalds, Linux Fbdev development list,
	Linux Kernel Mailing List

On Sat, 2004-02-21 at 10:54, Greg KH wrote:

> What's wrong with the current range of init call sections?  Can't that
> work for fb devices today?

We can probably work with those. I just don't fell like changing that
part of fbdev right now. More important fixes to get in first (and
there's a shitload of crap related to calling the setup functions in
fbdev's that need fixing too if/when we change that init stuff).

My idea about adding an initcall level was for pure convenience, but
may be wrong. It's handy to have the console inited before the rest
that's all ;) We can leave that out for now, maybe just linking
drivers/video before the rest is enough to get that anyway.

Ben.




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-21  0:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-20 21:58 fb_console_init fix James Simmons
2004-02-20 22:56 ` Benjamin Herrenschmidt
2004-02-20 23:54   ` Greg KH
2004-02-21  0:16     ` Benjamin Herrenschmidt

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).