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

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

  ViewVC Help
Powered by ViewVC 1.1.20