|
Lines 5-11
Link Here
|
| 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"> |
| 8 |
<mail link="donnie.berkholz@richmond.edu">Donnie Berkholz</mail> |
8 |
<mail link="spyderous@gentoo.org">Donnie Berkholz</mail> |
| 9 |
</author> |
9 |
</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> |
|
Lines 15-22
Link Here
|
| 15 |
|
15 |
|
| 16 |
<abstract>This document is a guide to getting 3D acceleration working using XFree-DRM with XFree86 in Gentoo Linux.</abstract> |
16 |
<abstract>This document is a guide to getting 3D acceleration working using XFree-DRM with XFree86 in Gentoo Linux.</abstract> |
| 17 |
|
17 |
|
| 18 |
<version>1.0.0</version> |
18 |
<version>1.0.1</version> |
| 19 |
<date>June 19 2003</date> |
19 |
<date>December 19 2003</date> |
| 20 |
|
20 |
|
| 21 |
<chapter> |
21 |
<chapter> |
| 22 |
<title>Introduction</title> |
22 |
<title>Introduction</title> |
|
Lines 31-44
Link Here
|
| 31 |
<section> |
31 |
<section> |
| 32 |
<title>How do I get hardware 3D acceleration?</title> |
32 |
<title>How do I get hardware 3D acceleration?</title> |
| 33 |
<body> |
33 |
<body> |
| 34 |
<p>In many cases, both binary and open-source drivers exist. Open-source drivers are preferable since we're using Linux and open source is one of its underlying principles. Sometimes, binary drivers are the only option, like with nVidia's cards. |
34 |
<p>In many cases, both binary and open-source drivers exist. Open-source drivers are preferable since we're using Linux and open source is one of its underlying principles. Sometimes, binary drivers are the only option, like with nVidia's cards. If you have an nVidia card, see the <uri link="nvidia_tsg.xml">nVidia troubleshooting guide</uri>. This guide describes how to use XFree-DRM's open-source drivers. Supported cards are listed later in the document. Binary drivers include media-video/nvidia-kernel and media-video/nvidia-glx for nVidia cards, media-video/mgavideo for Matrox cards and media-video/ati-drivers for ATI cards. Other open-source drivers include media-video/kyro-kernel for KyroII cards and media-video/ati-gatos for ATI cards, which aim to support ATI's video capabilities more fully.</p> |
| 35 |
<!-- |
|
|
| 36 |
Temporarily removed from the guide as nvidia tsg is not more |
| 37 |
supported. |
| 38 |
|
| 39 |
If you have an nVidia card, see the <uri link="nvidia_tsg.xml">nVidia troubleshooting guide</uri>. This guide describes how to use XFree-DRM's open-source drivers. Supported cards are listed later in the document. |
| 40 |
--> |
| 41 |
Binary drivers include media-video/mgavideo for Matrox and media-video/ati-drivers for ATI cards. Other open-source drivers include media-video/kyro-kernel for KyroII cards and media-video/ati-gatos for ATI cards, which aim to support ATI's video capabilities more fully.</p> |
| 42 |
</body> |
35 |
</body> |
| 43 |
</section> |
36 |
</section> |
| 44 |
|
37 |
|
|
Lines 54-60
Link Here
|
| 54 |
<section> |
47 |
<section> |
| 55 |
<title>What is XFree-DRM and how does it relate to regular XFree86?</title> |
48 |
<title>What is XFree-DRM and how does it relate to regular XFree86?</title> |
| 56 |
<body> |
49 |
<body> |
| 57 |
<p>XFree-DRM is an <e>enhancement</e> to XFree86 that adds 3D acceleration for cards to which XFree86 doesn't provide acceleration.</p> |
50 |
<p>XFree-DRM is an <e>enhancement</e> to XFree86 that adds 3D acceleration for cards by adding the kernel module necessary for direct rendering.</p> |
| 58 |
</body> |
51 |
</body> |
| 59 |
</section> |
52 |
</section> |
| 60 |
|
53 |
|
|
Lines 62-68
Link Here
|
| 62 |
<section> |
55 |
<section> |
| 63 |
<title>Purpose</title> |
56 |
<title>Purpose</title> |
| 64 |
<body> |
57 |
<body> |
| 65 |
<p>This guide is for people that can't get direct rendering working with just XFree. XFree-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon and sis drivers. There's also some support for mach64 in the CVS sources -- check out <uri link="http://www.retinalburn.net/linux/dri_status.html">this site</uri> and the <uri link="http://www.retinalburn.net/linux/dri_HOWTO.html">howto</uri>. Since the 2.4 kernels' Direct Rendering Manager (DRM) doesn't support XFree 4.3, the xfree-drm package is needed. If you're using a 2.5 kernel, its DRM supports XFree 4.3; so unless your card is so new it doesn't get direct rendering, don't bother with this guide. See the <uri link="http://dri.sourceforge.net">DRI homepage</uri> for more info and documentation. </p> |
58 |
<p>This guide is for people who can't get direct rendering working with just XFree. XFree-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64 (as of xfree-drm-4.3.0-r7) and sis300 series drivers. Since the 2.4 kernels' Direct Rendering Manager (DRM) doesn't support XFree 4.3, the xfree-drm package is needed. If you're using a 2.6 kernel, its DRM supports XFree 4.3; Gentoo's XFree-DRM package is not yet working on 2.6 kernels. See the <uri link="http://dri.sourceforge.net">DRI homepage</uri> for more info and documentation. </p> |
| 66 |
</body> |
59 |
</body> |
| 67 |
</section> |
60 |
</section> |
| 68 |
|
61 |
|
|
Lines 70-76
Link Here
|
| 70 |
<section> |
63 |
<section> |
| 71 |
<title>Feedback</title> |
64 |
<title>Feedback</title> |
| 72 |
<body> |
65 |
<body> |
| 73 |
<p>For suggestions, questions, etc., e-mail <mail link="donnie.berkholz@richmond.edu">Donnie Berkholz</mail>.</p> |
66 |
<p>With suggestions, questions, etc., e-mail <mail link="spyderous@gentoo.org">Donnie Berkholz</mail>.</p> |
| 74 |
</body> |
67 |
</body> |
| 75 |
</section> |
68 |
</section> |
| 76 |
</chapter> |
69 |
</chapter> |
|
Lines 111-121
Link Here
|
| 111 |
<*> MTRR (Memory Type Range Register) support |
104 |
<*> MTRR (Memory Type Range Register) support |
| 112 |
Character devices ---> |
105 |
Character devices ---> |
| 113 |
<*> /dev/agpgart (AGP Support) |
106 |
<*> /dev/agpgart (AGP Support) |
| 114 |
[*] Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support |
107 |
[M] Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support |
| 115 |
<codenote>Enable your chipset instead of the above.</codenote> |
108 |
<codenote>Enable your chipset instead of the above.</codenote> |
| 116 |
[ ] Direct Rendering Manager (XFree86 DRI support) |
109 |
[ ] Direct Rendering Manager (XFree86 DRI support) |
| 117 |
</pre> |
110 |
</pre> |
| 118 |
<p>Make sure the Direct Rendering Manager (DRM) is <e>off</e>. The XFree-DRM package will provide its own. The kernel's version is for XFree 4.2.</p> |
111 |
<p>Make sure the Direct Rendering Manager (DRM) is <e>off</e>. The XFree-DRM package will provide its own. The 2.4 kernel's version is for XFree 4.2.</p> |
| 119 |
</body> |
112 |
</body> |
| 120 |
</section> |
113 |
</section> |
| 121 |
|
114 |
|
|
Lines 163-169
Link Here
|
| 163 |
... |
156 |
... |
| 164 |
EndSection |
157 |
EndSection |
| 165 |
... |
158 |
... |
| 166 |
Section "DRI" |
159 |
Section "dri" |
| 167 |
Mode 0666 |
160 |
Mode 0666 |
| 168 |
EndSection |
161 |
EndSection |
| 169 |
</pre> |
162 |
</pre> |
|
Lines 187-193
Link Here
|
| 187 |
direct rendering: Yes |
180 |
direct rendering: Yes |
| 188 |
<codenote>If it says "No," you don't have 3D acceleration.</codenote> |
181 |
<codenote>If it says "No," you don't have 3D acceleration.</codenote> |
| 189 |
# <i>glxgears</i> |
182 |
# <i>glxgears</i> |
| 190 |
<codenote>Test your frames per second (FPS) at the default size. Do this while the CPU is as idle as possible.</codenote> |
183 |
<codenote>Test your frames per second (FPS) at the default size. The number should be significantly higher than before installing xfree-drm. Do this while the CPU is as idle as possible.</codenote> |
| 191 |
</pre> |
184 |
</pre> |
| 192 |
</body> |
185 |
</body> |
| 193 |
</section> |
186 |
</section> |
|
Lines 205-211
Link Here
|
| 205 |
<section> |
198 |
<section> |
| 206 |
<title>Do you need the CVS?</title> |
199 |
<title>Do you need the CVS?</title> |
| 207 |
<body> |
200 |
<body> |
| 208 |
<p>First you have to check whether the xfree-drm package works. If it doesn't and you have a very new card, you might want to consider the CVS sources. The xfree-drm package currently supports at least the Radeon 9000.</p> |
201 |
<p>First you have to check whether the xfree-drm package works. If it doesn't and you have checked your logs to verify it's not a configuration error, you might want to consider the CVS sources. There are also daily driver snapshots available if you do not wish to build the full CVS.</p> |
| 209 |
</body> |
202 |
</body> |
| 210 |
</section> |
203 |
</section> |
| 211 |
<section> |
204 |
<section> |
|
Lines 222-228
Link Here
|
| 222 |
<section> |
215 |
<section> |
| 223 |
<title>Install the CVS sources</title> |
216 |
<title>Install the CVS sources</title> |
| 224 |
<body> |
217 |
<body> |
| 225 |
<p>Follow this guide through "Compile and install your kernel." Then we'll move to step 6 of the <uri link="http://dri.sourceforge.net/doc/DRIcompile.html">DRI compilation guide</uri> and follow it through step 8.3.</p> |
218 |
<p>Follow this guide through "Compile and install your kernel." Then continue with this guide, which tracks step 6 of the <uri link="http://dri.sourceforge.net/doc/DRIcompile.html">DRI compilation guide</uri> and follows it through step 8.3.</p> |
| 226 |
</body> |
219 |
</body> |
| 227 |
</section> |
220 |
</section> |
| 228 |
|
221 |
|
|
Lines 241-247
Link Here
|
| 241 |
# <i>cvs -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri login</i> |
234 |
# <i>cvs -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri login</i> |
| 242 |
<codenote>(hit ENTER when prompted for a password)</codenote> |
235 |
<codenote>(hit ENTER when prompted for a password)</codenote> |
| 243 |
# <i>cvs -z3 -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri co xc</i> |
236 |
# <i>cvs -z3 -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri co xc</i> |
| 244 |
<codenote>The -z3 flag causes compression to be used in order to reduce the download time.</codenote> |
237 |
<codenote>The -z3 flag causes compression to be used to reduce the download time.</codenote> |
| 245 |
</pre> |
238 |
</pre> |
| 246 |
</body> |
239 |
</body> |
| 247 |
</section> |
240 |
</section> |
|
Lines 301-310
Link Here
|
| 301 |
/* #define DoLoadableServer NO */ |
294 |
/* #define DoLoadableServer NO */ |
| 302 |
#define SharedLibFont NO |
295 |
#define SharedLibFont NO |
| 303 |
</pre> |
296 |
</pre> |
| 304 |
<p>The ProjectRoot variable specifies where the XFree86 files will be installed. We recommend installing the DRI files over your existing XFree86 installation - it's generally safe to do and less error-prone. This policy is different from what we used to recommend.</p> |
|
|
| 305 |
<p>If XFree86 4.x is not installed in <path>/usr/X11R6/</path> you'll have to add the following to the host.def file:</p> |
| 306 |
<pre> |
297 |
<pre> |
| 307 |
#define ProjectRoot pathToYourXFree86installation |
|
|
| 308 |
<codenote>Note the XF86CardDrivers line to be sure your card's driver is listed.</codenote> |
298 |
<codenote>Note the XF86CardDrivers line to be sure your card's driver is listed.</codenote> |
| 309 |
<codenote>If you want to enable 3DNow! optimizations in Mesa and the DRI drivers, you should add the following:</codenote> |
299 |
<codenote>If you want to enable 3DNow! optimizations in Mesa and the DRI drivers, you should add the following:</codenote> |
| 310 |
#define MesaUse3DNow YES |
300 |
#define MesaUse3DNow YES |
|
Lines 327-333
Link Here
|
| 327 |
# <i>cd ~/DRI-CVS/build/xc/</i> |
317 |
# <i>cd ~/DRI-CVS/build/xc/</i> |
| 328 |
# <i>make World >& world.log</i> |
318 |
# <i>make World >& world.log</i> |
| 329 |
</pre> |
319 |
</pre> |
| 330 |
<p>One user suggests it may also be necessary to do the following:</p> |
320 |
<p>Tt may also be necessary to do the following, depending on what you placed in host.def:</p> |
| 331 |
<pre> |
321 |
<pre> |
| 332 |
# <i>cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel</i> |
322 |
# <i>cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel</i> |
| 333 |
# <i>make -f Makefile.linux radeon.o</i> |
323 |
# <i>make -f Makefile.linux radeon.o</i> |
|
Lines 341-361
Link Here
|
| 341 |
|
331 |
|
| 342 |
|
332 |
|
| 343 |
<section> |
333 |
<section> |
| 344 |
<title>Install your driver</title> |
334 |
<title>Install the CVS</title> |
| 345 |
<body> |
335 |
<body> |
| 346 |
<p>Verify that the DRI kernel module(s) for your system were built:</p> |
336 |
<p>Verify that the DRI kernel module(s) for your system were built:</p> |
| 347 |
<pre> |
337 |
<pre> |
| 348 |
# <i>cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel; ls</i> |
338 |
# <i>cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel; ls</i> |
| 349 |
</pre> |
339 |
</pre> |
| 350 |
<p>For the 3dfx Voodoo, you should see <path>tdfx.o</path>. For the Matrox G200/G400, you should see <path>mga.o</path>. For the ATI Rage 128, you should see <path>r128.o</path>. For the ATI Radeon, you should see <path>radeon.o</path>. For the Intel i810, you should see <path>i810.o</path>. If the DRI kernel module(s) failed to build, you should verify that you're using the right version of the Linux kernel. The most recent kernels are not always supported.</p> |
340 |
<p>For the 3dfx Voodoo, you should see <path>tdfx.o</path>. For the Matrox G200/G400, you should see <path>mga.o</path>. For the ATI Rage 128, you should see <path>r128.o</path>. For the ATI Radeon, you should see <path>radeon.o</path>. For the Intel i810, you should see <path>i810.o</path>. If the DRI kernel module(s) failed to build, you should verify that you're using the right version of the Linux kernel. The most recent kernels are not always supported.</p> |
| 351 |
<p>Copy all of your driver files to your XFree86 installation. You may wish to back up replaced files. This is an example using a Radeon card. If you have another card, copy the appropriate files. If you don't know what they are, check the directory to which you're going to copy them to see what's there.</p> |
341 |
<p>Install over your XFree86 installation. You may wish to back up xfree.</p> |
| 352 |
<pre> |
342 |
<pre> |
| 353 |
# <i>cd ~/DRI-CVS/build/xc/exports/lib/modules/</i> |
343 |
# <i>quickpkg xfree</i> |
| 354 |
# <i>cp dri/r200_dri.so /usr/X11R6/lib/modules/dri/</i> |
344 |
<codenote>This backs up your XFree86 package.</codenote> |
| 355 |
# <i>cp drivers/atimisc_drv.o /usr/X11R6/lib/modules/drivers/</i> |
345 |
# <i>make install</i> |
| 356 |
# <i>cp drivers/radeon_drv.o /usr/X11R6/lib/modules/drivers/</i> |
|
|
| 357 |
# <i>cp extensions/libdri.a /usr/X11R6/lib/modules/extensions/</i> |
| 358 |
# <i>cp linux/libdrm.a /usr/X11R6/lib/modules/linux/</i> |
| 359 |
</pre> |
346 |
</pre> |
| 360 |
<p>Follow the "Configure XF86Config" section above.</p> |
347 |
<p>Follow the "Configure XF86Config" section above.</p> |
| 361 |
<p>To load the appropriate DRM module in your running kernel, copy the kernel module to <path>/lib/modules/`uname -r`/kernel/drivers/char/drm/</path> then run <c>modules-update</c> and restart your X server. If you're not running the kernel you'll be using it in, instead of <c>`uname -r`,</c> use that kernel's name.</p> |
348 |
<p>To load the appropriate DRM module in your running kernel, copy the kernel module to <path>/lib/modules/`uname -r`/kernel/drivers/char/drm/</path> then run <c>modules-update</c> and restart your X server. If you're not running the kernel you'll be using it in, instead of <c>`uname -r`,</c> use that kernel's name.</p> |
|
Lines 391-405
Link Here
|
| 391 |
<chapter> |
378 |
<chapter> |
| 392 |
<title>Troubleshooting</title> |
379 |
<title>Troubleshooting</title> |
| 393 |
<section> |
380 |
<section> |
|
|
381 |
<title>It doesn't work. I just recompiled my kernel or switched to a new one.</title> |
| 382 |
<body> |
| 383 |
<p>Whenever you rebuild your kernel or switch to another kernel, you'll have to rebuild the kernel module. Note that you don't need to remerge xfree, but you will need to remerge xfree-drm.</p> |
| 384 |
</body> |
| 385 |
</section> |
| 386 |
<section> |
| 394 |
<title>It doesn't work. I don't have rendering, and I can't tell why.</title> |
387 |
<title>It doesn't work. I don't have rendering, and I can't tell why.</title> |
| 395 |
<body> |
388 |
<body> |
| 396 |
<p>Try <c>insmod radeon</c> before you start the X server. Also, try building agpgart as a module instead of into the kernel.</p> |
389 |
<p>Try <c>insmod radeon</c> before you start the X server. Also, try building agpgart into the kernel instead of as a module.</p> |
| 397 |
</body> |
390 |
</body> |
| 398 |
</section> |
391 |
</section> |
| 399 |
<section> |
392 |
<section> |
| 400 |
<title>When I <c>startx</c>, I get this error: "[drm] failed to load kernel module agpgart"</title> |
393 |
<title>When I <c>startx</c>, I get this error: "[drm] failed to load kernel module agpgart"</title> |
| 401 |
<body> |
394 |
<body> |
| 402 |
<p>That's because you compiled agpgart into the kernel instead of as a module. Ignore it.</p> |
395 |
<p>That's because you compiled agpgart into the kernel instead of as a module. Ignore it unless you're having problems.</p> |
| 403 |
</body> |
396 |
</body> |
| 404 |
</section> |
397 |
</section> |
| 405 |
<section> |
398 |
<section> |
|
Lines 417-423
Link Here
|
| 417 |
<section> |
410 |
<section> |
| 418 |
<title>It doesn't work. My card is so incredibly new and cool that it isn't supported at all.</title> |
411 |
<title>It doesn't work. My card is so incredibly new and cool that it isn't supported at all.</title> |
| 419 |
<body> |
412 |
<body> |
| 420 |
<p>Try out the binary drivers. For ati-drivers, a listing is at <uri>http://www.schneider-digital.de/html/download_ati.html</uri>. If those don't support it, use VESA. It's slow, but it works. Check the drivers in the future because they will support your card soon.</p> |
413 |
<p>Try out the binary drivers. For ati-drivers, a listing is at <uri>http://www.schneider-digital.de/html/download_ati.html</uri>. If those don't support it, use fbdev. It's slow, but it works.</p> |
| 421 |
</body> |
414 |
</body> |
| 422 |
</section> |
415 |
</section> |
| 423 |
<section> |
416 |
<section> |
|
Lines 432-437
Link Here
|
| 432 |
|
425 |
|
| 433 |
|
426 |
|
| 434 |
<chapter> |
427 |
<chapter> |
|
|
428 |
<title>Acknowledgments</title> |
| 429 |
<section> |
| 430 |
<body> |
| 431 |
<p> |
| 432 |
<ol> |
| 433 |
<li>Christopher Webber for suggesting a troubleshooting question about changing or recompiling kernels</li> |
| 434 |
<li>Steve, for suggesting consistency between the cases of dri and DRI in XF86Config</li> |
| 435 |
</ol> |
| 436 |
</p> |
| 437 |
</body> |
| 438 |
</section> |
| 439 |
</chapter> |
| 440 |
|
| 441 |
|
| 442 |
<chapter> |
| 435 |
<title>References</title> |
443 |
<title>References</title> |
| 436 |
<section> |
444 |
<section> |
| 437 |
<body> |
445 |
<body> |