VGA Arbiter

Paulo Ricardo Zanoni prz05 at c3sl.ufpr.br
Fri Oct 26 12:17:22 PDT 2007


Hi!

In 2005, there was some discussion[0, 1] about a possible VGA Arbiter inside the 
Kernel.  People discussed an interface and Benjamin Herrenschmidt started 
writing a implementation. Due to the lack of time he stopped working on it.

Me and Tiago Vignatti are interested on the problem (because we work with 
multiseat), so we started working on Benjamin's patch. We continued the 
implementation of the /dev interface[2], we created a small library that uses 
this interface[3] and we also made (tried to) the xserver use it[4].

The problem is that we're still trying to understand everything =) The code is a 
little complicated and we've never played with PCI stuff. So we want to hear 
your opinions if we're going on the right way.

To use the /dev interface you just write strings on the device and the kernel 
interprets it and does what it has to do. The interface is very simple and is 
explained at vgaarb.c:520 (kernel module code). It was originally written as 
part of the kernel, but we made it a module (to make easier to compile and 
test). The problem is that string comparing inside the kernel does not have too 
much performance.

The library is a very simple abstraction that talks to the /dev. The code still 
needs to change a lot, but works =)

The xserver code is actually a modification in the RAC code. We wrapped the 
video driver calls with with "get_lock" and "put_lock". This is really not what 
should be done, it is just the easier way to test if things work. Currently, it 
is not working and we're studying X's code to see what we did wrong (maybe the 
problem is in the Kernel module).

Until now, we're just trying to "make things work". After this, we'll make the 
code a lot better and improve performance.

We want to know what you guys think about it. Are we on the right way? Anyone 
willing to help?

Cheers,
Paulo (and Tiago).


[0] http://lists.freedesktop.org/archives/xorg/2005-March/006663.html
[1] http://lists.freedesktop.org/archives/xorg/2005-March/006745.html
[2] git-clone http://www.inf.ufpr.br/ribas/repos/vga-module.git
[3] git-clone http://www.inf.ufpr.br/ribas/repos/libvgaaccess.git
[4] Sorry, since it is not even working it's not worth publish the link =)
-- 
Paulo Ricardo Zanoni
C3SL - Centro de Computação Científica e Software Livre
www.c3sl.ufpr.br



More information about the xorg mailing list