f61bacead1c1d9eafa38dd48e1db3bfcb7919f4c
[dragonfly.git] / share / man / man4 / drm.4
1 .\"     $NetBSD: drm.4,v 1.7 2009/05/12 08:16:46 wiz Exp $
2 .\"
3 .\" Copyright (c) 2007 Thomas Klausner
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 .\"
26 .Dd September 13, 2013
27 .Dt DRM 4
28 .Os
29 .Sh NAME
30 .Nm drm
31 .Nd Direct Rendering Manager (DRI kernel support)
32 .Sh DESCRIPTION
33 The
34 .Tn Direct Rendering Manager
35 is part of the
36 .Tn Direct Rendering Infrastructure
37 (see
38 .Pa http://dri.freedesktop.org/ )
39 for supporting video acceleration.
40 For older chipsets it's used for 3d acceleration only, but newer chipsets
41 may require
42 .Nm
43 for 2d acceleration (XVideo, EXA) as well.
44 .Pp
45 The
46 .Nm
47 drivers provide support for the following chipsets:
48 .Bl -column -offset indent ".Sy ModuleXXX" ".Sy Kernel option" ".Sy Chipset"
49 .It Sy Module Ta Sy "Kernel option" Ta Sy Chipset
50 .It Pa i915kms.ko Ta n/a Ta Intel i915, i945, i965, G3x, G4x
51 .It Pa mach64.ko Ta Cd mach64drm Ta Mach64 (3D Rage Pro, Rage)
52 .It Pa mga.ko Ta Cd mgadrm Ta Matrox G[24]00, G[45]50
53 .It Pa r128.ko Ta Cd r128drm Ta Rage 128
54 .It Pa radeon.ko Ta Cd radeondrm Ta Radeon
55 .It Pa savage.ko Ta Cd savagedrm Ta S3 Savage
56 .It Pa sis.ko Ta Cd sisdrm Ta SiS
57 .It Pa tdfx.ko Ta Cd tdfxdrm Ta 3dfx (Voodoo)
58 .\".It Pa via.ko Ta Cd viadrm Ta VIA
59 .El
60 .Pp
61 In most cases
62 .Xr Xorg 1
63 will take care of loading the appropriate modules and it is not necessary to
64 modify
65 .Xr loader.conf 5
66 or the kernel configuration to enable
67 .Nm
68 support.
69 .Pp
70 Newer versions of
71 .Xr Xorg 1 ,
72 like the one from
73 .Xr dports 7 ,
74 do a pretty good job of figuring out the right configuration on their own,
75 so having no
76 .Xr xorg.conf 5
77 file at all is usually the best advice.
78 If for some reason an
79 .Xr xorg.conf 5
80 is preferred, DRI must be enabled:
81 .Bd -literal
82 Section "DRI"
83         Group "wheel"
84         Mode 0660
85 EndSection
86 .Ed
87 .Pp
88 With KMS, DRI is always enabled since the
89 .Nm
90 is always required.
91 .\".Pp
92 .\"In order to use two graphics cards (an on-board and another
93 .\"AGP/PCI/PCIe card) with DRI, a
94 .\".Pa /dev/dri/card1
95 .\"link to
96 .\".Pa /dev/dri/card0
97 .\"has to be created using
98 .\".Xr devfsctl 8 .
99 .Pp
100 If
101 .Xr Xorg 1
102 acceleration fails to initialize with a
103 .Dq contigmalloc_map: failed size...
104 error in dmesg, the reserve of memory for DMA ran out early and should
105 be increased to a sufficiently high value by setting the
106 .Va vm.dma_reserved
107 loader tunable.
108 A read only
109 .Xr sysctl 8
110 variable of the same name is provided for obtaining its current value.
111 .Pp
112 Debugging output can be enabled and disabled by setting the
113 .Xr sysctl 8
114 node
115 .Ar hw.dri.0.debug .
116 .Sh SEE ALSO
117 .Xr Xorg 1 ,
118 .Xr xorg.conf 5
119 .Sh HISTORY
120 DRM was first available for Linux.
121 Subsequently Eric Anholt ported the DRM kernel modules to
122 .Fx .
123 .Sh CAVEATS
124 Disable AIGLX if necessary
125 .Pq Pa xorg.conf :
126 .Bd -literal -offset indent
127 Section "ServerFlags"
128         Option  "AIGLX" "off"
129 EndSection
130 .\"
131 .\"Section "Extensions"
132 .\"        Option "Composite" "Disable"
133 .\"EndSection
134 .Ed
135 .Pp
136 .Cd options DRM_DEBUG
137 can slow DRI down a lot, disable it once
138 .Nm
139 works.