1.\" $NetBSD: drm.4,v 1.4 2007/03/29 18:35:08 wiz 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 March 28, 2007 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.Sh DESCRIPTION 45The 46.Tn Direct Rendering Manager 47is part of the 48.Tn Direct Rendering Infrastructure 49(see 50.Pa http://dri.freedesktop.org/ ) 51for supporting video acceleration (3d acceleration, mostly). 52.Pp 53The 54.Nm 55drivers provide support for the following chipsets: 56.Bl -tag -width XsavagedrmXXX -offset indent -compact 57.It i915drm 58Intel i915, i945 59.It mach64drm 60Mach64 (3D Rage Pro, Rage) 61.It mgadrm 62Matrox G[24]00, G[45]50 63.It r128drm 64ATI Rage 128 65.It radeondrm 66ATI Radeon 67.It savagedrm 68S3 Savage 69.It sisdrm 70SiS 71.It tdfxdrm 723dfx (Voodoo) 73.It viadrm 74VIA 75.El 76.Pp 77To make use of the driver, 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.Pp 85Details for these steps: 86.Bl -enum -offset indent 87.It 88X must be compiled with DRI support. 89On i386, this is usually the default. 90.It 91Mesa (see 92.Pa http://www.mesa3d.org/ ) 93should be compiled for the netbsd-dri target, patch available at 94.Pa http://issc.uj.ac.za/~yorick/drm/mesa.patch 95.It 96The device node must exist: 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.It 104Enable DRI in the X configuration (either 105.Pa xorg.conf 106or 107.Pa XF86Config ) : 108.Bd -literal 109Section "Module" 110 ... 111 Load "dri" 112 Load "GLcore" 113 Load "glx" 114EndSection 115... 116Section "DRI" 117 Group "wheel" 118 Mode 0660 119EndSection 120.Ed 121.El 122.Pp 123Debugging output can be enabled and disabled by setting the 124.Xr sysctl 8 125node 126.Ar hw.dri.debug . 127Additional information can be obtained from the 128.Xr sysctl 8 129nodes 130.Ar hw.dri , 131.Ar hw.dri.card0 , 132.Ar hw.dri.card1 , 133etc. 134.Sh SEE ALSO 135.Xr X 7 136.Sh HISTORY 137DRM was first available for Linux. 138Subsequently Eric Anholt ported the DRM kernel modules to 139.Fx . 140Erik Reid adapted the 141.Fx 142DRM kernel modules to 143.Nx . 144As DRM continued to develop the 145.Nx 146support was neglected. 147Tonnerre Lombard got the DRM modules working again, but DRM 148development once again left the 149.Nx 150support behind. 151Finally Yorick Hardy took the 152.Fx 153DRM source and managed to get it compiling and working again on 154.Nx , 155thanks largely to the efforts of all those mentioned above. 156Subsequently Matthias Drochner improved the DRM file hierarchy for 157.Nx 158and committed the DRM kernel drivers. 159.Pp 160The 161.Nm 162drivers appeared in 163.Nx 5.0 . 164.Sh AUTHORS 165.An -nosplit 166.An Eric Anholt , 167.An Terry Barnaby , 168.An Erdi Chen , 169.An Michel Daenzer , 170.An Leif Delgass , 171.An Frank C. Earl , 172.An Rickard E. Faith , 173.An Jose Fonseca , 174.An Nicolai Haehnle , 175.An Jeff Hartmann , 176.An Thomas Hellstrom , 177.An Gareth Hughes , 178.An Felix Kuehling , 179.An Sung-Ching Lin , 180.An Kevin E. Martin , 181.An Jared D. McNeill , 182.An Daryll Strauss , 183.An Keith Whitwell 184.Sh CAVEATS 185Disable AIGLX if necessary 186.Pq Pa xorg.conf : 187.Bd -literal -offset indent 188Section "ServerFlags" 189 Option "AIGLX" "off" 190EndSection 191 192Section "Extensions" 193 Option "Composite" "Disable" 194EndSection 195.Ed 196.Pp 197In case of errors, 198.Pa /dev/dri/card0 199may be changed, make sure to recreate it in that case. 200.Pp 201.Cd options DRM_DEBUG 202can slow DRI down a lot, disable it once 203.Nm 204works. 205