xref: /netbsd-src/share/man/man4/drm.4 (revision 154bfe8e089c1a0a4e9ed8414f08d3da90949162)
1.\"	$NetBSD: drm.4,v 1.17 2018/07/18 16:41:53 wiz Exp $
2.\"
3.\" Copyright (c) 2007, 2013 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 July 10, 2018
27.Dt DRM 4
28.Os
29.Sh NAME
30.Nm drm
31.Nd Direct Rendering Manager (DRI kernel support)
32.Sh SYNOPSIS
33.Cd i915drm*       at drm?
34.Cd mach64drm*     at drm?
35.Cd mgadrm*        at drm?
36.Cd r128drm*       at drm?
37.Cd radeondrm*     at drm?
38.Cd savagedrm*     at drm?
39.Cd sisdrm*        at drm?
40.Cd tdfxdrm*       at drm?
41.Pp
42.Cd options        DRM_DEBUG
43.Cd options        DRM_NO_AGP
44.Sh DESCRIPTION
45The Direct Rendering Manager is part of the Direct Rendering
46Infrastructure for supporting video acceleration (3d acceleration,
47mostly).
48.Pp
49The
50.Nm
51drivers provide support for the following chipsets:
52.Bl -tag -width XsavagedrmXXX -offset indent -compact
53.It i915drm
54Intel i915, i945
55.It mach64drm
56Mach64 (3D Rage Pro, Rage)
57.It mgadrm
58Matrox G[24]00, G[45]50
59.It r128drm
60ATI Rage 128
61.It radeondrm
62ATI Radeon
63.It savagedrm
64S3 Savage
65.It sisdrm
66SiS
67.It tdfxdrm
683dfx (Voodoo)
69.It viadrm
70VIA
71.El
72.Pp
73To make use of the driver, the kernel must include
74.Xr agp 4
75(for some drivers, using
76.Cd options        DRM_NO_AGP
77instead may be sufficient),
78.Xr X 7
79must be compiled with DRI support, Mesa DRI drivers must be installed,
80the appropriate
81.Pa /dev/dri/card*
82device must exist, and DRI must be enabled in the X configuration
83file.
84.Xr X 7
85provided with
86.Nx
87and compiled from
88.Xr pkgsrc 7
89do so automatically where supported.
90.Pp
91.Xr X 7
92will attempt to create the device node automatically.
93To create the device node manually:
94.Bd -literal -offset indent
95mkdir -p /dev/dri
96mknod /dev/dri/card0 c 180 0
97chgrp wheel /dev/dri/card0
98chmod 0660 /dev/dri/card0
99.Ed
100.Pp
101To enable DRI in the X configuration add the following to either
102.Pa xorg.conf
103for
104.Xr Xorg 1
105or
106.Pa XF86Config
107for
108.Xr XFree86 1
109:
110.Bd -literal -offset indent
111Section "Module"
112        ...
113        Load  "dri"
114        Load  "dri2"
115        Load  "glx"
116EndSection
117\&...
118Section "DRI"
119        Group "wheel"
120        Mode 0660
121EndSection
122.Ed
123.Pp
124Debugging output can be enabled and disabled by setting the
125.Xr sysctl 8
126node
127.Ar hw.dri.debug .
128Additional information can be obtained from the
129.Xr sysctl 8
130nodes
131.Ar hw.dri ,
132.Ar hw.dri.card0 ,
133.Ar hw.dri.card1 ,
134etc.
135.Sh SEE ALSO
136.Xr XFree86 1 ,
137.Xr Xorg 1 ,
138.Xr agp 4 ,
139.Xr XF86Config 5 ,
140.Xr xorg.conf 5 ,
141.Xr X 7 ,
142.Pa /usr/X11R[67]/lib/X11/doc/README.DRI
143.Pp
144.Lk http://dri.freedesktop.org/ "Direct Rendering Infrastructure"
145.Sh HISTORY
146DRM was first available for Linux.
147Subsequently Eric Anholt ported the DRM kernel modules to
148.Fx .
149Erik Reid adapted the
150.Fx
151DRM kernel modules to
152.Nx .
153As DRM continued to develop the
154.Nx
155support was neglected.
156Tonnerre Lombard got the DRM modules working again, but DRM
157development once again left the
158.Nx
159support behind.
160Finally Yorick Hardy took the
161.Fx
162DRM source and managed to get it compiling and working again on
163.Nx ,
164thanks largely to the efforts of all those mentioned above.
165Subsequently Matthias Drochner improved the DRM file hierarchy for
166.Nx
167and committed the DRM kernel drivers.
168Matthew Green cleaned up this port and merged a set of newer
169drivers, with Arto Huusko and FUKAUMI Naoki helping to get
170the latest Mesa port up to date.
171.Pp
172The
173.Nm
174drivers appeared in
175.Nx 5.0 .
176.Sh AUTHORS
177.An -nosplit
178.An Eric Anholt ,
179.An Terry Barnaby ,
180.An Erdi Chen ,
181.An Michel Daenzer ,
182.An Leif Delgass ,
183.An Frank C. Earl ,
184.An Rickard E. Faith ,
185.An Jose Fonseca ,
186.An Nicolai Haehnle ,
187.An Jeff Hartmann ,
188.An Thomas Hellstrom ,
189.An Gareth Hughes ,
190.An Felix Kuehling ,
191.An Sung-Ching Lin ,
192.An Kevin E. Martin ,
193.An Daryll Strauss ,
194.An Keith Whitwell
195.Sh CAVEATS
196In case of errors,
197.Pa /dev/dri/card0
198may be changed, make sure to recreate it in that case.
199.Pp
200.Cd options DRM_DEBUG
201can slow DRI down a lot; disable it once
202.Nm
203works.
204