/[gentoo]/xml/htdocs/doc/en/dri-howto.xml
Gentoo

Diff of /xml/htdocs/doc/en/dri-howto.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.12 Revision 1.28
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.12 2004/02/19 14:36:34 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.28 2006/02/01 11:58:34 neysx Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/dri-howto.xml"> 5<guide link="/doc/en/dri-howto.xml">
6<title>Hardware 3D Acceleration Guide</title> 6<title>Hardware 3D Acceleration Guide</title>
7<author title="Author"> 7<author title="Author">
10<author title="Editor"> 10<author title="Editor">
11<mail link="peesh@gentoo.org">Jorge Paulo</mail> 11<mail link="peesh@gentoo.org">Jorge Paulo</mail>
12</author> 12</author>
13 13
14<abstract> 14<abstract>
15This document is a guide to getting 3D acceleration working using XFree-DRM 15This document is a guide to getting 3D acceleration working using X11-DRM
16with XFree86 in Gentoo Linux. 16with Xorg in Gentoo Linux.
17</abstract> 17</abstract>
18 18
19<!-- The content of this document is licensed under the CC-BY-SA license -->
20<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
19<license/> 21<license/>
20 22
21<version>1.0.2</version> 23<version>1.2</version>
22<date>December 20 2003</date> 24<date>2006-02-01</date>
23 25
24<chapter> 26<chapter>
25<title>Introduction</title> 27<title>Introduction</title>
26<section> 28<section>
27<title>What is hardware 3D acceleration and why do I want it?</title> 29<title>What is hardware 3D acceleration and why do I want it?</title>
31With hardware 3D acceleration, three-dimensional rendering uses the graphics 33With hardware 3D acceleration, three-dimensional rendering uses the graphics
32processor on your video card instead of taking up valuable CPU resources 34processor on your video card instead of taking up valuable CPU resources
33drawing 3D images. It's also referred to as "hardware acceleration" instead of 35drawing 3D images. It's also referred to as "hardware acceleration" instead of
34"software acceleration" because without this 3D acceleration your CPU is forced 36"software acceleration" because without this 3D acceleration your CPU is forced
35to draw everything itself using the Mesa software rendering libraries, which 37to draw everything itself using the Mesa software rendering libraries, which
36takes up quite a bit of processing power. While XFree86 typically supports 2D 38takes up quite a bit of processing power. While Xorg typically supports 2D
37hardware acceleration, it often lacks hardware 3D acceleration. 39hardware acceleration, it often lacks hardware 3D acceleration.
38Three-dimensional hardware acceleration is valuable in situations requiring 40Three-dimensional hardware acceleration is valuable in situations requiring
39rendering of 3D objects such as games, 3D CAD and modeling. 41rendering of 3D objects such as games, 3D CAD and modeling.
40</p> 42</p>
41 43
61<section> 63<section>
62<title>What is DRI?</title> 64<title>What is DRI?</title>
63<body> 65<body>
64 66
65<p> 67<p>
66The Direct Rendering Infrastructure (<uri 68The <uri link="http://dri.freedesktop.org/wiki/">Direct Rendering
67link="http://dri.sourceforge.net">dri.sourceforge.net</uri>), also known as the 69Infrastructure</uri>, also known as the DRI, is a framework for allowing direct
68DRI, is a framework for allowing direct access to graphics hardware in a safe 70access to graphics hardware in a safe and efficient manner. It includes changes
69and efficient manner. It includes changes to the X server, to several client 71to the X server, to several client libraries and to the kernel. The first major
70libraries and to the kernel. The first major use for the DRI is to create fast 72use for the DRI is to create fast OpenGL implementations.
71OpenGL implementations.
72</p> 73</p>
73 74
74</body> 75</body>
75</section>
76<section> 76</section>
77<section>
77<title>What is XFree-DRM and how does it relate to regular XFree86?</title> 78<title>What is X11-DRM and how does it relate to regular Xorg?</title>
78<body> 79<body>
79 80
80<p> 81<p>
81XFree-DRM is an <e>enhancement</e> to XFree86 that adds 3D acceleration for 82X11-DRM is an <e>enhancement</e> to Xorg that adds 3D acceleration for
82cards by adding the kernel module necessary for direct rendering. 83cards by adding the kernel module necessary for direct rendering.
83</p> 84</p>
84 85
85</body> 86</body>
86</section> 87</section>
87<section> 88<section>
88<title>Purpose</title> 89<title>Purpose</title>
89<body> 90<body>
90 91
91<p> 92<p>
92This guide is for people who can't get direct rendering working with just 93This guide is for people who can't get direct rendering working with just Xorg.
93XFree. XFree-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64 94X11-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64 and sis300
94(as of xfree-drm-4.3.0-r7) and sis300 series drivers. Since the 2.4 kernels' 95series drivers. See the <uri link="http://dri.freedesktop.org/">DRI
95Direct Rendering Manager (DRM) doesn't support XFree 4.3, the xfree-drm package 96homepage</uri> for more info and documentation.
96is needed. If you're using a 2.6 kernel, its DRM supports XFree 4.3; Gentoo's
97XFree-DRM package is not yet working on 2.6 kernels. See the <uri
98link="http://dri.sourceforge.net">DRI homepage</uri> for more info and
99documentation.
100</p> 97</p>
101 98
102</body> 99</body>
103</section> 100</section>
104<section> 101<section>
113</body> 110</body>
114</section> 111</section>
115</chapter> 112</chapter>
116 113
117<chapter> 114<chapter>
118<title>Install XFree86 and configure your kernel</title> 115<title>Install Xorg and configure your kernel</title>
119<section> 116<section>
120<title>Install XFree86</title> 117<title>Install Xorg</title>
121<body> 118<body>
122 119
123<pre caption="Installing XFree86"> 120<p>
124# <i>emerge x11-base/xfree</i> 121Please read our <uri link="/doc/en/xorg-config.xml">Xorg Configuration
122Guide</uri> to get Xorg up and running.
125</pre> 123</p>
126 124
127</body> 125</body>
128</section> 126</section>
129<section> 127<section>
130<title>Configure your kernel</title> 128<title>Configure your kernel</title>
135</p> 133</p>
136 134
137<pre caption="Checking your AGP chipset"> 135<pre caption="Checking your AGP chipset">
138# <i>emerge pciutils; lspci | grep AGP</i> 136# <i>emerge pciutils; lspci | grep AGP</i>
139# <i>00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)</i> 137# <i>00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)</i>
140<codenote>Your output may not match the above due to different hardware.</codenote> 138<comment>(Your output may not match the above due to different hardware.)</comment>
139</pre>
140
141<p>
142If your chipset is not supported by the kernel you might have some succes by
143passing <c>agp=try_unsupported</c> as a kernel parameter. This will use Intel's
144generic routines for AGP support. To add this parameter, edit your bootloader
145configuration file!
141</pre> 146</p>
142 147
143<p> 148<p>
144Most, if not all, kernels should have these options. This was configured using 149Most, if not all, kernels should have these options. This was configured using
145gentoo-sources-2.4.20-r5. 150gentoo-sources-2.4.20-r5.
146</p> 151</p>
147 152
148<pre caption="Configuring the kernel"> 153<pre caption="Configuring the kernel">
149# <i>ls -l /usr/src/linux </i> 154# <i>ls -l /usr/src/linux </i>
150lrwxrwxrwx 1 root root 22 May 29 18:20 /usr/src/linux -> linux-2.4.20-gentoo-r5 155lrwxrwxrwx 1 root root 22 May 29 18:20 /usr/src/linux -> linux-2.4.20-gentoo-r5
151<codenote>Make sure <path>/usr/src/linux</path> links to your current kernel.</codenote> 156<comment>(Make sure /usr/src/linux links to your current kernel.)</comment>
152# <i>cd /usr/src/linux</i> 157# <i>cd /usr/src/linux</i>
153# <i>make menuconfig</i> 158# <i>make menuconfig</i>
154</pre> 159</pre>
155 160
156<pre caption="make menuconfig options"> 161<pre caption="make menuconfig options">
157Processor type and features ---&gt; 162Processor type and features ---&gt;
158&lt;*&gt; MTRR (Memory Type Range Register) support 163&lt;*&gt; MTRR (Memory Type Range Register) support
159Character devices ---&gt; 164Character devices ---&gt;
160&lt;M&gt; /dev/agpgart (AGP Support) 165&lt;M&gt; /dev/agpgart (AGP Support)
161[*] Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support 166[M] Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support
162<codenote>Enable your chipset instead of the above.</codenote> 167<comment>(Enable your chipset instead of the above.)</comment>
163[ ] Direct Rendering Manager (XFree86 DRI support) 168&lt; &gt; Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
164</pre> 169</pre>
165 170
166<p> 171<p>
167Make sure the Direct Rendering Manager (DRM) is <e>off</e>. The XFree-DRM 172Make sure the Direct Rendering Manager (DRM) is <e>off</e>.
168package will provide its own. The 2.4 kernel's version is for XFree 4.2. 173The X11-DRM package will provide its own.
169</p> 174</p>
170 175
171</body> 176</body>
172</section> 177</section>
173<section> 178<section>
174<title>Compile and install your kernel</title> 179<title>Compile and install your kernel</title>
175<body> 180<body>
176 181
177<pre caption="Compiling and installing kernel"> 182<pre caption="Compiling and installing kernel">
183<comment>(This example is for a 2.4 kernel)</comment>
178# <i>make dep &amp;&amp; make clean bzImage modules modules_install</i> 184# <i>make dep &amp;&amp; make clean bzImage modules modules_install</i>
179# <i>mount /boot</i> 185# <i>mount /boot</i>
180# <i>cp arch/i386/boot/bzImage /boot</i> 186# <i>cp arch/i386/boot/bzImage /boot</i>
181</pre> 187</pre>
182 188
189</body> 195</body>
190</section> 196</section>
191</chapter> 197</chapter>
192 198
193<chapter> 199<chapter>
194<title>Install XFree-DRM and configure direct rendering</title> 200<title>Install X11-DRM and configure direct rendering</title>
195<section>
196<title>Install XFree-DRM</title>
197<body>
198
199<pre caption="Installing XFree-DRM">
200# <i>ACCEPT_KEYWORDS="~x86" emerge xfree-drm</i>
201</pre>
202
203</body>
204</section> 201<section>
202<title>Install X11-DRM</title>
203<body>
204
205<pre caption="Installing X11-DRM">
206# <i>emerge x11-drm</i>
207</pre>
208
209</body>
205<section> 210</section>
211<section id="configure_xorg">
206<title>Configure XF86Config</title> 212<title>Configure Xorg.conf</title>
207<body> 213<body>
208 214
215<p>
216Some chipsets require you to rebuild <c>xorg-x11</c> with
217<c>USE="insecure-drivers"</c>. This applies to mach64, unichrome and savage
218chipsets on xorg-x11-6.8.2, and to mach64 and unichrome on xorg-x11-6.8.99.x.
219Savage users should not try xorg-x11-6.8.99.x as support for the savage there
220is broken.
209<p> 221</p>
222
223<pre caption="Rebuilding xorg-x11">
224<comment>(Add the insecure-drivers USE flag if you use one of the aforementioned chipsets)</comment>
225# <i>echo "x11-base/xorg-x11 insecure-drivers" &gt;&gt; /etc/portage/package.use</i>
226
227# <i>emerge xorg-x11</i>
228</pre>
229
230<p>
210Open <path>/etc/X11/XF86Config</path> with your favorite text editor and edit 231Open <path>/etc/X11/xorg.conf</path> with your favorite text editor and edit
211it to enable DRI and GLX. 232it to enable DRI and GLX.
212</p> 233</p>
213 234
214<pre caption="XF86Config"> 235<pre caption="xorg.conf">
215... 236...
216Section "Module" 237Section "Module"
217 Load "dri" 238 Load "dri"
218 Load "glx" 239 Load "glx"
219 ... 240 ...
233If you are using a different driver, replace "radeon" with yours. 254If you are using a different driver, replace "radeon" with yours.
234</p> 255</p>
235 256
236</body> 257</body>
237</section> 258</section>
259<section>
260<title>Changes to modules.autoload.d</title>
261<body>
262
263<p>
264You will need to add the module name that your card uses to
265<path>/etc/modules.autoload.d/kernel-2.6</path> to ensure that the module is
266loaded automatically when the system starts up.
267</p>
268
269<pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
270<comment>(Change module name as required.)</comment>
271intel-agp
272</pre>
273
274</body>
275</section>
238</chapter> 276</chapter>
239 277
240<chapter> 278<chapter>
241<title>Test 3D acceleration</title> 279<title>Test 3D acceleration</title>
242<section> 280<section>
248rendering and how good it is. 286rendering and how good it is.
249</p> 287</p>
250 288
251<pre caption="Testing rendering"> 289<pre caption="Testing rendering">
252# <i>startx</i> 290# <i>startx</i>
253<codenote>No need to load modules for your driver or agpgart, if you compiled agpgart as a module.</codenote> 291<comment>(No need to load modules for your driver or agpgart, if you compiled agpgart as a module.)</comment>
254<codenote>They will be loaded automatically.</codenote> 292<comment>(They will be loaded automatically.)</comment>
255# <i>glxinfo | grep rendering</i> 293# <i>glxinfo | grep rendering</i>
256direct rendering: Yes 294direct rendering: Yes
257<codenote>If it says "No," you don't have 3D acceleration.</codenote> 295<comment>(If it says "No," you don't have 3D acceleration.)</comment>
258# <i>glxgears</i> 296# <i>glxgears</i>
259<codenote>Test your frames per second (FPS) at the default size. The number should be </codenote> 297<comment>(Test your frames per second (FPS) at the default size. The number should be )</comment>
260<codenote>significantly higher than before installing xfree-drm. Do this while the CPU is as idle as possible.</codenote> 298<comment>(significantly higher than before installing x11-drm. Do this while the CPU is as idle as possible.)</comment>
261</pre> 299</pre>
262 300
263</body> 301</body>
264</section> 302</section>
265</chapter> 303</chapter>
271 309
272<warn> 310<warn>
273Don't do this if the package worked. 311Don't do this if the package worked.
274</warn> 312</warn>
275 313
276<note>
277By their nature, CVS sources are always changing. Your configuration may not
278look exactly like the one below.
279</note>
280
281</body> 314</body>
282</section> 315</section>
283<section> 316<section>
284<title>Do you need the CVS?</title> 317<title>Do you need the CVS?</title>
285<body> 318<body>
286 319
287<p> 320<p>
288First you have to check whether the xfree-drm package works. If it doesn't and 321First you have to check whether the x11-drm package works. If it doesn't and
289you have checked your logs to verify it's not a configuration error, you might 322you have checked your logs to verify it's not a configuration error, you might
290want to consider the CVS sources. There are also daily driver snapshots 323want to consider the CVS sources. There are also daily driver snapshots
291available if you do not wish to build the full CVS. 324available if you do not wish to build the full CVS.
292</p> 325</p>
293 326
296<section> 329<section>
297<title>Do the CVS sources support your card?</title> 330<title>Do the CVS sources support your card?</title>
298<body> 331<body>
299 332
300<p> 333<p>
301Check the DRI <uri link="http://dri.sourceforge.net/dri_status.phtml">supported 334Check the DRI <uri link="http://dri.freedesktop.org/wiki/Status">supported
302cards list</uri> to see if the CVS supports your card. Even if it doesn't, but 335cards list</uri> to see if the CVS supports your card. Even if it doesn't, but
303it supports a similar card, try it. 336it supports a similar card, try it.
304</p> 337</p>
338
339<!-- I see a couple of 8x AGP stuff on the Internet about vanilla 2.4 kernels;
340 is this now available or not? I've commented it out for the time being,
341 hoping that this doesn't affect us :)
305 342
306<warn> 343<warn>
307"Linux 2.4 doesn't support agp 8x, so I had to go find a backport. The backport 344"Linux 2.4 doesn't support agp 8x, so I had to go find a backport. The backport
308works .... it doesn't patch quite properly, and it requires 2.4.21 (I've only 345works .... it doesn't patch quite properly, and it requires 2.4.21 (I've only
309gotten it to work with vanilla, straight from the tarball (not ebuild)). First 346gotten it to work with vanilla, straight from the tarball (not ebuild)). First
310go get the 2.4.20-2.4.21 patch from kernel.org .... (then get the patch,) It 347go get the 2.4.20-2.4.21 patch from kernel.org .... (then get the patch,) It
311was on a mailing list somewhere. It doesn't patch cleanly -- one file fails, 348was on a mailing list somewhere. It doesn't patch cleanly - - one file fails,
312the pci_ids.h file, but if you actually read the file and the reject list, it's 349the pci_ids.h file, but if you actually read the file and the reject list, it's
313very easy to fix. But it does load, and it gives me 1600x1200 with video 350very easy to fix. But it does load, and it gives me 1600x1200 with video
314(although a bit slow b/c of lack of dga) with xfree-drm." (SanityInAnarchy on 351(although a bit slow b/c of lack of dga) with xfree-drm." (SanityInAnarchy on
315#gentoo) 352#gentoo)
316</warn> 353</warn>
319The patch is a little tricky to work with but <uri 356The patch is a little tricky to work with but <uri
320link="http://www.ussg.iu.edu/hypermail/linux/kernel/0302.2/att-1618/01-agp3.diff.bz2">here's 357link="http://www.ussg.iu.edu/hypermail/linux/kernel/0302.2/att-1618/01-agp3.diff.bz2">here's
321the link</uri>. If you can disable 8X AGP in your BIOS, change it to 4X and you 358the link</uri>. If you can disable 8X AGP in your BIOS, change it to 4X and you
322may not need the patch. 359may not need the patch.
323</impo> 360</impo>
361-->
324 362
325</body> 363</body>
326</section>
327<section> 364</section>
328<title>Install the CVS sources</title>
329<body>
330
331<p>
332Follow this guide through "Compile and install your kernel." Then continue with
333this guide, which tracks step 6 of the <uri
334link="http://dri.sourceforge.net/doc/DRIcompile.html">DRI compilation
335guide</uri> and follows it through step 8.3.
336</p>
337
338</body>
339</section> 365<section>
340<section> 366<title>Follow the CVS Instructions</title>
341<title>Anonymous CVS download</title>
342<body>
343
344<p>
345Create a directory to store the CVS files:
346</p>
347
348<pre caption="Create a directory for CVS">
349# <i>cd ~</i>
350# <i>mkdir DRI-CVS</i>
351</pre>
352
353<p>
354Check out the CVS sources:
355</p>
356
357<pre caption="Check out CVS sources">
358# <i>cd ~/DRI-CVS</i>
359# <i>cvs -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri login</i>
360<codenote>(hit ENTER when prompted for a password)</codenote>
361# <i>cvs -z3 -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri co xc</i>
362<codenote>The -z3 flag causes compression to be used to reduce the download time.</codenote>
363</pre>
364
365</body> 367<body>
366</section>
367<section>
368<title>Updating your CVS sources</title>
369<body>
370 368
371<p>
372In the future you'll want to occasionally update your local copy of the DRI
373source code to get the latest changes. This can be done with:
374</p> 369<p>
375 370The DRI project has a document about CVS compiling themselves. Please read <uri
376<pre caption="Update local copy"> 371link="http://dri.freedesktop.org/wiki/Building">the document</uri> and follow
377# <i>cd ~/DRI-CVS</i> 372the instructions up to the <e>Installing for X.org</e> part.
378# <i>cvs -z3 update -dA xc</i>
379<codenote>The -d flag causes any new subdirectories to be created.</codenote>
380<codenote>The -A flag causes most recent trunk sources to be fetched, not branch sources.</codenote>
381</pre>
382
383</body>
384</section>
385<section>
386<title>Make a build tree</title>
387<body>
388
389<p>
390Rather than placing object files and library files right in the source tree,
391they're instead put into a parallel <e>build</e> tree. The build tree is made
392with the <c>lndir</c> command:
393</p>
394
395<pre caption="Creating a parallel build tree">
396# <i>cd ~/DRI-CVS</i>
397# <i>ln -s xc XFree40</i>
398# <i>mkdir build; cd build</i>
399# <i>lndir -silent -ignorelinks ../XFree40</i>
400</pre>
401
402<p>
403The build tree will be populated with symbolic links which point back into the
404CVS source tree. Advanced users may have several build trees for compiling and
405testing with different options.
406</p>
407
408</body>
409</section>
410<section>
411<title>Edit the host.def file</title>
412<body>
413
414<p>
415The <path>~/DRI-CVS/build/xc/config/cf/host.def</path> file is used to
416configure the XFree86 build process. You can change it to customize your build
417options or make adjustments for your particular system configuration. The
418default host.def file will look something like this:
419</p>
420
421<pre caption="host.def">
422#define DefaultCCOptions -Wall
423<codenote>For i386:</codenote>
424#define DefaultGcc2i386Opt -O2
425<codenote>For Alpha:</codenote>
426#define DefaultGcc2AxpOpt -O2 -mcpu=ev6 (or similar)
427<codenote>For all architectures</codenote>
428#define LibraryCDebugFlags -O2
429#define BuildServersOnly YES
430#define XF86CardDrivers vga tdfx mga ati i810
431#define LinuxDistribution LinuxRedHat
432#define DefaultCCOptions -ansi GccWarningOptions -pipe
433#define BuildXF86DRI YES
434/* Optionally turn these on for debugging */
435/* #define GlxBuiltInTdfx YES */
436/* #define GlxBuiltInMga YES */
437/* #define GlxBuiltInR128 YES */
438/* #define GlxBuiltInRadeon YES */
439/* #define DoLoadableServer NO */
440#define SharedLibFont NO
441</pre>
442
443<pre caption="host.def continued">
444<codenote>Note the XF86CardDrivers line to be sure your card's driver is listed.</codenote>
445<codenote>If you want to enable 3DNow! optimizations in Mesa and the DRI drivers, you should add the following:</codenote>
446#define MesaUse3DNow YES
447<codenote>You don't have to be using an AMD processor to enable this option.</codenote>
448<codenote>The DRI will look for 3DNow! support at runtime and only enable it if applicable.</codenote>
449</pre>
450
451<p>
452If you want to enable SSE optimizations in Mesa and the DRI drivers, you must
453upgrade to a Linux 2.4.x kernel. Mesa will verify that SSE is supported by both
454your processor and your operating system, but to build Mesa inside the DRI you
455need to have the Linux 2.4.x kernel headers in <path>/usr/src/linux</path>. If
456you enable SSE optimizations with an earlier version of the Linux kernel in
457<path>/usr/src/linux</path>, Mesa will not compile. You have been warned. If
458you do have a 2.4.x kernel, you should add the following:
459</p>
460
461<pre caption="Update on host.def">
462#define MesaUseKatmai YES
463</pre>
464
465</body>
466</section>
467<section>
468<title>Compile the XFree86/DRI tree</title>
469<body>
470
471<p>
472To compile the complete DRI tree:
473</p>
474
475<pre caption="Compile the DRI tree">
476# <i>cd ~/DRI-CVS/build/xc/</i>
477# <i>make World &gt;&amp; world.log</i>
478</pre>
479
480<p>
481It may also be necessary to do the following, depending on what you placed in
482host.def:
483</p>
484
485<pre caption="Further compiling steps">
486# <i>cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel</i>
487# <i>make -f Makefile.linux radeon.o</i>
488<codenote>Replace radeon with your driver.</codenote>
489</pre>
490
491<p>
492With the default compilation flags it's normal to get a lot of warnings during
493compilation. Building will take some time so you may want to go check your
494email or visit slashdot.
495</p>
496
497<warn>
498Do not use the -j option with make (i.e., do not use distcc). It's reported that
499it does not work with XFree86/DRI.
500</warn>
501
502<p>
503Using your text editor, examine world.log for errors by searching for the
504pattern ***.
505</p> 373</p>
506 374
507</body> 375</body>
508</section> 376</section>
509<section> 377<section>
527using the right version of the Linux kernel. The most recent kernels are not 395using the right version of the Linux kernel. The most recent kernels are not
528always supported. 396always supported.
529</p> 397</p>
530 398
531<p> 399<p>
532Install over your XFree86 installation. You may wish to back up xfree. 400Install over your X.org installation. You may wish to back up xorg-x11.
533</p> 401</p>
534 402
535<pre caption="Backing up XFree"> 403<pre caption="Backing up Xorg">
536# <i>quickpkg xfree</i> 404# <i>quickpkg xorg-x11</i>
537<codenote>This backs up your XFree86 package.</codenote> 405<comment>(This backs up your Xorg-X11 package.)</comment>
538# <i>make install</i> 406# <i>make install</i>
539</pre> 407</pre>
540 408
541<p> 409<p>
542Follow the "Configure XF86Config" section above. 410Follow the "Configure Xorg" section above.
543</p> 411</p>
544 412
545<p> 413<p>
546To load the appropriate DRM module in your running kernel, copy the kernel 414To load the appropriate DRM module in your running kernel, copy the kernel
547module to <path>/lib/modules/`uname -r`/kernel/drivers/char/drm/</path> then 415module to <path>/lib/modules/`uname -r`/kernel/drivers/char/drm/</path> then
566<title>Get the most out of direct rendering</title> 434<title>Get the most out of direct rendering</title>
567<body> 435<body>
568 436
569<p> 437<p>
570A few options may increase performance by up to 30 percent (or more) over the 438A few options may increase performance by up to 30 percent (or more) over the
571default. Set them in <path>/etc/X11/XF86Config</path>. 439default. Set them in <path>/etc/X11/xorg.conf</path>.
572</p> 440</p>
573 441
574<pre caption="XF86Config"> 442<pre caption="xorg.conf">
575Section "Device" 443Section "Device"
576 Option "AGPMode" "4" 444 Option "AGPMode" "4"
577 <codenote>This increased FPS from 609 to 618.</codenote> 445 <comment>(This increased FPS from 609 to 618.)</comment>
578 Option "AGPFastWrite" "True" 446 Option "AGPFastWrite" "True"
579 <codenote>This had no measurable effect, but it may increase instability of your computer.</codenote> 447 <comment>(This had no measurable effect, but it may increase instability of your computer.)</comment>
580 <codenote>You may also need to set it in your BIOS.</codenote> 448 <comment>(You may also need to set it in your BIOS.)</comment>
581 Option "EnablePageFlip" "True" 449 Option "EnablePageFlip" "True"
582 <codenote>This improved FPS from 618 to 702. It also is "risky" but few people have reported problems.</codenote> 450 <comment>(This improved FPS from 618 to 702. It also is "risky" but few people have reported problems.)</comment>
583 ... 451 ...
584EndSection 452EndSection
585</pre> 453</pre>
586 454
587<p> 455<p>
588If you want to set even more features, check out the <uri 456If you want to set even more features, check out the <uri
457link="http://dri.freedesktop.org/wiki/FeatureMatrix">feature matrix</uri> on
458the DRI web site or the <uri
589link="http://dri.sourceforge.net/doc/dri_driver_features.phtml">features 459link="http://dri.sourceforge.net/doc/dri_driver_features.phtml">features
590listing</uri> on the DRI Web site. 460listing</uri> on Sourceforge.
591</p> 461</p>
592 462
593</body> 463</body>
594</section> 464</section>
595</chapter> 465</chapter>
599<section> 469<section>
600<title>It doesn't work. I just recompiled my kernel or switched to a new one.</title> 470<title>It doesn't work. I just recompiled my kernel or switched to a new one.</title>
601<body> 471<body>
602 472
603<p> 473<p>
604Whenever you rebuild your kernel or switch to another kernel, you'll have to 474Whenever you rebuild your kernel or switch to another kernel, you'll have to
605rebuild the kernel module. Note that you don't need to remerge xfree, but you 475rebuild the kernel module. Note that you don't need to remerge xorg-x11, but
606will need to remerge xfree-drm. 476you will need to remerge x11-drm.
607</p> 477</p>
608 478
609</body> 479</body>
610</section> 480</section>
611 481
619</p> 489</p>
620 490
621</body> 491</body>
622</section> 492</section>
623<section> 493<section>
624<title>When I <c>startx</c>, I get this error: "[drm] failed to load kernel module agpgart"</title> 494<title>When I startx, I get this error: "[drm] failed to load kernel module agpgart"</title>
625<body> 495<body>
626 496
627<p> 497<p>
628That's because you compiled agpgart into the kernel instead of as a module. 498That's because you compiled agpgart into the kernel instead of as a module.
629Ignore it unless you're having problems. 499Ignore it unless you're having problems.
630</p> 500</p>
631 501
632</body> 502</body>
633</section> 503</section>
634<section> 504<section>
635<title>Direct rendering doesn't work, and in <path>/var/log/XFree86.0.log</path> I have an error about driver version too low.</title> 505<title>Direct rendering doesn't work, and in /var/log/Xorg.0.log I have an error about driver version too low.</title>
636<body> 506<body>
637 507
638<p> 508<p>
639You aren't using the xfree-drm driver. Check if you compiled DRM and the driver 509You aren't using the x11-drm driver. Check if you compiled DRM and the driver
640into the kernel; you shouldn't have. 510into the kernel; you shouldn't have.
641</p> 511</p>
642 512
643</body> 513</body>
644</section> 514</section>
656<title>It doesn't work. My card is so incredibly new and cool that it isn't supported at all.</title> 526<title>It doesn't work. My card is so incredibly new and cool that it isn't supported at all.</title>
657<body> 527<body>
658 528
659<p> 529<p>
660Try out the binary drivers. For ati-drivers, a listing is at 530Try out the binary drivers. For ati-drivers, a listing is at
661<uri>http://www.schneider-digital.de/html/download_ati.html</uri>. If those 531<uri>http://www.schneider-digital.de/html/download_ati.php</uri>. If those
662don't support it, use fbdev. It's slow, but it works. 532don't support it, use fbdev. It's slow, but it works.
663</p> 533</p>
664 534
665</body> 535</body>
666</section> 536</section>
704<title>References</title> 574<title>References</title>
705<section> 575<section>
706<body> 576<body>
707 577
708<ol> 578<ol>
709 <li>http://forums.gentoo.org/viewtopic.php?t=46681</li> 579 <li><uri>http://forums.gentoo.org/viewtopic.php?t=46681</uri></li>
710 <li>http://forums.gentoo.org/viewtopic.php?t=29264</li> 580 <li><uri>http://forums.gentoo.org/viewtopic.php?t=29264</uri></li>
711 <li>http://dri.sourceforge.net/</li> 581 <li><uri>http://dri.freedesktop.org/</uri></li>
712 <li>http://www.retinalburn.net/linux/dri_status.html</li> 582 <li><uri>http://www.retinalburn.net/linux/dri_status.html</uri></li>
713</ol> 583</ol>
714 584
715</body> 585</body>
716</section> 586</section>
717</chapter> 587</chapter>

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.20