- NetBSD Manual Pages
DRM(4) NetBSD Kernel Interfaces Manual DRM(4)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
drm -- Direct Rendering Manager -- display configuration and graphics
Kernel mode-setting drivers
amdgpu* at pci? dev ? function ?
i915drmkms* at pci? dev ? function ?
nouveau* at pci? dev ? function ?
radeon* at pci? dev ? function ?
rkdrm* at fdt? pass 5
sunxidrm* at fdt? pass 5
tegradrm* at fdt? pass 5
Legacy user mode-setting options and drivers
viadrmums* at drm?
The Direct Rendering Manager is part of the Direct Rendering Infrastruc-
ture for supporting display configuration and hardware acceleration for
graphics rendering and other computation on a graphics processing unit
drm drivers come in two generations:
Kernel mode-setting (KMS)
Modern drivers that query and control display configuration
in the kernel via ioctl(2) commands exposed to userland.
The /dev/dri/render* device nodes provide access to graph-
ics buffers and command stream submission for rendering.
The /dev/dri/card* device nodes additionally provide access
to the display configuration.
KMS drivers provided as modules must generally be loaded by
the bootloader, configured in boot.cfg(8), and cannot be
User mode-setting (UMS)
Legacy drivers that rely on userland support code that
accesses device registers in the X(7) server to query and
control display configuration. The kernel may be unable to
recover if the display server crashes, or the device is
suspended or resumed.
The kernel driver and /dev/dri/card* interfaces only manage
buffers mapped in the GPU address space. Display configu-
ration from userland requires the INSECURE option (see
options(4)) to allow userland access to device registers.
The DRM_LEGACY option allows legacy UMS drivers to be
loaded as modules (see module(7)).
The drm drivers provide support for the following graphics devices:
amdgpu Newer AMD graphics devices.
i915drmkms Intel integrated graphics devices from the i915 series
onward. (Some i8xx support is included but not well-
maintained. i7xx is not supported.)
nouveau NVIDIA graphics devices.
radeon Older AMD (including formerly ATI) Radeon graphics
viadrmums (legacy UMS)
VIA graphics devices.
With some drivers (at least radeon(4)), in some cases the driver does not
choose the resolution correctly. The options
DRM_MAX_RESOLUTION_HORIZONTAL and DRM_MAX_RESOLUTION_VERTICAL allow lim-
iting the maximum resolution in X and Y direction.
X(7) will attempt to create the device nodes automatically and use drm
automatically. To create a device node manually:
mkdir -p /dev/dri
mknod /dev/dri/card0 c 180 0
chgrp wheel /dev/dri/card0
chmod 0660 /dev/dri/card0
Debugging output can be enabled and disabled by setting flag bits in the
sysctl(8) node hw.drm2.__drm_debug. Various other knobs may be available
/dev/dri/render* Provides access to graphics buffers and command stream
submission for rendering. Generally unprivileged.
/dev/dri/card* In addition to everything provided by /dev/dri/render*,
provides access to change the display configuration.
The drm subsystem and drivers mostly live under sys/external/bsd/drm2,
with various Linux API shims in sys/external/bsd/common and some individ-
ual drm drivers scattered elsewhere in the tree.
Xorg(1), agp(4), xorg.conf(5), X(7)
Direct Rendering Infrastructure:
drm was first available for Linux and later ported to FreeBSD and NetBSD.
The port to NetBSD was redone after the introduction of KMS.
The first generation of drm drivers appeared in NetBSD 5.0. The second
generation of drm with KMS appeared in NetBSD 7.0.
Too many to list.
Work on the NetBSD port was contributed by: Anonymous, Nia Alarie, Eric
Anholt, Rafal Boni, Taylor R Campbell, Mihai Chelaru, David Brownlee,
Jaromír Doleek, Matthias Drochner, Christoph Egger, FUKAUMI Naoki, Paul
Goyette, matthew green, Yorick Hardy, Nick Hudson, Martin Husemann, Arto
Huusko, Thomas Klausner, Jonathan Kollasch, Tonnerre Lombard, Jared
McNeill, Jeremy Morse, Kimihiro Nonaka, Tobias Nygren, Rin Okuyama, Maya
Rashish, Erik Reid, Masanobu SAITOH, Blair Sadewitz, Chuck Silvers,
Nathanial Sloss, Jörg Sonnenberger, Grégoire Sutre, Matt Thomas, Izumi
Tsutsui, Patrick Welche, and Christos Zoulas.
drm is large and complicated and has no shortage of bugs. On systems
where graphics is not important, you may wish to use userconf(4) to dis-
able the special-purpose drm drivers for your graphics device and fall
back to vga(4) or genfb(4) with the default display configuration pro-
vided by firmware.
drm is not `Digital Rights Management' and does not deprive you of agency
over your own computer, except insofar as the code base is difficult to
NetBSD 10.99 October 21, 2023 NetBSD 10.99