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>i810_dri.so
</code> - DRI driver for Intel i810/i815 chips.
71 <li><code>i830_dri.so
</code> - DRI driver for Intel i830/i845 chips.
72 <li><code>mga_dri.so
</code> - DRI driver for Matrox G200/G400 cards.
73 <li><code>sis_dri.so
</code> - DRI driver for SIS cards.
74 <li><code>tdfx_dri.so
</code> - DRI driver for
3dfx Voodoo
3/
4/
5 cards.
75 <li><code>gamma_dri.so
</code> - DRI driver for
3Dlabs gamma cards.
76 <li><code>fb_dri.so
</code> - software-only fbdev driver.
77 <li><code>miniglx.conf
</code> - configuration file for the MiniGLX interface
81 <h1>3. Using fbdev/DRI
</h1>
84 If XFree86 is currently running, exit/stop the X server so you're
85 working from the console.
89 <h2>3.1 Kernel Modules
</h2>
92 You'll need to load kernel modules specific to your graphics hardware.
93 The following kernel modules should be included with your kernel.
98 If you have ATI Radeon/R200 hardware, run as root:
101 modprobe agpgart # the AGP GART module
102 modprobe radeonfb # the Radeon fbdev driver
103 modprobe radeon # the Radeon DRI kernel module
107 If you have ATI Rage
128 hardware, run as root:
110 modprobe agpgart # the AGP GART module
111 modprobe aty128fb # the Rage
128 fbdev driver
112 modprobe r128 # the Rage
128 DRI kernel module
116 If you have Matrox G200/G400 hardware, run as root:
119 modprobe agpgart # the AGP GART module
120 modprobe mgafb # the Matrox fbdev driver
121 modprobe mga # the Matrox DRI kernel module
125 Then run
<code>lsmod
</code> to be sure the modules are loaded.
126 For a Radeon card, you should see something like this:
129 Module Size Used by Not tainted
130 radeon
110308 0 (unused)
131 radeonfb
21900 0 (unused)
136 If the driver complains that the radeon/mga/etc/ kernel module is too
137 old, you'll have to compile/install a newer one from the DRI project.
141 <h2>3.2 Configuration File
</h2>
144 The
<code>Mesa-newtree/lib/miniglx.conf
</code> file should be installed
145 in
<code>/etc/
</code>.
149 Edit
<code>/etc/miniglx.conf
</code> to be sure it's set up correctly
151 Comments in the file explain the options.
155 <h2>3.3 Running fbdev/DRI Programs
</h2>
158 Make sure your LD_LIBRARY_PATH environment variable is set to the
159 <code>Mesa-newtree/lib/
</code> directory.
163 Change to the
<code>Mesa-newtree/progs/miniglx/
</code> directory and
164 start the sample_server program in the background:
171 Then try running the
<code>miniglxtest
</code> program:
177 You should see a rotating quadrilateral which changes color as it rotates.
178 It will exit automatically after a bit.
182 If you run other tests in the miniglx/ directory, you may want to run
183 them from a remote shell so that you can stop them with ctrl-C.
188 <h1>4.0 Troubleshooting
</h1>
191 If you try to run miniglxtest and get the following:
194 [miniglx] failed to probe chipset
195 connect: Connection refused
196 server connection lost
199 It means that the sample_server process is not running.
205 <h1>5.0 Programming Information
</h1>
208 The full OpenGL API is available with fbdev/DRI.
212 OpenGL/Mesa is interfaced to fbdev via the
<a href=
"MiniGLX.html">MiniGLX
</a>
214 MiniGLX is a subset of Xlib and GLX API functions which provides just
215 enough functionality to setup OpenGL rendering and respond to simple
220 Since MiniGLX is a subset of the usual Xlib and GLX APIs, programs written
221 to the MiniGLX API can also be run on full Xlib/GLX implementations.
222 This allows some degree of flexibility for software development and testing.
226 However, the MiniGLX API is not binary-compatible with full Xlib/GLX.
227 Some of the structures are different and some macros/functions work
229 See the
<code>GL/miniglx.h
</code> header file for details.