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