Xgl server

Jon Smirl jonsmirl at gmail.com
Sat Nov 6 16:41:29 PST 2004


On Sun, 07 Nov 2004 08:33:33 +1100, Benjamin Herrenschmidt
<benh at kernel.crashing.org> wrote:
> Where are you of your work on dual head fbdev ? I'm working on radeonfb
> a bit lately, mostly power management stuff, but I want to add support
> for mirroring using the second CRTC and may dual head. The problem with
> the later is the fbdev API itself isn't very good at it. Userland need
> to know what head is "linked" to what head, among others, plus the need
> to dynamically add/remove the second head when user enables mirroring
> for example.

If you start from the end result of wanting XGL as the desktop X
server, you then figure out that you need a standalone OpenGL
implementation to run it on. We have that in mesa-solo. Currently
mesa-solo does not include mode setting and cursor support. To get
mode setting and cursor support mesa-solo uses fbdev.

Next you want both heads to work. Since mode setting and cursor
support is coming from fbdev I started looking at fbdev to add second
head support. At this point you will come to realize that the fbinfo
structure is not designed to support more that one head. DRM also did
not have the correct structure for supporting multiple heads, but that
is fixed now.

At OLS Alan Cox and I discussed several solutions for controlling
modes for multiple heads. The best solution we came up with is via
sysfs. The code at  bk://mesa3d@bkbits.net/drm-fb starts to implement
this. The code is also a start at integrating fbdev/DRM.

/sys/class/dri/card0
      modes
      mode
      monitor
/sys/class/dri/card1
      modes
      mode
      monitor

modes is the list of legal modes. It includes merged fbmodes. You set
a mode by taking a string from modes and sett it to mode. displaying
mode gives the current mode. If either card0/1 sets a merged fbmode
the other device will disappear. The same effect could be done for
clone. If you don't own both devices you can't set merged fb or clone.

I have code in there for setting the mode on the second head but I
can't figure out why it isn't working.

The initial list of modes is set by a hotplug event from the driver
executing a root user space program. The user space program reads the
EDID and sets the modes by assigning them to modes. I used the fbmode
structure. The hotplug event is not hooked up yet.

There is a lot more coding and design work that needs to be done to
get all of this working. I treat fbdev and drm as core libraries. Some
drivers will load and only use the fbdev libraries. Other drivers,
like the radeon one, use both libraries. Multi-head just isn't going
to work unless the DRM/fbdev drivers are merged so that they can sort
out memory management.

Another project I need to finish is the little VGA driver that resets
secondary video cards at boot.

I would really like to encourage more people to help design and code a
set of video drivers capable of supporting mesa-solo and XGL. I'm only
about 5% of the way through this problem and I use all the help and I
can get. There are many more aspects to this this design that I can
explain further if people are interested.

-- 
Jon Smirl
jonsmirl at gmail.com



More information about the xorg mailing list