1.\" $NetBSD: drm.4,v 1.16 2018/07/10 17:01:43 maya 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 46.Tn Direct Rendering Manager 47is part of the 48.Tn Direct Rendering Infrastructure 49for supporting video acceleration (3d acceleration, mostly). 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 93.Xr X 7 94will attempt to create the device node automatically. 95To create the device node manually: 96.Bd -literal -offset indent 97mkdir -p /dev/dri 98mknod /dev/dri/card0 c 180 0 99chgrp wheel /dev/dri/card0 100chmod 0660 /dev/dri/card0 101.Ed 102.Pp 103To enable DRI in the X configuration add the following to either 104.Pa xorg.conf 105for 106.Xr Xorg 1 107or 108.Pa XF86Config 109for 110.Xr XFree86 1 111: 112.Bd -literal -offset indent 113Section "Module" 114 ... 115 Load "dri" 116 Load "dri2" 117 Load "glx" 118EndSection 119\&... 120Section "DRI" 121 Group "wheel" 122 Mode 0660 123EndSection 124.Ed 125.Pp 126Debugging output can be enabled and disabled by setting the 127.Xr sysctl 8 128node 129.Ar hw.dri.debug . 130Additional information can be obtained from the 131.Xr sysctl 8 132nodes 133.Ar hw.dri , 134.Ar hw.dri.card0 , 135.Ar hw.dri.card1 , 136etc. 137.Sh SEE ALSO 138.Xr XFree86 1 , 139.Xr Xorg 1 , 140.Xr agp 4 , 141.Xr XF86Config 5 , 142.Xr xorg.conf 5 , 143.Xr X 7 , 144.Pa /usr/X11R[67]/lib/X11/doc/README.DRI 145.Pp 146.Lk http://dri.freedesktop.org/ "Direct Rendering Infrastructure" 147.Sh HISTORY 148DRM was first available for Linux. 149Subsequently Eric Anholt ported the DRM kernel modules to 150.Fx . 151Erik Reid adapted the 152.Fx 153DRM kernel modules to 154.Nx . 155As DRM continued to develop the 156.Nx 157support was neglected. 158Tonnerre Lombard got the DRM modules working again, but DRM 159development once again left the 160.Nx 161support behind. 162Finally Yorick Hardy took the 163.Fx 164DRM source and managed to get it compiling and working again on 165.Nx , 166thanks largely to the efforts of all those mentioned above. 167Subsequently Matthias Drochner improved the DRM file hierarchy for 168.Nx 169and committed the DRM kernel drivers. 170Matthew Green cleaned up this port and merged a set of newer 171drivers, with Arto Huusko and FUKAUMI Naoki helping to get 172the latest Mesa port up to date. 173.Pp 174The 175.Nm 176drivers appeared in 177.Nx 5.0 . 178.Sh AUTHORS 179.An -nosplit 180.An Eric Anholt , 181.An Terry Barnaby , 182.An Erdi Chen , 183.An Michel Daenzer , 184.An Leif Delgass , 185.An Frank C. Earl , 186.An Rickard E. Faith , 187.An Jose Fonseca , 188.An Nicolai Haehnle , 189.An Jeff Hartmann , 190.An Thomas Hellstrom , 191.An Gareth Hughes , 192.An Felix Kuehling , 193.An Sung-Ching Lin , 194.An Kevin E. Martin , 195.An Daryll Strauss , 196.An Keith Whitwell 197.Sh CAVEATS 198.Pp 199In case of errors, 200.Pa /dev/dri/card0 201may be changed, make sure to recreate it in that case. 202.Pp 203.Cd options DRM_DEBUG 204can slow DRI down a lot; disable it once 205.Nm 206works. 207