X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Ffbdev-dri.html;h=e941b1679ed78c7349242d97ca763dcca1b39e92;hb=73d9400ad65c1ec0a20c29805a9fc1930687988c;hp=cdc4bd62f830fd76a1ea66cb5d2653311dbe4239;hpb=e75fbd3f918e86e545dfe6046b5d17a85be76f38;p=mesa.git diff --git a/docs/fbdev-dri.html b/docs/fbdev-dri.html index cdc4bd62f83..e941b1679ed 100644 --- a/docs/fbdev-dri.html +++ b/docs/fbdev-dri.html @@ -1,15 +1,15 @@ - +
The fbdev/DRI environment supports hardware-accelerated 3D rendering without @@ -22,35 +22,131 @@ Contributors to this project include Jon Smirl, Keith Whitwell and Dave Airlie.
Applications in the fbdev/DRI environment use -the MiniGLX interface to choose pixel +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.
++Note that this environment is not well-supported and these instructions +may not be completely up to date. +
++
-You'll need the DRM and pciaccess libraries. Check with: +Check if you have libpciaccess installed:
-- pkg-config --modversion libdrm - pkg-config --modversion pciaccess -+
pkg-config --modversion pciaccess ++
+If not you can download the latest code from: +
+git clone git://anongit.freedesktop.org/git/xorg/lib/libpciaccess +
+Run autogen.sh to generate a configure file. autogen.sh uses autoconf +utility. This utility may not be installed with your linux distro, +check if it is available. if not you can use your package manager or +type: +
+sudo apt-get install autoconf ++The next step is to install the libpciaccess library. +
make +make install ++
Now your libpciaccess.a file is saved into /usr/local/lib +directory. If you have a libpciaccess.a in /usr/lib you may simply copy +and overwrite these files. Don't forget to copy libpciaccess.pc file to +/usr/lib/pkgconfig, which is also located in /usr/local/lib/pkgconfig/. +Or you may use the following system variables: +
+export LD_LIBRARY_PATH=/usr/local/lib +export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ++ +
The next step is to compile the drm. DRM consists of two seperate parts, +the DRM client library(lindrm.so) and kernel device module(such as +radeon.ko). We need to make a small change in kernel device module. So +you need to download the kernel source. You may choose the nearest +mirror from www.kernel.org, or you are using Fedora Core 5, for +example, you may need to install RPMs such as: +kernel-smp-devel-2.16.15-1.2054_FC5.i686.rpm +kernel-devel-2.6.15-1.2054_FC5.i686.rpm +etc. You can find a detailed information here. +
+ +You will find drm_drv.c at /usr/src/LINUX-VERSION/drivers/char/drm/. Edit this code and comment out the following part: +
+ ++ /* || + ((ioctl->flags & DRM_MASTER) && !priv->master)*/ ++Now you are ready to compile your kernel. If your kernel version is +identical to the version you have compiled, you can simply over write +your new "ko" files over older ones. If you have compiled a different +kernel, you must configure your grub or lilo to be able to boot your +new kernel.
You'll need fbdev header files. Check with:
- ls -l /usr/include/linux/fb.h + ls -l /usr/include/linux/fb.+
This file may be missing if you have not installed linux header files. -
-Compile Mesa with the 'linux-solo' configuration: + +
Get latest development Mesa sources from git repository +(currently 7.1-prerelease) +
++ git clone git://anongit.freedesktop.org/git/mesa/mesa ++ +
You will need the makedepend utility which is a part of mesa project +to build your linux-solo. You probably wont have this utility. You can +download its source from following git repulsitory: +
++ git clone git://anongit.freedesktop.org/git/xorg/util/makedepend ++ +
Get the latest stable mesa version from SourceForge (currently 7.0.3) +http://sourceforge.net/project/showfiles.php?group_id=3 +
+ +Copy the miniglx folder from 7.1-prerelease to 7.0.3. +You may also extract GLUT to 7.0.3 version at this step. +
+ +Edit linux-solo.conf at /conf directory, just only compile the +graphics driver you need, delete the unwanted drivers names from the +list(some drivers are causing problems...)
- make linux-solo + while(build==0) + { + make linux-solo + + There will be some missing header files, copy them from 7.1-prerelease + }
@@ -58,22 +154,40 @@ When complete you should have the following:
+ make install ++Now your openGL libraries are copied to /usr/local/lib and +miniglx.conf is copied to /etc. You may copy them to /usr/lib and +overwrite your old GL libraries. Or you may export following variable: + +
+ export LIBGL_DRIVERS_PATH=/usr/local/lib ++
If an X server currently running, exit/stop it so you're working from -the console. +the console. Following command shuts down the x window and also the multi user support.
++ init 1 +- -
Also you may define the runlevel as 1 in "/etc/inittab". Your system +will always start in single user mode and without x-window with this +option set. +
You'll need to load the kernel modules specific to your graphics hardware. @@ -87,8 +201,7 @@ As root, the kernel modules can be loaded as follows:
If you have Intel i915/i945 hardware:
-- modprobe agpgart # the AGP GART module +modprobe agpgart # the AGP GART module modprobe intelfb # the Intel fbdev driver modprobe i915 # the i915/945 DRI kernel module@@ -96,8 +209,7 @@ If you have Intel i915/i945 hardware:If you have ATI Radeon/R200 hardware:
-- modprobe agpgart # the AGP GART module +modprobe agpgart # the AGP GART module modprobe radeonfb # the Radeon fbdev driver modprobe radeon # the Radeon DRI kernel module@@ -105,8 +217,7 @@ If you have ATI Radeon/R200 hardware:If you have ATI Rage 128 hardware:
-- modprobe agpgart # the AGP GART module +modprobe agpgart # the AGP GART module modprobe aty128fb # the Rage 128 fbdev driver modprobe r128 # the Rage 128 DRI kernel module@@ -114,8 +225,7 @@ If you have ATI Rage 128 hardware:If you have Matrox G200/G400 hardware:
-- modprobe agpgart # the AGP GART module +modprobe agpgart # the AGP GART module modprobe mgafb # the Matrox fbdev driver modprobe mga # the Matrox DRI kernel module@@ -123,8 +233,7 @@ If you have Matrox G200/G400 hardware:To verify that the agpgart, fbdev and drm modules are loaded:
-- ls -l /dev/agpgart /dev/fb* /dev/dri +ls -l /dev/agpgart /dev/fb* /dev/driAlternately, use lsmod to inspect the currently installed modules. @@ -135,16 +244,15 @@ If you have problems, look at the output of dmesg.
3.2 Configuration File
-Copy the sample miniglx.conf to /etc/miniglx.conf and review/edit its contents. +review/edit /etc/miniglx.conf. 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: + +/sbin/lspci: 00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Express Chipset Family Graphics Controller (rev 04)@@ -167,15 +275,13 @@ for example. Change to the
-Mesa/progs/miniglx/
directory and start the sample_server program in the background:- ./sample_server & +./sample_server &Then try running the
-miniglxtest
program:- ./miniglxtest +./miniglxtestYou should see a rotating quadrilateral which changes color as it rotates. @@ -186,7 +292,7 @@ It will exit automatically after a bit. If you run other tests in the miniglx/ directory, you may want to run them from a remote shell so that you can stop them with ctrl-C.
- +
4.0 Troubleshooting
@@ -195,8 +301,7 @@ them from a remote shell so that you can stop them with ctrl-C.
- [miniglx] failed to probe chipset +[miniglx] failed to probe chipset connect: Connection refused server connection lost@@ -204,13 +309,13 @@ It means that the sample_server process is not running.
-OpenGL/Mesa is interfaced to fbdev via the MiniGLX
+OpenGL/Mesa is interfaced to fbdev via the MiniGLX
interface.
MiniGLX is a subset of Xlib and GLX API functions which provides just
enough functionality to setup OpenGL rendering and respond to simple
@@ -231,5 +336,6 @@ See the GL/miniglx.h
header file for details.