lkml.org 
[lkml]   [2005]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] VGA arbitration: draft of kernel side
From
Date
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.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.151 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site