From e75fbd3f918e86e545dfe6046b5d17a85be76f38 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 4 May 2007 18:26:41 -0600 Subject: [PATCH] Assorted miniglx updates. --- docs/MiniGLX.html | 13 --- docs/contents.html | 2 +- docs/fbdev-dri.html | 210 ++++++++++++++------------------------------ docs/subset.html | 17 +--- 4 files changed, 70 insertions(+), 172 deletions(-) diff --git a/docs/MiniGLX.html b/docs/MiniGLX.html index 3429812993a..e7ebae68519 100644 --- a/docs/MiniGLX.html +++ b/docs/MiniGLX.html @@ -88,19 +88,6 @@ driver (such as radeon_dri.so) at runtime.  The environment variable LIBGL_DRIVERS_PATH should name the directory where these modules are located.

-Prior to running a MiniGXL application, the following kernel modules -must be installed:
-
-
agpgart.o
-radeonfb.o  (assuming Radeon hardware)
-radeon.o  (assuming Radeon hardware)
-
-
-Finally, MiniGLX reads a configuration file (by default, -/etc/miniglx.conf) to determine basic configuration information. - The configuration file may also be located in the directory -specified by the MINIGLX_CONF environment variable).
-
The remainder of this section describes the MiniGLX API functions.

3.1 Initialization

