/[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.28 Revision 1.33
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.28 2006/02/01 11:58:34 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.33 2006/10/09 13:41:52 nightmorph 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">
8<mail link="spyderous@gentoo.org">Donnie Berkholz</mail> 8<mail link="dberkholz@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>
12</author> 12</author>
13 13
18 18
19<!-- The content of this document is licensed under the CC-BY-SA license --> 19<!-- The content of this document is licensed under the CC-BY-SA license -->
20<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 20<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
21<license/> 21<license/>
22 22
23<version>1.2</version> 23<version>1.4</version>
24<date>2006-02-01</date> 24<date>2006-10-09</date>
25 25
26<chapter> 26<chapter>
27<title>Introduction</title> 27<title>Introduction</title>
28<section> 28<section>
29<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>
46<section> 46<section>
47<title>How do I get hardware 3D acceleration?</title> 47<title>How do I get hardware 3D acceleration?</title>
48<body> 48<body>
49 49
50<p> 50<p>
51In many cases, both binary and open-source drivers exist. Open-source drivers 51In many cases, both binary and open-source drivers exist. Open-source drivers
52are preferable since we're using Linux and open source is one of its underlying 52are preferable since we're using Linux and open source is one of its underlying
53principles. Sometimes, binary drivers are the only option, like with nVidia's 53principles. Sometimes, binary drivers are the only option, like with nVidia's
54cards. Binary drivers include media-video/nvidia-kernel and 54cards. Binary drivers include media-video/nvidia-drivers and
55media-video/nvidia-glx for nVidia cards, media-video/mgavideo for Matrox cards 55media-video/nvidia-legacy-drivers for nVidia cards, media-video/mgavideo for
56and media-video/ati-drivers for ATI cards. Other open-source drivers include 56Matrox cards and media-video/ati-drivers for ATI cards. Other open-source
57media-video/kyro-kernel for KyroII cards and media-video/ati-gatos for ATI 57drivers include media-video/kyro-kernel for KyroII cards and
58cards, which aim to support ATI's video capabilities more fully. 58media-video/ati-gatos for ATI cards, which aim to support ATI's video
59capabilities more fully.
59</p> 60</p>
60 61
61</body> 62</body>
62</section> 63</section>
63<section> 64<section>
90<body> 91<body>
91 92
92<p> 93<p>
93This guide is for people who can't get direct rendering working with just Xorg. 94This guide is for people who can't get direct rendering working with just Xorg.
94X11-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64 and sis300 95X11-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64 and sis300
95series drivers. See the <uri link="http://dri.freedesktop.org/">DRI 96series drivers. VIA card owners should not use <c>x11-drm</c>, but should
96homepage</uri> for more info and documentation. 97instead use the DRI provided in recent kernels (&gt;2.6.13). See the <uri
98link="http://dri.freedesktop.org/">DRI homepage</uri> for more info and
99documentation.
97</p> 100</p>
98 101
99</body> 102</body>
100</section> 103</section>
101<section> 104<section>
102<title>Feedback</title> 105<title>Feedback</title>
103<body> 106<body>
104 107
105<p> 108<p>
106With suggestions, questions, etc., e-mail <mail 109With suggestions, questions, etc., e-mail <mail
107link="spyderous@gentoo.org">Donnie Berkholz</mail>. 110link="dberkholz@gentoo.org">Donnie Berkholz</mail>.
108</p> 111</p>
109 112
110</body> 113</body>
111</section> 114</section>
112</chapter> 115</chapter>
269<pre caption="Editing /etc/modules.autoload.d/kernel-2.6"> 272<pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
270<comment>(Change module name as required.)</comment> 273<comment>(Change module name as required.)</comment>
271intel-agp 274intel-agp
272</pre> 275</pre>
273 276
277<note>
278If you compiled <c>agpgart</c> as a module, you will also need to add it to
279<path>/etc/modules.autoload.d/kernel-2.6</path>.
280</note>
281
274</body> 282</body>
275</section> 283</section>
276</chapter> 284</chapter>
277 285
278<chapter> 286<chapter>
280<section> 288<section>
281<title>Reboot to the new kernel</title> 289<title>Reboot to the new kernel</title>
282<body> 290<body>
283 291
284<p> 292<p>
285Reboot your computer to your new kernel. It's time to see if you have direct 293Reboot your computer to your new kernel and login as a normal user. It's time
286rendering and how good it is. 294to see if you have direct rendering and how good it is.
287</p> 295</p>
288 296
289<pre caption="Testing rendering"> 297<pre caption="Testing rendering">
290# <i>startx</i> 298$ <i>startx</i>
291<comment>(No need to load modules for your driver or agpgart, if you compiled agpgart as a module.)</comment> 299<comment>(No need to load modules for your driver or agpgart, even if you compiled them as a module.)</comment>
292<comment>(They will be loaded automatically.)</comment> 300<comment>(They will be loaded automatically.)</comment>
293# <i>glxinfo | grep rendering</i> 301$ <i>glxinfo | grep rendering</i>
294direct rendering: Yes 302direct rendering: Yes
295<comment>(If it says "No," you don't have 3D acceleration.)</comment> 303<comment>(If it says "No", you don't have 3D acceleration.)</comment>
296# <i>glxgears</i> 304$ <i>glxgears</i>
297<comment>(Test your frames per second (FPS) at the default size. The number should be )</comment> 305<comment>(Test your frames per second (FPS) at the default size. The number should be )</comment>
298<comment>(significantly higher than before installing x11-drm. Do this while the CPU is as idle as possible.)</comment> 306<comment>(significantly higher than before installing x11-drm. Do this while the CPU is as idle as possible.)</comment>
299</pre> 307</pre>
300 308
301</body> 309</body>
433<section> 441<section>
434<title>Get the most out of direct rendering</title> 442<title>Get the most out of direct rendering</title>
435<body> 443<body>
436 444
437<p> 445<p>
438A few options may increase performance by up to 30 percent (or more) over the 446A few options may increase performance by up to 30 percent (or more) over the
439default. Set them in <path>/etc/X11/xorg.conf</path>. 447default. Set them in <path>/etc/X11/xorg.conf</path>. However, you will first
448need to check that your motherboard and video card support these options.
449</p>
450
451<p>
452First, let's see if your video card can support fast writes. We'll do this by
453closely inspecting the output from <c>lspci</c>. Specifically, we are looking
454at the "VGA compatible controller" information.
455</p>
456
457<pre caption="Video card check">
458# <i>lspci -vv</i>
45901:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY (prog-if 00 [VGA])
460. . .
461Capabilities: [58] AGP version 2.0
462 Status: RQ=48 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW+ AGP3- Rate=x1,x2,x4
463</pre>
464
465<p>
466While quite a lot of information is produced, we are looking for <b>FW</b> in
467the "Status" subsection of the AGP "Capabilities" section. If <b>FW+</b> is
468present in the "Status" line, it means the card supports fast writes. We can
469now check if the motherboard supports fast writes.
470</p>
471
472<impo>
473If you do not see <b>FW+</b>, but instead see <b>FW-</b>, you cannot enable
474fast writes in <path>xorg.conf</path>. Your card does not support fast writes.
475</impo>
476
477<p>
478Now let's make sure the motherboard supports fast writes as well. This time,
479look at the "Host bridge" section of your <c>lspci</c> output.
480</p>
481
482<pre caption="Motherboard check">
483# <i>lspci -vv</i>
48400:00.0 Host bridge: Intel Corporation 82830 830 Chipset Host Bridge (rev 02)
485. . .
486Capabilities: [a0] AGP version 2.0
487 Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW+ AGP3- Rate=x1,x2,x4
488</pre>
489
490<p>
491Again, examine the "Status" subsection of your AGP "Capabilities" section. Look
492for <b>FW</b>. If you see <b>FW+</b>, your motherboard supports fast writes.
493</p>
494
495<impo>
496Remember, both your video card information and your motherboard information
497must show the same <b>FW</b> capability. If either device shows <b>FW-</b> in
498"Status", you cannot enable fast writes in <path>xorg.conf</path>.
499</impo>
500
501<p>
502Assuming that all has gone well and both your motherboard and video card
503support fast writes, let's enable this option in
504<path>/etc/X11/xorg.conf</path> and get the best performance out of your
505hardware.
440</p> 506</p>
441 507
442<pre caption="xorg.conf"> 508<pre caption="xorg.conf">
443Section "Device" 509Section "Device"
444 Option "AGPMode" "4" 510 Option "AGPMode" "4"
450 <comment>(This improved FPS from 618 to 702. It also is "risky" but few people have reported problems.)</comment> 516 <comment>(This improved FPS from 618 to 702. It also is "risky" but few people have reported problems.)</comment>
451 ... 517 ...
452EndSection 518EndSection
453</pre> 519</pre>
454 520
521<warn>
522Enabling <c>AGPFastWrite</c> on a VIA chipset will very likely cause your
523machine to lock up. VIA chipsets do not play nicely with fast writes, so use
524this setting at your own risk.
525</warn>
526
527<note>
528Remember, if you want fast writes to work properly, you will have to first
529enable the appropriate option in your BIOS.
530</note>
531
455<p> 532<p>
456If you want to set even more features, check out the <uri 533If you want to set even more features, check out the <uri
457link="http://dri.freedesktop.org/wiki/FeatureMatrix">feature matrix</uri> on 534link="http://dri.freedesktop.org/wiki/FeatureMatrix">feature matrix</uri> on
458the DRI web site or the <uri 535the DRI web site or the <uri
459link="http://dri.sourceforge.net/doc/dri_driver_features.phtml">features 536link="http://dri.sourceforge.net/doc/dri_driver_features.phtml">features

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

  ViewVC Help
Powered by ViewVC 1.1.20