1.\" $NetBSD: drm.4,v 1.11 2010/05/11 18:27:04 mbalmer 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 May 11, 2010 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 vga? 34.Cd mach64drm* at vga? 35.Cd mgadrm* at vga? 36.Cd r128drm* at vga? 37.Cd radeondrm* at vga? 38.Cd savagedrm* at vga? 39.Cd sisdrm* at vga? 40.Cd tdfxdrm* at vga? 41.Cd viadrm* at vga? 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 50(see 51.Pa http://dri.freedesktop.org/ ) 52for supporting video acceleration (3d acceleration, mostly). 53.Pp 54The 55.Nm 56drivers provide support for the following chipsets: 57.Bl -tag -width XsavagedrmXXX -offset indent -compact 58.It i915drm 59Intel i915, i945 60.It mach64drm 61Mach64 (3D Rage Pro, Rage) 62.It mgadrm 63Matrox G[24]00, G[45]50 64.It r128drm 65ATI Rage 128 66.It radeondrm 67ATI Radeon 68.It savagedrm 69S3 Savage 70.It sisdrm 71SiS 72.It tdfxdrm 733dfx (Voodoo) 74.It viadrm 75VIA 76.El 77.Pp 78To make use of the driver, the kernel must include 79.Xr agp 4 80(for some drivers, using 81.Cd options DRM_NO_AGP 82instead may be sufficient), 83.Xr X 7 84must be compiled with DRI support, Mesa DRI drivers must be installed, 85the appropriate 86.Pa /dev/dri/card* 87device must exist, and DRI must be enabled in the X configuration 88file. 89.Xr X 7 90provided with 91.Nx 92and compiled from 93.Xr pkgsrc 7 94do so automatically where supported. 95.Pp 96.Xr X 7 97will attempt to create the device node automatically. 98To create the device node manually: 99.Bd -literal -offset indent 100mkdir -p /dev/dri 101mknod /dev/dri/card0 c 180 0 102chgrp wheel /dev/dri/card0 103chmod 0660 /dev/dri/card0 104.Ed 105.Pp 106To enable DRI in the X configuration add the following to either 107.Pa xorg.conf 108for 109.Xr Xorg 1 110or 111.Pa XF86Config 112for 113.Xr XFree86 1 114: 115.Bd -literal -offset indent 116Section "Module" 117 ... 118 Load "dri" 119 Load "dri2" 120 Load "glx" 121EndSection 122\&... 123Section "DRI" 124 Group "wheel" 125 Mode 0660 126EndSection 127.Ed 128.Pp 129Debugging output can be enabled and disabled by setting the 130.Xr sysctl 8 131node 132.Ar hw.dri.debug . 133Additional information can be obtained from the 134.Xr sysctl 8 135nodes 136.Ar hw.dri , 137.Ar hw.dri.card0 , 138.Ar hw.dri.card1 , 139etc. 140.Sh SEE ALSO 141.Xr XFree86 1 , 142.Xr Xorg 1 , 143.Xr agp 4 , 144.Xr XF86Config 5 , 145.Xr xorg.conf 5 , 146.Xr X 7 , 147.Pa /usr/X11R[67]/lib/X11/doc/README.DRI 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 Jared D. McNeill , 197.An Daryll Strauss , 198.An Keith Whitwell 199.Sh CAVEATS 200.Pp 201In case of errors, 202.Pa /dev/dri/card0 203may be changed, make sure to recreate it in that case. 204.Pp 205.Cd options DRM_DEBUG 206can slow DRI down a lot, disable it once 207.Nm 208works. 209