3 <TITLE>Mesa fbdev/DRI Environment
</TITLE>
5 <BODY text=
"#000000" bgcolor=
"#55bbff" link=
"#111188">
7 <center><H1>Mesa fbdev/DRI Drivers
</H1></center>
10 <H1>1. Introduction
</H1>
13 The fbdev/DRI sub-project within Mesa brings hardware accelerated OpenGL
14 rendering to the Linux fbdev environment.
15 The X Window System / XFree86 is not needed.
19 Basically, the
<a href=
"http://dri.sf.net/">DRI
</a> drivers for hardware
20 accelerated OpenGL for XFree86 have been ported to fbdev so that X is
22 This means fbdev/DRI works in full-screen mode only.
26 DRI driver writers may find this simplified environment easier to work in,
27 compared to the full XFree86/DRI environment.
31 Much of the work for this project has been done by Jon Smirl and
36 To use fbdev/DRI, you'll need a Linux
2.4 or
2.6 kernel.
40 The fbdev/DRI Mesa code is in the Mesa CVS trunk (to be released as Mesa
45 <h1>2. Compilation
</h1>
48 Assuming you're starting with a fresh Mesa CVS checkout, do the following:
52 cp Makefile.X11 Makefile # or use a symlink
57 When this is finished, check the
<code>Mesa-newtree/lib
</code> directory
58 to verify that the following files were made:
62 <li><code>libGL.so
.1.2</code> - the client-side OpenGL library
63 (and a few symlinks to it).
64 <li><code>libGLU.so
.1.1</code> - the GLU library (and a few symlinks to it).
65 <li><code>libglut.so
.3.7</code> - the GLUT library (and a few symlinks to it).
66 <li><code>mga_dri.so
</code> - DRI driver for Matrox G200/G400 cards.
67 <li><code>r128_dri.so
</code> - DRI driver for ATI Rage
128 cards.
68 <li><code>r200_dri.so
</code> - DRI driver for ATI R200 Radeon cards.
69 <li><code>radeon_dri.so
</code> - DRI driver for original ATI Radeon cards.
70 <li><code>fb_dri.so
</code> - software-only fbdev driver.
71 <li><code>miniglx.conf
</code> - configuration file for the MiniGLX interface
75 <h1>3. Using fbdev/DRI
</h1>
78 If XFree86 is currently running, exit/stop the X server so you're
79 working from the console.
83 <h2>3.1 Kernel Modules
</h2>
86 You'll need to load kernel modules specific to your graphics hardware.
87 The following kernel modules should be included with your kernel.
92 If you have ATI Radeon/R200 hardware, run as root:
95 modprobe agpgart # the AGP GART module
96 modprobe radeonfb # the Radeon fbdev driver
97 modprobe radeon # the Radeon DRI kernel module
101 If you have ATI Rage
128 hardware, run as root:
104 modprobe agpgart # the AGP GART module
105 modprobe aty128fb # the Rage
128 fbdev driver
106 modprobe r128 # the Rage
128 DRI kernel module
110 If you have Matrox G200/G400 hardware, run as root:
113 modprobe agpgart # the AGP GART module
114 modprobe mgafb # the Matrox fbdev driver
115 modprobe mga # the Matrox DRI kernel module
119 Then run
<code>lsmod
</code> to be sure the modules are loaded.
120 For a Radeon card, you should see something like this:
123 Module Size Used by Not tainted
124 radeon
110308 0 (unused)
125 radeonfb
21900 0 (unused)
130 <h2>3.2 Configuration File
</h2>
133 The
<code>Mesa-newtree/lib/miniglx.conf
</code> file should be installed
134 in
<code>/etc/
</code>.
138 Edit
<code>/etc/miniglx.conf
</code> to be sure it's set up correctly
140 Comments in the file explain the options.
144 <h2>3.3 Running fbdev/DRI Programs
</h2>
147 Make sure your LD_LIBRARY_PATH environment variable is set to the
148 <code>Mesa-newtree/lib/
</code> directory.
152 Change to the
<code>Mesa-newtree/progs/miniglx/
</code> directory and
153 start the sample_server program in the background:
160 Then try running the
<code>miniglxtest
</code> program:
166 You should see a rotating quadrilateral which changes color as it rotates.
167 It will exit automatically after a bit.
171 If you run other tests in the miniglx/ directory, you may want to run
172 them from a remote shell so that you can stop them with ctrl-C.
177 <h1>4.0 Troubleshooting
</h1>
180 If you try to run miniglxtest and get the following:
183 [miniglx] failed to probe chipset
184 connect: Connection refused
185 server connection lost
188 It means that the sample_server process is not running.
194 <h1>5.0 Programming Information
</h1>
197 The full OpenGL API is available with fbdev/DRI.
201 OpenGL/Mesa is interfaced to fbdev via the
<a href=
"MiniGLX.html">MiniGLX
</a>
203 MiniGLX is a subset of Xlib and GLX API functions which provides just
204 enough functionality to setup OpenGL rendering and respond to simple
209 Since MiniGLX is a subset of the usual Xlib and GLX APIs, programs written
210 to the MiniGLX API can also be run on full Xlib/GLX implementations.
211 This allows some degree of flexibility for software development and testing.