linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonino Daplas <adaplas@pol.net>
To: James Simmons <jsimmons@infradead.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Linux Fbdev development list
	<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: Feature Freeze?
Date: 06 Mar 2003 09:17:52 +0800	[thread overview]
Message-ID: <1046910001.1227.22.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44.0303051836300.27760-100000@phoenix.infradead.org>

On Thu, 2003-03-06 at 02:37, James Simmons wrote:
> 
> > So we just make fbcon permanently loaded unconditionally?  The current
> > code allows 'rmmod fbcon', but it will freeze the system.
> 
> Because no other console takes over. This is not a easy problem to solve.
> Which driver takes over when we switch from one console driver to 
> another.

I have already a working fbcon module unloading code in my local copy. 
The way it works is like this.  

1. If take_over_console() is called with the "default" flag clear, it
behaves as usual.  It takes only a subset of console numbers but
"conswitchp" still points to the console driver that was loaded at boot
time.

2. If take_over_console() is called with the "default" flag set, it will
replace "conswitchp", but the original value of "conswitchp" is saved.

3.  If take_over_console() with the "default" flag set is called again,
it will fail.  It's not logical to just overwrite "conswitchp" over and
over again.

4. If give_up_console() is called and if the previous
take_over_console() did not overwrite "conswitchp", it proceeds as
usual.

5. If give_up_console() is called and if the previous
take_over_console() overwrote "conswitchp", give_up_console() will also
call take_over_console() but using the saved "conswitchp".

I can then load fbdev and fbcon as modules.  If I "rmmod fbcon", I get
back again to vgacon/dummycon/whatever.  I can then load and unload
different fbdev's and load fbcon at will.

If I want to load mdacon, it will still work on top of fbcon, because
mdacon calls take_over_console() with the "default" flag cleared.

If you need to load other console drivers, then fbcon must be unloaded
first.  This is because the rest of the console drivers call
take_over_console() with the "default" flag set.

I can already load/unload fbcon using vga16fb, rivafb or i810fb as the
backend at will.  Drivers that wish to allow fbcon unloading can define
the xxxfb_release() method.  They can choose to save/restore the state
(if they have a vga core and running as primary), or just define the
xxfb_release method as a dummy (if no vga core or running as secondary).

What do you think?  Any suggestions to improve this (multiple console
drivers for instance)? I would rather have the above, or disallow
unloading, than having the whole console system freeze on me.

Tony



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com

  reply	other threads:[~2003-03-06  1:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-05  8:26 Feature Freeze? Antonino Daplas
2003-03-05  9:57 ` Geert Uytterhoeven
2003-03-05 12:46   ` Antonino Daplas
2003-03-05 18:37     ` James Simmons
2003-03-06  1:17       ` Antonino Daplas [this message]
2003-03-11 15:55         ` James Simmons
2003-03-05 18:34   ` James Simmons
2003-03-05 18:45     ` Geert Uytterhoeven
2003-03-06  1:18     ` Antonino Daplas
2003-03-06  7:03       ` Carlo E. Prelz
2003-03-06  7:54         ` Antonino Daplas
2003-03-11 15:57       ` James Simmons
2003-03-05 11:05 ` Sven Luther
2003-03-05 12:46   ` Antonino Daplas
2003-03-05 13:43     ` Sven Luther
2003-03-05 14:04       ` Geert Uytterhoeven
2003-03-05 14:21         ` Sven Luther
2003-03-05 14:23           ` Geert Uytterhoeven
2003-03-05 14:26             ` Sven Luther
2003-03-05 14:46       ` Antonino Daplas
2003-03-05 14:49         ` Sven Luther
2003-03-05 15:25           ` Antonino Daplas
2003-03-05 18:55             ` James Simmons
2003-03-05 18:46         ` James Simmons
2003-03-05 18:52       ` James Simmons
2003-03-05 18:39     ` James Simmons
2003-03-05 18:36   ` James Simmons
2003-03-05 18:29 ` James Simmons
2003-03-06  1:18   ` Antonino Daplas
2003-03-11 16:06     ` James Simmons
     [not found] <20030305211727.GA3839@g-kabel.si>
2003-03-05 23:59 ` James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1046910001.1227.22.camel@localhost.localdomain \
    --to=adaplas@pol.net \
    --cc=geert@linux-m68k.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).