Assorted miniglx updates.
This commit is contained in:
@@ -88,19 +88,6 @@ driver (such as <code>radeon_dri.so</code>) at runtime. The
|
|||||||
environment variable <code>LIBGL_DRIVERS_PATH</code> should name the
|
environment variable <code>LIBGL_DRIVERS_PATH</code> should name the
|
||||||
directory where these modules are located.<br>
|
directory where these modules are located.<br>
|
||||||
<br>
|
<br>
|
||||||
Prior to running a MiniGXL application, the following kernel modules
|
|
||||||
must be installed:<br>
|
|
||||||
<br>
|
|
||||||
<div style="margin-left: 40px;"> agpgart.o<br>
|
|
||||||
radeonfb.o (assuming Radeon hardware)<br>
|
|
||||||
radeon.o (assuming Radeon hardware)<br>
|
|
||||||
</div>
|
|
||||||
<code></code> <br>
|
|
||||||
Finally, MiniGLX reads a configuration file (by default,<code>
|
|
||||||
/etc/miniglx.conf</code>) to determine basic configuration information.
|
|
||||||
The configuration file may also be located in the directory
|
|
||||||
specified by the <code>MINIGLX_CONF</code> environment variable).<br>
|
|
||||||
<br>
|
|
||||||
The remainder of this section describes the MiniGLX API functions.<br>
|
The remainder of this section describes the MiniGLX API functions.<br>
|
||||||
<br>
|
<br>
|
||||||
<h2>3.1 Initialization</h2>
|
<h2>3.1 Initialization</h2>
|
||||||
|
@@ -71,8 +71,8 @@ a:visited {
|
|||||||
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
|
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
|
||||||
<li><a href="devinfo.html" target="MainFrame">Development Notes</a>
|
<li><a href="devinfo.html" target="MainFrame">Development Notes</a>
|
||||||
<li><a href="sourcedocs.html" target="MainFrame">Source Documentation</a>
|
<li><a href="sourcedocs.html" target="MainFrame">Source Documentation</a>
|
||||||
<li><a href="subset.html" target="MainFrame">Subset Information</a>
|
|
||||||
<li><a href="fbdev-dri.html" target="MainFrame">fbdev/DRI Environment</a>
|
<li><a href="fbdev-dri.html" target="MainFrame">fbdev/DRI Environment</a>
|
||||||
|
<li><a href="subset.html" target="MainFrame">Mesa Subset Driver</a>
|
||||||
<li><a href="glfbdev-driver.html" target="MainFrame">glFBDev Driver</a>
|
<li><a href="glfbdev-driver.html" target="MainFrame">glFBDev Driver</a>
|
||||||
<LI><A HREF="dispatch.html" target="MainFrame">GL Dispatch</A>
|
<LI><A HREF="dispatch.html" target="MainFrame">GL Dispatch</A>
|
||||||
</ul>
|
</ul>
|
||||||
|
@@ -12,161 +12,64 @@
|
|||||||
<H1>1. Introduction</H1>
|
<H1>1. Introduction</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The fbdev/DRI sub-project within Mesa brings hardware accelerated OpenGL
|
The fbdev/DRI environment supports hardware-accelerated 3D rendering without
|
||||||
rendering to the Linux fbdev environment.
|
the X window system. This is typically used for embedded applications.
|
||||||
The X Window System / XFree86 is not needed.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Basically, the <a href="http://dri.sf.net/">DRI</a> drivers for hardware
|
Contributors to this project include Jon Smirl, Keith Whitwell and Dave Airlie.
|
||||||
accelerated OpenGL for XFree86 have been ported to fbdev so that X is
|
|
||||||
not needed.
|
|
||||||
This means fbdev/DRI works in full-screen mode only.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
DRI driver writers may find this simplified environment easier to work in,
|
Applications in the fbdev/DRI environment use
|
||||||
compared to the full XFree86/DRI environment.
|
the <a href="MiniGXL.html"> MiniGLX</a> interface to choose pixel
|
||||||
|
formats, create rendering contexts, etc. It's a subset of the GLX and
|
||||||
|
Xlib interfaces allowing some degree of application portability between
|
||||||
|
the X and X-less environments.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
|
||||||
Much of the work for this project has been done by Jon Smirl and
|
|
||||||
Keith Whitwell.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To use fbdev/DRI, you'll need a Linux 2.4 or 2.6 kernel.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Background Info</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The Mesa-based DRI drivers used to be hosted in the DRI tree (which is
|
|
||||||
basically a copy of the XFree86 tree).
|
|
||||||
Since the Mesa-based DRI drivers are moreso "Mesa drivers" than "XFree86
|
|
||||||
drivers" and the fact that with some work, the drivers could be used
|
|
||||||
without X, the driver code was moved into the Mesa tree.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
So now the DRI drivers can be compiled for two different environments:
|
|
||||||
fbdev and XFree86.
|
|
||||||
To build the drivers for XFree86, one has to download/build the DRI
|
|
||||||
source tree.
|
|
||||||
Eventually, we'd like to be able to build the drivers for XFree86 outside
|
|
||||||
of the XFree86/DRI trees.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h1>2. Compilation</h1>
|
<h1>2. Compilation</h1>
|
||||||
|
|
||||||
<h2>2.1 Compiling the DRM modules</h2>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
First, you'll need the DRM (Direct Rendering Manager) kernel module sources.
|
You'll need the DRM and pciaccess libraries. Check with:
|
||||||
They're found in a module of the DRI CVS tree.
|
|
||||||
To obtain the code do the following:
|
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/dri login
|
pkg-config --modversion libdrm
|
||||||
</pre>
|
pkg-config --modversion pciaccess
|
||||||
<p>
|
|
||||||
Press Enter/Return when prompted for a password. Then,
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/dri co drm
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Compile the DRM kernel modules:
|
You'll need fbdev header files. Check with:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
cd drm/linux
|
ls -l /usr/include/linux/fb.h
|
||||||
make
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Note: you may need to be root in order to make a few symlinks.
|
Compile Mesa with the 'linux-solo' configuration:
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
When compilation is done, you should have at least the following
|
|
||||||
kernel modules:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
gamma.o
|
|
||||||
i810.o
|
|
||||||
i830.o
|
|
||||||
mach64.o
|
|
||||||
mga.o
|
|
||||||
r128.o
|
|
||||||
radeon.o
|
|
||||||
savage.o
|
|
||||||
sis.o
|
|
||||||
tdfx.o
|
|
||||||
via.o
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
You'll probably want to copy/move them into your kernel module directory
|
|
||||||
(for example: <code>/lib/modules/2.4.18-14/kernel/drivers/char/drm/</code>).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>2.2 Compiling the Mesa drivers</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Begin by editing the <code>Mesa/configs/default</code> file to set
|
|
||||||
the <code>DRM_SOURCE_PATH</code> variable.
|
|
||||||
Set it to the location where the DRM module sources are located.
|
|
||||||
For example, if your current directory in step 2.1 was <code>/home/fred/</code>
|
|
||||||
set DRM_SOURCE_PATH to <code>/home/fred/drm</code>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Next, assuming you're starting with a fresh Mesa CVS checkout,
|
|
||||||
do the following:
|
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
make linux-solo
|
make linux-solo
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you previously built the source tree, run <code>make realclean</code>
|
When complete you should have the following:
|
||||||
first to remove the old object files.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
|
||||||
When this is finished, check the <code>Mesa/lib/</code> directory
|
|
||||||
to verify that the following files were made:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>libGL.so.1.2</code> - the client-side OpenGL library
|
<li>lib/libGL.so - the GL library which applications link with
|
||||||
(and a few symlinks to it).
|
<li>lib/*_dri_so - DRI drivers
|
||||||
<li><code>libGLU.so.1.1</code> - the GLU library (and a few symlinks to it).
|
<li>lib/miniglx.conf - sample MiniGLX config file
|
||||||
<li><code>libglut.so.3.7</code> - the GLUT library (and a few symlinks to it).
|
<li>progs/miniglx/* - several MiniGLX sample programs
|
||||||
<li><code>mga_dri.so</code> - DRI driver for Matrox G200/G400 cards.
|
|
||||||
<li><code>r128_dri.so</code> - DRI driver for ATI Rage 128 cards.
|
|
||||||
<li><code>r200_dri.so</code> - DRI driver for ATI R200 Radeon cards.
|
|
||||||
<li><code>radeon_dri.so</code> - DRI driver for original ATI Radeon cards.
|
|
||||||
<li><code>i810_dri.so</code> - DRI driver for Intel i810/i815 chips.
|
|
||||||
<li><code>i830_dri.so</code> - DRI driver for Intel i830/i845 chips.
|
|
||||||
<li><code>mga_dri.so</code> - DRI driver for Matrox G200/G400 cards.
|
|
||||||
<li><code>sis_dri.so</code> - DRI driver for SIS cards.
|
|
||||||
<li><code>tdfx_dri.so</code> - DRI driver for 3dfx Voodoo 3/4/5 cards.
|
|
||||||
<li><code>gamma_dri.so</code> - DRI driver for 3Dlabs gamma cards.
|
|
||||||
<li><code>fb_dri.so</code> - software-only fbdev driver.
|
|
||||||
<li><code>miniglx.conf</code> - configuration file for the MiniGLX interface
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h1>3. Using fbdev/DRI</h1>
|
<h1>3. Using fbdev/DRI</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If XFree86 is currently running, exit/stop the X server so you're
|
If an X server currently running, exit/stop it so you're working from
|
||||||
working from the console.
|
the console.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@@ -175,12 +78,23 @@ working from the console.
|
|||||||
<p>
|
<p>
|
||||||
You'll need to load the kernel modules specific to your graphics hardware.
|
You'll need to load the kernel modules specific to your graphics hardware.
|
||||||
Typically, this consists of the agpgart module, an fbdev driver module
|
Typically, this consists of the agpgart module, an fbdev driver module
|
||||||
and the DRM kernel module (from step 2.1).
|
and the DRM kernel module.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
As root, the kernel modules can be loaded as follows:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you have Intel i915/i945 hardware:
|
||||||
|
</p>
|
||||||
|
<pre>
|
||||||
|
modprobe agpgart # the AGP GART module
|
||||||
|
modprobe intelfb # the Intel fbdev driver
|
||||||
|
modprobe i915 # the i915/945 DRI kernel module
|
||||||
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you have ATI Radeon/R200 hardware, run as root:
|
If you have ATI Radeon/R200 hardware:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
modprobe agpgart # the AGP GART module
|
modprobe agpgart # the AGP GART module
|
||||||
@@ -189,7 +103,7 @@ If you have ATI Radeon/R200 hardware, run as root:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you have ATI Rage 128 hardware, run as root:
|
If you have ATI Rage 128 hardware:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
modprobe agpgart # the AGP GART module
|
modprobe agpgart # the AGP GART module
|
||||||
@@ -198,7 +112,7 @@ If you have ATI Rage 128 hardware, run as root:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you have Matrox G200/G400 hardware, run as root:
|
If you have Matrox G200/G400 hardware:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
modprobe agpgart # the AGP GART module
|
modprobe agpgart # the AGP GART module
|
||||||
@@ -207,37 +121,46 @@ If you have Matrox G200/G400 hardware, run as root:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Then run <code>lsmod</code> to be sure the modules are loaded.
|
To verify that the agpgart, fbdev and drm modules are loaded:
|
||||||
For a Radeon card, you should see something like this:
|
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
Module Size Used by Not tainted
|
ls -l /dev/agpgart /dev/fb* /dev/dri
|
||||||
radeon 110308 0 (unused)
|
|
||||||
radeonfb 21900 0 (unused)
|
|
||||||
agpgart 43072 1
|
|
||||||
</pre>
|
</pre>
|
||||||
|
<p>
|
||||||
|
Alternately, use lsmod to inspect the currently installed modules.
|
||||||
|
If you have problems, look at the output of dmesg.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2>3.2 Configuration File</h2>
|
<h2>3.2 Configuration File</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>Mesa/lib/miniglx.conf</code> file should be installed
|
Copy the sample miniglx.conf to /etc/miniglx.conf and review/edit its contents.
|
||||||
in <code>/etc/</code>.
|
Alternately, the MINIGLX_CONF environment variable can be used to
|
||||||
|
indicate the location of miniglx.conf
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
To determine the pciBusID value, run lspci and examine the output.
|
||||||
Edit <code>/etc/miniglx.conf</code> to be sure it's set up correctly
|
For example:
|
||||||
for your hardware.
|
|
||||||
Comments in the file explain the options.
|
|
||||||
</p>
|
</p>
|
||||||
|
<pre>
|
||||||
|
/sbin/lspci:
|
||||||
|
00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Express Chipset Family Graphics Controller (rev 04)
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
00:02.0 indicates that pciBusID should be PCI:0:2:0
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>3.3 Running fbdev/DRI Programs</h2>
|
<h2>3.3 Running fbdev/DRI Programs</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Make sure your LD_LIBRARY_PATH environment variable is set to the
|
Make sure your LD_LIBRARY_PATH environment variable is set to the
|
||||||
<code>Mesa/lib/</code> directory.
|
location of the libGL.so library. You may need to append other paths
|
||||||
|
to LD_LIBRARY_PATH if libpciaccess.so is in a non-standard location,
|
||||||
|
for example.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -268,27 +191,24 @@ them from a remote shell so that you can stop them with ctrl-C.
|
|||||||
|
|
||||||
<h1>4.0 Troubleshooting</h1>
|
<h1>4.0 Troubleshooting</h1>
|
||||||
|
|
||||||
<p>
|
<ol>
|
||||||
|
<li>
|
||||||
If you try to run miniglxtest and get the following:
|
If you try to run miniglxtest and get the following:
|
||||||
</p>
|
<br>
|
||||||
<pre>
|
<pre>
|
||||||
[miniglx] failed to probe chipset
|
[miniglx] failed to probe chipset
|
||||||
connect: Connection refused
|
connect: Connection refused
|
||||||
server connection lost
|
server connection lost
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
|
||||||
It means that the sample_server process is not running.
|
It means that the sample_server process is not running.
|
||||||
</p>
|
<br>
|
||||||
|
<br>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h1>5.0 Programming Information</h1>
|
<h1>5.0 Programming Information</h1>
|
||||||
|
|
||||||
<p>
|
|
||||||
The full OpenGL API is available with fbdev/DRI.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
OpenGL/Mesa is interfaced to fbdev via the <a href="MiniGLX.html">MiniGLX</a>
|
OpenGL/Mesa is interfaced to fbdev via the <a href="MiniGLX.html">MiniGLX</a>
|
||||||
interface.
|
interface.
|
||||||
|
@@ -1,17 +1,18 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
|
|
||||||
<TITLE>Mesa Subset</TITLE>
|
<TITLE>Mesa Subset Driver</TITLE>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||||
|
|
||||||
<BODY>
|
<BODY>
|
||||||
|
|
||||||
<H1>Mesa Subset</H1>
|
<H1>Mesa Subset Driver</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In 2002/2003 Tungsten Graphics was contracted to develop a subset Mesa/Radeon
|
In 2002/2003 Tungsten Graphics was contracted to develop a subset Mesa/Radeon
|
||||||
driver for an embedded environment. The result is a reduced-size DRI driver
|
driver for an embedded environment. The result is a reduced-size DRI driver
|
||||||
for the ATI R200 chip, for use with Linux fbdev rather than XFree86.
|
for the ATI R200 chip, for use with
|
||||||
|
<a href="fbdev-dri.html">fbdev/DRI environment</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -19,15 +20,5 @@ The specification for this subset can be found
|
|||||||
<a href="subset-A.html">here</a>.
|
<a href="subset-A.html">here</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
|
||||||
The <a href="MiniGLX.html">MiniGLX specification</a> describes the
|
|
||||||
interface between fbdev and Mesa.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
More info to come...
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
Reference in New Issue
Block a user