Xgl page - http://www.freedesktop.org/Software/Xgl

Jon Smirl jonsmirl at gmail.com
Tue Mar 1 10:01:03 PST 2005


On Tue, 1 Mar 2005 11:31:26 -0500, Adam Jackson <ajax at nwnk.net> wrote:
> It's not "yet another" because the functionality we want (mode setting in
> particular) does not _have_ a common API.  And once again please don't
> suggest that Xgl is a DRI-only server.
> 
> I'm thinking that we expose this functionality through a (not yet written) EGL
> extension.  Horribly incomplete example:
> 
> typedef EGLBoolean (*eglSetModeExtProc)(EGLint x, EGLint y, EGLint vhz);
> eglSetModeExtProc setmode = eglGetProcAddress("eglSetModeEXT");
> setmode(1024, 768, 72);
> 
> Mesa would implement this through some common modeset library that throws
> requests at the kernel for sane OSes or handles them in userspace for
> braindead ones.  nVidia would handle them however they want inside their
> magic binary blob.
> 
> The point is that this is useful functionality for more than just X on GL, and
> that defining it as an extension to an accepted standard (EGL) _greatly_
> increases the chances that closed driver vendors will support it.  It is not
> "yet another" API because that would imply that this functionality already
> exists in some well-supported configuration and that we're just ignoring it.

Down in framebuffer land I'm in the process of building this
complicated procedure for getting events from the video card...

modprobe card driver
card driver checks if post needed, if so uses a new version of
request_firmware() to post
sys/graphics/fbX is added for each head
udev builds /dev/fbX for each head
1) driver locates monitors
creates sys/graphics/fbX/monitor(edid)
creating this causes a hotplug event
root priv hotplug event parses edid merges etc/mode file
sets legal modes back into sys/graphics/fbX(mode-list)
altering the modelist causes an event hal/dbus can see
user space mesa/X reads the mode-list, strings like 1024x768-60
set the one you want back into sys/graphics/fbX(mode)
this causes another hal/dbus event

If the card supports an interrupt on monitor change, flipping a KVM
switch will restart the process at #1.

Mode lists are generated at root priv.
Pam assigns ownership of mode variable to user
This allows a non-root user to safely set the mode

Patches for about 60% of this have been posted to fbdev. I'm working
on the rest.

-- 
Jon Smirl
jonsmirl at gmail.com



More information about the xorg mailing list