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