NAME
drm
—
Direct Rendering Manager (DRI kernel
support)
DESCRIPTION
The Direct Rendering Manager is part of the Direct Rendering Infrastructure (see http://dri.freedesktop.org/) for supporting video acceleration.
The drm
drivers provide support for the
following chipsets:
Module | Kernel option | Chipset |
i915.ko | i915 | Intel i915, i945, i965, G3x, G4x |
radeonkms.ko | radeon | AMD/ATI Radeon |
In most cases
Xorg(1) will take care of loading the appropriate modules and it is
not necessary to modify
loader.conf(5) or the kernel configuration to enable
drm
support.
Newer versions of Xorg(1), like the one from dports(7), do a pretty good job of figuring out the right configuration on their own, so having no xorg.conf(5) file at all is usually the best advice. If for some reason an xorg.conf(5) is preferred, DRI must be enabled:
Section "DRI" Group "video" Mode 0660 EndSection
With KMS, DRI is always enabled since the
drm
is always required.
To access /dev/dri/cardN devices user must
be a member of the video
group. Users can be added
to the video
group with
pw(8) groupmod option.
If Xorg(1) acceleration fails to initialize with a “contigmalloc_map: failed size...” error in dmesg, the reserve of memory for DMA ran out early and should be increased to a sufficiently high value by setting the vm.dma_reserved loader tunable. A read only sysctl(8) variable of the same name is provided for obtaining its current value.
LOADER TUNABLES
Tunables can be set at the loader(8) prompt before booting the kernel or stored in loader.conf(5).
- drm.debug
- Enable internal verbose debug messages, might slow down the machine. Debug
categories are enabled by setting their bits:
- 0x001
- CORE - generic drm code
- 0x002
- DRIVER - vendor specific parts of the driver
- 0x004
- KMS - modesetting troubleshoot
- 0x008
- PRIME (no prime support)
- 0x010
- ATOMIC - atomic code used by i915
- 0x100
- PID - include pid number (useful in certain scenarios)
- 0x200
- FIOCTL - failed ioctls
- 0x400
- IOCTL - very spammy ioctl prints
- 0x800
- VBLANK - very spammy vblank prints
- drm.edid_firmware
- Load external EDID binary monitor data from a firmware module. Useful if
the monitor is not sending an appropriate EDID block, if there is no video
on the connected monitor or if there is a need to enforce custom video
modes. Optionally, the connector name can be specified before the firmware
name followed by a colon. For example:
drm.edid_firmware="DVI-D-1:edidfw_repaired"
Notes:
drm
and Xorg(1) use different naming conventions for connector names. This tunable only applies for KMS drivers. - drm.video.<connector>
- Can be used to set framebuffer parameters for drm(4) connector. Mode
specifier format:
<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]
- <xres>
- X resolution, e.g. 1920
- <yres>
- Y resolution, e.g. 1080
- M
- calculate timings using VESA CVT instead of table lookups
- R
- reduced blanking on digital monitors
- <bpp>
- color depth
- <refresh>
- refresh rate
- i
- calculate timings for interlaced mode
- m
- margins used in calculations
- e
- force enable output
- D
- same as e option, but force digital output on HDMI/DVI
- d
- force disable output
SYSCTL VARIABLES
A number of sysctl(8) variables are available:
- hw.dri.debug
- If set, enables debugging output.
- hw.dri.vblank_offdelay
- Specifies the delay (in milliseconds) until the vblank interrupt is disabled again when it's no longer needed. (0 = never disable, negative value = disable immediately)
- hw.dri.%d.busid
- Indicates the location of the device on the PCI bus. The format is:
[0000-ffff]:[00-ff]:[00-1f].[0-7]
- hw.dri.%d.modesetting
- Indicates if kernel mode setting (
DRIVER_MODESET
feature) is set in the device driver.
SEE ALSO
HISTORY
DRM was first available for Linux. Subsequently Eric Anholt ported the DRM kernel modules to FreeBSD.
CAVEATS
Disable AIGLX if necessary (xorg.conf):
Section "ServerFlags" Option "AIGLX" "off" EndSection
options DRM_DEBUG
can slow DRI down a lot,
disable it once drm
works.