Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

drm(7) [centos man page]

DRM(7)							     Direct Rendering Manager							    DRM(7)

NAME
drm - Direct Rendering Manager SYNOPSIS
#include <xf86drm.h> DESCRIPTION
The Direct Rendering Manager (DRM) is a framework to manage Graphics Processing Units (GPUs). It is designed to support the needs of complex graphics devices, usually containing programmable pipelines well suited to 3D graphics acceleration. Furthermore, it is responsible for memory management, interrupt handling and DMA to provide a uniform interface to applications. In earlier days, the kernel framework was solely used to provide raw hardware access to priviledged user-space processes which implement all the hardware abstraction layers. But more and more tasks where moved into the kernel. All these interfaces are based on ioctl(2) commands on the DRM character device. The libdrm library provides wrappers for these system-calls and many helpers to simplify the API. When a GPU is detected, the DRM system loads a driver for the detected hardware type. Each connected GPU is then presented to user-space via a character-device that is usually available as /dev/dri/card0 and can be accessed with open(2) and close(2). However, it still depends on the grapics driver which interfaces are available on these devices. If an interface is not available, the syscalls will fail with EINVAL. Authentication All DRM devices provide authentication mechanisms. Only a DRM-Master is allowed to perform mode-setting or modify core state and only one user can be DRM-Master at a time. See drmSetMaster(3) for information on how to become DRM-Master and what the limitations are. Other DRM users can be authenticated to the DRM-Master via drmAuthMagic(3) so they can perform buffer allocations and rendering. Mode-Setting Managing connected monitors and displays and changing the current modes is called Mode-Setting. This is restricted to the current DRM-Master. Historically, this was implemented in user-space, but new DRM drivers implement a kernel interface to perform mode-setting called Kernel Mode Setting (KMS). If your hardware-driver supports it, you can use the KMS API provided by DRM. This includes allocating framebuffers, selecting modes and managing CRTCs and encoders. See drm-kms(7) for more. Memory Management The most sophisticated tasks for GPUs today is managing memory objects. Textures, framebuffers, command-buffers and all other kinds of commands for the GPU have to be stored in memory. The DRM driver takes care of managing all memory objects, flushing caches, synchronizing access and providing CPU access to GPU memory. All memory management is hardware driver dependent. However, two generic frameworks are available that are used by most DRM drivers. These are the Translation Table Manager (TTM) and the Graphics Execution Manager (GEM). They provide generic APIs to create, destroy and access buffers from user-space. However, there are still many differences between the drivers so driver-depedent code is still needed. Many helpers are provided in libgbm (Graphics Buffer Manager) from the mesa-project. For more information on DRM memory-management, see drm-memory(7). REPORTING BUGS
Bugs in this manual should be reported to http://bugs.freedesktop.org under the "Mesa" product, with "Other" or "libdrm" as the component. SEE ALSO
drm-kms(7), drm-memory(7), drmSetMaster(3), drmAuthMagic(3), drmAvailable(3), drmOpen(3) libdrm September 2012 DRM(7)

Check Out this Related Man Page

DRM(4)							   BSD Kernel Interfaces Manual 						    DRM(4)

NAME
drm -- Direct Rendering Manager (DRI kernel support) SYNOPSIS
i915drm* at vga? mach64drm* at vga? mgadrm* at vga? r128drm* at vga? radeondrm* at vga? savagedrm* at vga? sisdrm* at vga? tdfxdrm* at vga? viadrm* at vga? options DRM_DEBUG options DRM_NO_AGP DESCRIPTION
The Direct Rendering Manager is part of the Direct Rendering Infrastructure (see http://dri.freedesktop.org/) for supporting video accelera- tion (3d acceleration, mostly). The drm drivers provide support for the following chipsets: i915drm Intel i915, i945 mach64drm Mach64 (3D Rage Pro, Rage) mgadrm Matrox G[24]00, G[45]50 r128drm ATI Rage 128 radeondrm ATI Radeon savagedrm S3 Savage sisdrm SiS tdfxdrm 3dfx (Voodoo) viadrm VIA To make use of the driver, the kernel must include agp(4) (for some drivers, using options DRM_NO_AGP instead may be sufficient), X(7) must be compiled with DRI support, Mesa DRI drivers must be installed, the appropriate /dev/dri/card* device must exist, and DRI must be enabled in the X configuration file. X(7) provided with NetBSD and compiled from pkgsrc(7) do so automatically where supported. X(7) will attempt to create the device node automatically. To create the device node manually: mkdir -p /dev/dri mknod /dev/dri/card0 c 180 0 chgrp wheel /dev/dri/card0 chmod 0660 /dev/dri/card0 To enable DRI in the X configuration add the following to either xorg.conf for Xorg(1) or XF86Config for XFree86(1) : Section "Module" ... Load "dri" Load "dri2" Load "glx" EndSection ... Section "DRI" Group "wheel" Mode 0660 EndSection Debugging output can be enabled and disabled by setting the sysctl(8) node hw.dri.debug. Additional information can be obtained from the sysctl(8) nodes hw.dri, hw.dri.card0, hw.dri.card1, etc. SEE ALSO
XFree86(1), Xorg(1), agp(4), XF86Config(5), xorg.conf(5), X(7), /usr/X11R[67]/lib/X11/doc/README.DRI HISTORY
DRM was first available for Linux. Subsequently Eric Anholt ported the DRM kernel modules to FreeBSD. Erik Reid adapted the FreeBSD DRM kernel modules to NetBSD. As DRM continued to develop the NetBSD support was neglected. Tonnerre Lombard got the DRM modules working again, but DRM development once again left the NetBSD support behind. Finally Yorick Hardy took the FreeBSD DRM source and managed to get it com- piling and working again on NetBSD, thanks largely to the efforts of all those mentioned above. Subsequently Matthias Drochner improved the DRM file hierarchy for NetBSD and committed the DRM kernel drivers. Matthew Green cleaned up this port and merged a set of newer drivers, with Arto Huusko and FUKAUMI Naoki helping to get the latest Mesa port up to date. The drm drivers appeared in NetBSD 5.0. AUTHORS
Eric Anholt, Terry Barnaby, Erdi Chen, Michel Daenzer, Leif Delgass, Frank C. Earl, Rickard E. Faith, Jose Fonseca, Nicolai Haehnle, Jeff Hartmann, Thomas Hellstrom, Gareth Hughes, Felix Kuehling, Sung-Ching Lin, Kevin E. Martin, Jared D. McNeill, Daryll Strauss, Keith Whitwell CAVEATS
In case of errors, /dev/dri/card0 may be changed, make sure to recreate it in that case. options DRM_DEBUG can slow DRI down a lot; disable it once drm works. BSD
May 11, 2010 BSD
Man Page