DRM - Online Linux Manual PageSection : 7
Updated : September 2012
Source :
Note : Direct Rendering Manager
NAMEdrm − Direct Rendering Manager
SYNOPSIS#include <xf86drm.h>
DESCRIPTIONThe 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 privileged user−space processes which implement all the hardware abstraction layers. But more and more tasks were 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 graphics driver which interfaces are available on these devices. If an interface is not available, the syscalls will fail with EINVAL.
AuthenticationAll 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−SettingManaging 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 ManagementThe 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 BUGSBugs in this manual should be reported to https://gitlab.freedesktop.org/mesa/drm/−/issues.
SEE ALSOdrm−kms(7), drm−memory(7), drmSetMaster(3), drmAuthMagic(3), drmAvailable(3), drmOpen(3) 0
Johanes Gumabo
Data Size : 9,028 byte
man-drm.7Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 236,830
Visitor ID : :
Visitor IP : 3.137.198.181 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.