From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Dave Airlie <airlied@linux.ie>,
Jakob Bornecrantz <wallbraker@gmail.com>,
linux-fbdev-devel@lists.sourceforge.net
Subject: Re: Console unregistration questions
Date: Fri, 27 Apr 2007 14:10:36 +0800 [thread overview]
Message-ID: <1177654236.4683.27.camel@daplas> (raw)
In-Reply-To: <200704261830.22238.jbarnes@virtuousgeek.org>
On Thu, 2007-04-26 at 18:30 -0700, Jesse Barnes wrote:
> On Tuesday, April 24, 2007, Antonino A. Daplas wrote:
> > Here's a test patch. Basically, it checks if the driver is still mapped
> > to the console, and if it is, unregister_framebuffer() will exit
> > immediately. As mentioned, it's untested, so let me know if there are
> > problems.
> >
> > Note, the driver must also do its part, by checking if the driver is
> > opened by something in userspace.
>
> Here's a hacked up version of an unregistration patch. It exports
> unbind_con_driver from vt.c and makes fbcon and fbmem use it when a driver
> goes away...
>
I have no problems with the purpose of this patch, but I would like what
other kernel developers, both fbdev and non-fbdev, think about this.
The main problem with this version is it's possible to have more than 1
fb driver mapped to each console (and people do that). So if one of
them unregisters, it will also unbind the other one. Code-wise, it's not
a problem. But users will not expect that behavior.
It's fixable though, as unbind_con_driver() also accepts the first and
last parameter. fbcon_fb_unbind() will have to walk con2fbmap[], so
something like this untested code instead:
static int fbcon_fb_unbind(int idx) {
for (i = 0; i < MAX_NR_CONSOLES; i++) {
/* Assure we do not unbind other drivers */
if (idx == con2fbmap[i])
/* can be optimize to minimize multiple calls to
unbind_con_driver() */
unbind_con_driver(&fb_con, i, i, 0);
}
]
Besides the above, we still have to make adjustments to fbcon so it can
handle one driver going away and while still managing other loaded
drivers.
Tony
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-04-27 6:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-24 21:59 Console unregistration questions Jesse Barnes
2007-04-24 23:19 ` Antonino A. Daplas
2007-04-24 23:42 ` Antonino A. Daplas
2007-04-24 23:46 ` Jesse Barnes
2007-04-25 0:07 ` Antonino A. Daplas
2007-04-25 1:17 ` Antonino A. Daplas
2007-04-26 17:00 ` Jesse Barnes
2007-04-27 1:30 ` Jesse Barnes
2007-04-27 6:10 ` Antonino A. Daplas [this message]
2007-04-27 15:14 ` Jesse Barnes
2007-04-27 16:10 ` Antonino A. Daplas
2007-04-24 23:42 ` Jesse Barnes
2007-04-25 0:04 ` Antonino A. Daplas
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=1177654236.4683.27.camel@daplas \
--to=adaplas@gmail.com \
--cc=airlied@linux.ie \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=wallbraker@gmail.com \
/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).