1*6f4dacc8Swiz.\" $NetBSD: drm.4,v 1.18 2021/03/10 07:23:42 wiz Exp $ 2c15cd181Swiz.\" 3d08ad3d7Swiz.\" Copyright (c) 2007, 2013 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.\" 26*6f4dacc8Swiz.Dd March 10, 2021 27c15cd181Swiz.Dt DRM 4 28c15cd181Swiz.Os 29c15cd181Swiz.Sh NAME 30c15cd181Swiz.Nm drm 31c15cd181Swiz.Nd Direct Rendering Manager (DRI kernel support) 32c15cd181Swiz.Sh SYNOPSIS 33d08ad3d7Swiz.Cd i915drm* at drm? 34d08ad3d7Swiz.Cd mach64drm* at drm? 35d08ad3d7Swiz.Cd mgadrm* at drm? 36d08ad3d7Swiz.Cd r128drm* at drm? 37d08ad3d7Swiz.Cd radeondrm* at drm? 38d08ad3d7Swiz.Cd savagedrm* at drm? 39d08ad3d7Swiz.Cd sisdrm* at drm? 40d08ad3d7Swiz.Cd tdfxdrm* at drm? 41c15cd181Swiz.Pp 42c15cd181Swiz.Cd options DRM_DEBUG 434c844fd4Swiz.Cd options DRM_NO_AGP 44*6f4dacc8Swiz.Cd options DRM_MAX_RESOLUTION_HORIZONTAL=integer 45*6f4dacc8Swiz.Cd options DRM_MAX_RESOLUTION_VERTICAL=integer 46c15cd181Swiz.Sh DESCRIPTION 47cd01ea22SwizThe Direct Rendering Manager is part of the Direct Rendering 48cd01ea22SwizInfrastructure for supporting video acceleration (3d acceleration, 49cd01ea22Swizmostly). 50c15cd181Swiz.Pp 51c15cd181SwizThe 52c15cd181Swiz.Nm 53c15cd181Swizdrivers provide support for the following chipsets: 54c15cd181Swiz.Bl -tag -width XsavagedrmXXX -offset indent -compact 55c15cd181Swiz.It i915drm 56c15cd181SwizIntel i915, i945 57c15cd181Swiz.It mach64drm 58c15cd181SwizMach64 (3D Rage Pro, Rage) 59c15cd181Swiz.It mgadrm 60c15cd181SwizMatrox G[24]00, G[45]50 61c15cd181Swiz.It r128drm 62c15cd181SwizATI Rage 128 63c15cd181Swiz.It radeondrm 64c15cd181SwizATI Radeon 65c15cd181Swiz.It savagedrm 66c15cd181SwizS3 Savage 67c15cd181Swiz.It sisdrm 68c15cd181SwizSiS 69c15cd181Swiz.It tdfxdrm 70c15cd181Swiz3dfx (Voodoo) 71c15cd181Swiz.It viadrm 72c15cd181SwizVIA 73c15cd181Swiz.El 74c15cd181Swiz.Pp 751c89d5f8SwizTo make use of the driver, the kernel must include 764c844fd4Swiz.Xr agp 4 774c844fd4Swiz(for some drivers, using 784c844fd4Swiz.Cd options DRM_NO_AGP 794c844fd4Swizinstead may be sufficient), 80c15cd181Swiz.Xr X 7 81c15cd181Swizmust be compiled with DRI support, Mesa DRI drivers must be installed, 82c15cd181Swizthe appropriate 83c15cd181Swiz.Pa /dev/dri/card* 84c15cd181Swizdevice must exist, and DRI must be enabled in the X configuration 85c15cd181Swizfile. 869dac5eaeSmrg.Xr X 7 87622428f5Swizprovided with 88622428f5Swiz.Nx 89622428f5Swizand compiled from 909dac5eaeSmrg.Xr pkgsrc 7 919dac5eaeSmrgdo so automatically where supported. 92c15cd181Swiz.Pp 93*6f4dacc8SwizWith some drivers (at least 94*6f4dacc8Swiz.Xr radeon 4 ) , 95*6f4dacc8Swizin some cases the driver does not choose the resolution correctly. 96*6f4dacc8SwizThe options 97*6f4dacc8Swiz.Dv DRM_MAX_RESOLUTION_HORIZONTAL 98*6f4dacc8Swizand 99*6f4dacc8Swiz.Dv DRM_MAX_RESOLUTION_VERTICAL 100*6f4dacc8Swizallow limiting the maximum resolution in X and Y direction. 101*6f4dacc8Swiz.Pp 1029dac5eaeSmrg.Xr X 7 1039dac5eaeSmrgwill attempt to create the device node automatically. 1049dac5eaeSmrgTo create the device node manually: 105c15cd181Swiz.Bd -literal -offset indent 106c15cd181Swizmkdir -p /dev/dri 1073531e139Sjmcneillmknod /dev/dri/card0 c 180 0 108c15cd181Swizchgrp wheel /dev/dri/card0 109c15cd181Swizchmod 0660 /dev/dri/card0 110c15cd181Swiz.Ed 1119dac5eaeSmrg.Pp 1129dac5eaeSmrgTo enable DRI in the X configuration add the following to either 113c15cd181Swiz.Pa xorg.conf 1149dac5eaeSmrgfor 1159dac5eaeSmrg.Xr Xorg 1 116c15cd181Swizor 1179dac5eaeSmrg.Pa XF86Config 1189dac5eaeSmrgfor 1199dac5eaeSmrg.Xr XFree86 1 1209dac5eaeSmrg: 1219dac5eaeSmrg.Bd -literal -offset indent 122c15cd181SwizSection "Module" 123c15cd181Swiz ... 124c15cd181Swiz Load "dri" 1259dac5eaeSmrg Load "dri2" 126c15cd181Swiz Load "glx" 127c15cd181SwizEndSection 1287e2cf787Sjoerg\&... 129c15cd181SwizSection "DRI" 130c15cd181Swiz Group "wheel" 131c15cd181Swiz Mode 0660 132c15cd181SwizEndSection 133c15cd181Swiz.Ed 1346c48b6bbSwiz.Pp 1356c48b6bbSwizDebugging output can be enabled and disabled by setting the 1366c48b6bbSwiz.Xr sysctl 8 1376c48b6bbSwiznode 1386c48b6bbSwiz.Ar hw.dri.debug . 1396c48b6bbSwizAdditional information can be obtained from the 1406c48b6bbSwiz.Xr sysctl 8 1416c48b6bbSwiznodes 1426c48b6bbSwiz.Ar hw.dri , 1436c48b6bbSwiz.Ar hw.dri.card0 , 1446c48b6bbSwiz.Ar hw.dri.card1 , 1456c48b6bbSwizetc. 146c15cd181Swiz.Sh SEE ALSO 1479dac5eaeSmrg.Xr XFree86 1 , 1489dac5eaeSmrg.Xr Xorg 1 , 149622428f5Swiz.Xr agp 4 , 1509dac5eaeSmrg.Xr XF86Config 5 , 151622428f5Swiz.Xr xorg.conf 5 , 152622428f5Swiz.Xr X 7 , 153622428f5Swiz.Pa /usr/X11R[67]/lib/X11/doc/README.DRI 154ef05d8c2Snjoly.Pp 155ef05d8c2Snjoly.Lk http://dri.freedesktop.org/ "Direct Rendering Infrastructure" 1566c48b6bbSwiz.Sh HISTORY 1576c48b6bbSwizDRM was first available for Linux. 1586c48b6bbSwizSubsequently Eric Anholt ported the DRM kernel modules to 1596c48b6bbSwiz.Fx . 1606c48b6bbSwizErik Reid adapted the 1616c48b6bbSwiz.Fx 1626c48b6bbSwizDRM kernel modules to 1636c48b6bbSwiz.Nx . 1646c48b6bbSwizAs DRM continued to develop the 1656c48b6bbSwiz.Nx 1666c48b6bbSwizsupport was neglected. 1676c48b6bbSwizTonnerre Lombard got the DRM modules working again, but DRM 1686c48b6bbSwizdevelopment once again left the 1696c48b6bbSwiz.Nx 1706c48b6bbSwizsupport behind. 1716c48b6bbSwizFinally Yorick Hardy took the 1726c48b6bbSwiz.Fx 1736c48b6bbSwizDRM source and managed to get it compiling and working again on 1746c48b6bbSwiz.Nx , 1756c48b6bbSwizthanks largely to the efforts of all those mentioned above. 1766c48b6bbSwizSubsequently Matthias Drochner improved the DRM file hierarchy for 1776c48b6bbSwiz.Nx 1786c48b6bbSwizand committed the DRM kernel drivers. 1799dac5eaeSmrgMatthew Green cleaned up this port and merged a set of newer 1809dac5eaeSmrgdrivers, with Arto Huusko and FUKAUMI Naoki helping to get 1819dac5eaeSmrgthe latest Mesa port up to date. 1826c48b6bbSwiz.Pp 1836c48b6bbSwizThe 1846c48b6bbSwiz.Nm 185bb711a3cSwizdrivers appeared in 1866c48b6bbSwiz.Nx 5.0 . 1876c48b6bbSwiz.Sh AUTHORS 1886c48b6bbSwiz.An -nosplit 1896c48b6bbSwiz.An Eric Anholt , 1906c48b6bbSwiz.An Terry Barnaby , 1916c48b6bbSwiz.An Erdi Chen , 1926c48b6bbSwiz.An Michel Daenzer , 1936c48b6bbSwiz.An Leif Delgass , 1946c48b6bbSwiz.An Frank C. Earl , 1956c48b6bbSwiz.An Rickard E. Faith , 1966c48b6bbSwiz.An Jose Fonseca , 1976c48b6bbSwiz.An Nicolai Haehnle , 1986c48b6bbSwiz.An Jeff Hartmann , 1996c48b6bbSwiz.An Thomas Hellstrom , 2006c48b6bbSwiz.An Gareth Hughes , 2016c48b6bbSwiz.An Felix Kuehling , 2026c48b6bbSwiz.An Sung-Ching Lin , 2036c48b6bbSwiz.An Kevin E. Martin , 2046c48b6bbSwiz.An Daryll Strauss , 2056c48b6bbSwiz.An Keith Whitwell 206c15cd181Swiz.Sh CAVEATS 207c15cd181SwizIn case of errors, 208c15cd181Swiz.Pa /dev/dri/card0 209c15cd181Swizmay be changed, make sure to recreate it in that case. 210c15cd181Swiz.Pp 211c15cd181Swiz.Cd options DRM_DEBUG 212bd34acd8Sdhollandcan slow DRI down a lot; disable it once 213c15cd181Swiz.Nm 214c15cd181Swizworks. 215