From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: Egbert Eich <eich@freedesktop.org>,
Jon Smirl <jonsmirl@yahoo.com>,
xorg@freedesktop.org,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] VGA arbitration: draft of kernel side
Date: Wed, 09 Mar 2005 19:04:01 +1100 [thread overview]
Message-ID: <1110355442.32524.97.camel@gaston> (raw)
In-Reply-To: <1110348041.32524.60.camel@gaston>
Ok, here's today status. I posted the patch at
http://gate.crashing.org/~benh/vga-arbiter.diff. I fixed some issues &
added support for nesting locks, I added comments/documentation to
kernel interface. It's not tested yet. It's not complete neither, the
userland interface is partially implemented (via a /dev char device),
and I may still change things here or there before I'm happy with the
result. Constructive comments appreciated.
What need to be done also is to adapt vgacon.
The problems here are multiple. vgacon itself has all the consw
callbacks that need to be dealt with. A bunch of them can't schedule,
so they would have to use vga_tryget(). What to do if that fails ?
Another problem is that the VT code will directly access the
text/attribute buffer (VGA memory). Playing tricks here promises to
be difficult. Some bits of that code even keep pointers to video
memory as local statics (look at complement_pos(), that stuff is
probably interestingly broken during the vgacon->fbcon transition)
So I suspect here a minimum of rework is needed, in a rather disgusting
area of the code.
I suppose the easiest way for now is to move the vga_trylock() as much
up as possible in the call chain. The stuff in vc_screen() (userland
context, can schedule) would use vga_get(), same with the tty operations
(they acquire the console sem, so they are a big no-no at interrupt
time, but we need to do runtime checks since weird things may happen in
tty land).
The problem is how to have that code "know" that it needs to lock VGA
resources. It will be different between vgacon, fbcon, or whatever other
low level console. Some hacks may be needed here, at least until we have
a "sane" console subsystem if we ever have ... I'll have a deeper look
tomorrow.
Ben.
next prev parent reply other threads:[~2005-03-09 8:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-08 7:11 [PATCH] VGA arbitration: draft of kernel side Benjamin Herrenschmidt
2005-03-08 21:29 ` Kronos
2005-03-08 22:46 ` Benjamin Herrenschmidt
2005-03-09 10:22 ` Pekka Enberg
2005-03-09 20:06 ` Kronos
2005-03-08 22:01 ` Benjamin Herrenschmidt
2005-03-08 23:47 ` Jon Smirl
2005-03-09 0:02 ` Benjamin Herrenschmidt
2005-03-09 3:17 ` Jon Smirl
2005-03-09 3:53 ` Benjamin Herrenschmidt
2005-03-09 4:35 ` Jon Smirl
2005-03-09 5:37 ` Benjamin Herrenschmidt
2005-03-09 5:58 ` Jon Smirl
2005-03-09 6:00 ` Benjamin Herrenschmidt
2005-03-09 8:04 ` Benjamin Herrenschmidt [this message]
2005-03-09 16:57 ` Jesse Barnes
2005-03-09 10:45 ` Pekka Enberg
2005-03-09 22:02 ` Benjamin Herrenschmidt
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=1110355442.32524.97.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=eich@freedesktop.org \
--cc=jonsmirl@gmail.com \
--cc=jonsmirl@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xorg@freedesktop.org \
/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