diff --git a/docs/contents.html b/docs/contents.html index d8f427e59bc..a21341a5891 100644 --- a/docs/contents.html +++ b/docs/contents.html @@ -71,8 +71,8 @@ a:visited {
  • Help Wanted
  • Development Notes
  • Source Documentation -
  • Subset Information
  • fbdev/DRI Environment +
  • Mesa Subset Driver
  • glFBDev Driver
  • GL Dispatch diff --git a/docs/fbdev-dri.html b/docs/fbdev-dri.html index 4af503932be..cdc4bd62f83 100644 --- a/docs/fbdev-dri.html +++ b/docs/fbdev-dri.html @@ -12,161 +12,64 @@

    1. Introduction

    -The fbdev/DRI sub-project within Mesa brings hardware accelerated OpenGL -rendering to the Linux fbdev environment. -The X Window System / XFree86 is not needed. +The fbdev/DRI environment supports hardware-accelerated 3D rendering without +the X window system. This is typically used for embedded applications.

    -Basically, the DRI drivers for hardware -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. +Contributors to this project include Jon Smirl, Keith Whitwell and Dave Airlie.

    -DRI driver writers may find this simplified environment easier to work in, -compared to the full XFree86/DRI environment. +Applications in the fbdev/DRI environment use +the MiniGLX 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.

    -

    -Much of the work for this project has been done by Jon Smirl and -Keith Whitwell. -

    - -

    -To use fbdev/DRI, you'll need a Linux 2.4 or 2.6 kernel. -

    - -

    Background Info

    - -

    -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. -

    - -

    -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. -

    - - -

    2. Compilation

    -

    2.1 Compiling the DRM modules

    -

    -First, you'll need the DRM (Direct Rendering Manager) kernel module sources. -They're found in a module of the DRI CVS tree. -To obtain the code do the following: +You'll need the DRM and pciaccess libraries. Check with:

    -   cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/dri login
    -
    -

    -Press Enter/Return when prompted for a password. Then, -

    -
    -   cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/dri co drm
    +   pkg-config --modversion libdrm
    +   pkg-config --modversion pciaccess
     

    -Compile the DRM kernel modules: +You'll need fbdev header files. Check with:

    -  cd drm/linux
    -  make
    +   ls -l /usr/include/linux/fb.h
     

    -Note: you may need to be root in order to make a few symlinks. -

    -

    -When compilation is done, you should have at least the following -kernel modules: -

    -
    -  gamma.o
    -  i810.o
    -  i830.o
    -  mach64.o
    -  mga.o
    -  r128.o
    -  radeon.o
    -  savage.o
    -  sis.o
    -  tdfx.o
    -  via.o
    -
    -

    -You'll probably want to copy/move them into your kernel module directory -(for example: /lib/modules/2.4.18-14/kernel/drivers/char/drm/). -

    - - - -

    2.2 Compiling the Mesa drivers

    - -

    -Begin by editing the Mesa/configs/default file to set -the DRM_SOURCE_PATH variable. -Set it to the location where the DRM module sources are located. -For example, if your current directory in step 2.1 was /home/fred/ -set DRM_SOURCE_PATH to /home/fred/drm -

    - -

    -Next, assuming you're starting with a fresh Mesa CVS checkout, -do the following: +Compile Mesa with the 'linux-solo' configuration:

        make linux-solo
     

    -If you previously built the source tree, run make realclean -first to remove the old object files. -

    - -

    -When this is finished, check the Mesa/lib/ directory -to verify that the following files were made: +When complete you should have the following:

    - +

    3. Using fbdev/DRI

    -If XFree86 is currently running, exit/stop the X server so you're -working from the console. +If an X server currently running, exit/stop it so you're working from +the console.

    @@ -175,12 +78,23 @@ working from the console.

    You'll need to load the kernel modules specific to your graphics hardware. 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. +

    +

    +As root, the kernel modules can be loaded as follows:

    +

    +If you have Intel i915/i945 hardware: +

    +
    +   modprobe agpgart            # the AGP GART module
    +   modprobe intelfb            # the Intel fbdev driver
    +   modprobe i915               # the i915/945 DRI kernel module
    +

    -If you have ATI Radeon/R200 hardware, run as root: +If you have ATI Radeon/R200 hardware:

        modprobe agpgart            # the AGP GART module
    @@ -189,7 +103,7 @@ If you have ATI Radeon/R200 hardware, run as root:
     

    -If you have ATI Rage 128 hardware, run as root: +If you have ATI Rage 128 hardware:

        modprobe agpgart            # the AGP GART module
    @@ -198,7 +112,7 @@ If you have ATI Rage 128 hardware, run as root:
     

    -If you have Matrox G200/G400 hardware, run as root: +If you have Matrox G200/G400 hardware:

        modprobe agpgart            # the AGP GART module
    @@ -207,37 +121,46 @@ If you have Matrox G200/G400 hardware, run as root:
     

    -Then run lsmod to be sure the modules are loaded. -For a Radeon card, you should see something like this: +To verify that the agpgart, fbdev and drm modules are loaded:

    -Module                  Size  Used by    Not tainted
    -radeon                110308   0  (unused)
    -radeonfb               21900   0  (unused)
    -agpgart                43072   1 
    +   ls -l /dev/agpgart /dev/fb* /dev/dri
     
    - +

    +Alternately, use lsmod to inspect the currently installed modules. +If you have problems, look at the output of dmesg. +

    3.2 Configuration File

    -The Mesa/lib/miniglx.conf file should be installed -in /etc/. +Copy the sample miniglx.conf to /etc/miniglx.conf and review/edit its contents. +Alternately, the MINIGLX_CONF environment variable can be used to +indicate the location of miniglx.conf

    +To determine the pciBusID value, run lspci and examine the output. +For example: +

    +
    +   /sbin/lspci:
    +   00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Express Chipset Family Graphics Controller (rev 04)
    +

    -Edit /etc/miniglx.conf to be sure it's set up correctly -for your hardware. -Comments in the file explain the options. +00:02.0 indicates that pciBusID should be PCI:0:2:0

    + +

    3.3 Running fbdev/DRI Programs

    Make sure your LD_LIBRARY_PATH environment variable is set to the -Mesa/lib/ 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.

    @@ -268,27 +191,24 @@ them from a remote shell so that you can stop them with ctrl-C.

    4.0 Troubleshooting

    -

    +

      +
    1. If you try to run miniglxtest and get the following: -

      +
          [miniglx] failed to probe chipset
          connect: Connection refused
          server connection lost
       
      -

      It means that the sample_server process is not running. -

      - +
      +
      +
    2. 5.0 Programming Information

      -

      -The full OpenGL API is available with fbdev/DRI. -

      -

      OpenGL/Mesa is interfaced to fbdev via the MiniGLX interface. diff --git a/docs/subset.html b/docs/subset.html index dd1d742a821..4ac2eadffb9 100644 --- a/docs/subset.html +++ b/docs/subset.html @@ -1,17 +1,18 @@ -Mesa Subset +Mesa Subset Driver -

      Mesa Subset

      +

      Mesa Subset Driver

      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 -for the ATI R200 chip, for use with Linux fbdev rather than XFree86. +for the ATI R200 chip, for use with +fbdev/DRI environment.

      @@ -19,15 +20,5 @@ The specification for this subset can be found here.

      -

      -The MiniGLX specification describes the -interface between fbdev and Mesa. -

      - -

      -More info to come... -

      - - -- 2.30.2