1*622428f5Swiz.\" $NetBSD: drm.4,v 1.9 2009/06/20 22:55:20 wiz Exp $ 2c15cd181Swiz.\" 3c15cd181Swiz.\" Copyright (c) 2007 Thomas Klausner 4c15cd181Swiz.\" All rights reserved. 5c15cd181Swiz.\" 6c15cd181Swiz.\" Redistribution and use in source and binary forms, with or without 7c15cd181Swiz.\" modification, are permitted provided that the following conditions 8c15cd181Swiz.\" are met: 9c15cd181Swiz.\" 1. Redistributions of source code must retain the above copyright 10c15cd181Swiz.\" notice, this list of conditions and the following disclaimer. 11c15cd181Swiz.\" 2. Redistributions in binary form must reproduce the above copyright 12c15cd181Swiz.\" notice, this list of conditions and the following disclaimer in the 13c15cd181Swiz.\" documentation and/or other materials provided with the distribution. 14c15cd181Swiz.\" 15c15cd181Swiz.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16c15cd181Swiz.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17c15cd181Swiz.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18c15cd181Swiz.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19c15cd181Swiz.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20c15cd181Swiz.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21c15cd181Swiz.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22c15cd181Swiz.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23c15cd181Swiz.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24c15cd181Swiz.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25c15cd181Swiz.\" 269dac5eaeSmrg.Dd June 19, 2009 27c15cd181Swiz.Dt DRM 4 28c15cd181Swiz.Os 29c15cd181Swiz.Sh NAME 30c15cd181Swiz.Nm drm 31c15cd181Swiz.Nd Direct Rendering Manager (DRI kernel support) 32c15cd181Swiz.Sh SYNOPSIS 33c15cd181Swiz.Cd i915drm* at vga? 34c15cd181Swiz.Cd mach64drm* at vga? 35c15cd181Swiz.Cd mgadrm* at vga? 36c15cd181Swiz.Cd r128drm* at vga? 37c15cd181Swiz.Cd radeondrm* at vga? 38c15cd181Swiz.Cd savagedrm* at vga? 39c15cd181Swiz.Cd sisdrm* at vga? 40c15cd181Swiz.Cd tdfxdrm* at vga? 41c15cd181Swiz.Cd viadrm* at vga? 42c15cd181Swiz.Pp 43c15cd181Swiz.Cd options DRM_DEBUG 449dac5eaeSmrg.Cd options DRM_EXTERNAL 454c844fd4Swiz.Cd options DRM_NO_AGP 46c15cd181Swiz.Sh DESCRIPTION 47c15cd181SwizThe 48c15cd181Swiz.Tn Direct Rendering Manager 49c15cd181Swizis part of the 50c15cd181Swiz.Tn Direct Rendering Infrastructure 516c48b6bbSwiz(see 526c48b6bbSwiz.Pa http://dri.freedesktop.org/ ) 53c15cd181Swizfor supporting video acceleration (3d acceleration, mostly). 54c15cd181Swiz.Pp 55c15cd181SwizThe 56c15cd181Swiz.Nm 57c15cd181Swizdrivers provide support for the following chipsets: 58c15cd181Swiz.Bl -tag -width XsavagedrmXXX -offset indent -compact 59c15cd181Swiz.It i915drm 60c15cd181SwizIntel i915, i945 61c15cd181Swiz.It mach64drm 62c15cd181SwizMach64 (3D Rage Pro, Rage) 63c15cd181Swiz.It mgadrm 64c15cd181SwizMatrox G[24]00, G[45]50 65c15cd181Swiz.It r128drm 66c15cd181SwizATI Rage 128 67c15cd181Swiz.It radeondrm 68c15cd181SwizATI Radeon 69c15cd181Swiz.It savagedrm 70c15cd181SwizS3 Savage 71c15cd181Swiz.It sisdrm 72c15cd181SwizSiS 73c15cd181Swiz.It tdfxdrm 74c15cd181Swiz3dfx (Voodoo) 75c15cd181Swiz.It viadrm 76c15cd181SwizVIA 77c15cd181Swiz.El 78c15cd181Swiz.Pp 791c89d5f8SwizTo make use of the driver, the kernel must include 804c844fd4Swiz.Xr agp 4 814c844fd4Swiz(for some drivers, using 824c844fd4Swiz.Cd options DRM_NO_AGP 834c844fd4Swizinstead may be sufficient), 84c15cd181Swiz.Xr X 7 85c15cd181Swizmust be compiled with DRI support, Mesa DRI drivers must be installed, 86c15cd181Swizthe appropriate 87c15cd181Swiz.Pa /dev/dri/card* 88c15cd181Swizdevice must exist, and DRI must be enabled in the X configuration 89c15cd181Swizfile. 909dac5eaeSmrg.Xr X 7 91*622428f5Swizprovided with 92*622428f5Swiz.Nx 93*622428f5Swizand compiled from 949dac5eaeSmrg.Xr pkgsrc 7 959dac5eaeSmrgdo so automatically where supported. 96c15cd181Swiz.Pp 979dac5eaeSmrg.Xr X 7 989dac5eaeSmrgwill attempt to create the device node automatically. 999dac5eaeSmrgTo create the device node manually: 100c15cd181Swiz.Bd -literal -offset indent 101c15cd181Swizmkdir -p /dev/dri 1023531e139Sjmcneillmknod /dev/dri/card0 c 180 0 103c15cd181Swizchgrp wheel /dev/dri/card0 104c15cd181Swizchmod 0660 /dev/dri/card0 105c15cd181Swiz.Ed 1069dac5eaeSmrg.Pp 1079dac5eaeSmrgTo enable DRI in the X configuration add the following to either 108c15cd181Swiz.Pa xorg.conf 1099dac5eaeSmrgfor 1109dac5eaeSmrg.Xr Xorg 1 111c15cd181Swizor 1129dac5eaeSmrg.Pa XF86Config 1139dac5eaeSmrgfor 1149dac5eaeSmrg.Xr XFree86 1 1159dac5eaeSmrg: 1169dac5eaeSmrg.Bd -literal -offset indent 117c15cd181SwizSection "Module" 118c15cd181Swiz ... 119c15cd181Swiz Load "dri" 1209dac5eaeSmrg Load "dri2" 121c15cd181Swiz Load "glx" 122c15cd181SwizEndSection 1237e2cf787Sjoerg\&... 124c15cd181SwizSection "DRI" 125c15cd181Swiz Group "wheel" 126c15cd181Swiz Mode 0660 127c15cd181SwizEndSection 128c15cd181Swiz.Ed 1296c48b6bbSwiz.Pp 1306c48b6bbSwizDebugging output can be enabled and disabled by setting the 1316c48b6bbSwiz.Xr sysctl 8 1326c48b6bbSwiznode 1336c48b6bbSwiz.Ar hw.dri.debug . 1346c48b6bbSwizAdditional information can be obtained from the 1356c48b6bbSwiz.Xr sysctl 8 1366c48b6bbSwiznodes 1376c48b6bbSwiz.Ar hw.dri , 1386c48b6bbSwiz.Ar hw.dri.card0 , 1396c48b6bbSwiz.Ar hw.dri.card1 , 1406c48b6bbSwizetc. 141c15cd181Swiz.Sh SEE ALSO 1429dac5eaeSmrg.Xr XFree86 1 , 1439dac5eaeSmrg.Xr Xorg 1 , 144*622428f5Swiz.Xr agp 4 , 1459dac5eaeSmrg.Xr XF86Config 5 , 146*622428f5Swiz.Xr xorg.conf 5 , 147*622428f5Swiz.Xr X 7 , 148*622428f5Swiz.Pa /usr/X11R[67]/lib/X11/doc/README.DRI 1496c48b6bbSwiz.Sh HISTORY 1506c48b6bbSwizDRM was first available for Linux. 1516c48b6bbSwizSubsequently Eric Anholt ported the DRM kernel modules to 1526c48b6bbSwiz.Fx . 1536c48b6bbSwizErik Reid adapted the 1546c48b6bbSwiz.Fx 1556c48b6bbSwizDRM kernel modules to 1566c48b6bbSwiz.Nx . 1576c48b6bbSwizAs DRM continued to develop the 1586c48b6bbSwiz.Nx 1596c48b6bbSwizsupport was neglected. 1606c48b6bbSwizTonnerre Lombard got the DRM modules working again, but DRM 1616c48b6bbSwizdevelopment once again left the 1626c48b6bbSwiz.Nx 1636c48b6bbSwizsupport behind. 1646c48b6bbSwizFinally Yorick Hardy took the 1656c48b6bbSwiz.Fx 1666c48b6bbSwizDRM source and managed to get it compiling and working again on 1676c48b6bbSwiz.Nx , 1686c48b6bbSwizthanks largely to the efforts of all those mentioned above. 1696c48b6bbSwizSubsequently Matthias Drochner improved the DRM file hierarchy for 1706c48b6bbSwiz.Nx 1716c48b6bbSwizand committed the DRM kernel drivers. 1729dac5eaeSmrgMatthew Green cleaned up this port and merged a set of newer 1739dac5eaeSmrgdrivers, with Arto Huusko and FUKAUMI Naoki helping to get 1749dac5eaeSmrgthe latest Mesa port upto date. 1756c48b6bbSwiz.Pp 1766c48b6bbSwizThe 1776c48b6bbSwiz.Nm 178bb711a3cSwizdrivers appeared in 1796c48b6bbSwiz.Nx 5.0 . 1806c48b6bbSwiz.Sh AUTHORS 1816c48b6bbSwiz.An -nosplit 1826c48b6bbSwiz.An Eric Anholt , 1836c48b6bbSwiz.An Terry Barnaby , 1846c48b6bbSwiz.An Erdi Chen , 1856c48b6bbSwiz.An Michel Daenzer , 1866c48b6bbSwiz.An Leif Delgass , 1876c48b6bbSwiz.An Frank C. Earl , 1886c48b6bbSwiz.An Rickard E. Faith , 1896c48b6bbSwiz.An Jose Fonseca , 1906c48b6bbSwiz.An Nicolai Haehnle , 1916c48b6bbSwiz.An Jeff Hartmann , 1926c48b6bbSwiz.An Thomas Hellstrom , 1936c48b6bbSwiz.An Gareth Hughes , 1946c48b6bbSwiz.An Felix Kuehling , 1956c48b6bbSwiz.An Sung-Ching Lin , 1966c48b6bbSwiz.An Kevin E. Martin , 1976c48b6bbSwiz.An Jared D. McNeill , 1986c48b6bbSwiz.An Daryll Strauss , 1996c48b6bbSwiz.An Keith Whitwell 200c15cd181Swiz.Sh CAVEATS 201c15cd181Swiz.Pp 202c15cd181SwizIn case of errors, 203c15cd181Swiz.Pa /dev/dri/card0 204c15cd181Swizmay be changed, make sure to recreate it in that case. 205c15cd181Swiz.Pp 206c15cd181Swiz.Cd options DRM_DEBUG 207c15cd181Swizcan slow DRI down a lot, disable it once 208c15cd181Swiz.Nm 209c15cd181Swizworks. 2109dac5eaeSmrg.Pp 2119dac5eaeSmrgTo use the latest drivers, 2129dac5eaeSmrg.Cd options DRM_EXTERNAL 2139dac5eaeSmrgmust be added to the kernel configuration file. 214