An encoder is the bridge between a CRTC and a connector. It converts raw pixel data from the CRTC into the electrical signal that a particular connector technology can carry — TMDS for HDMI and DVI-D, DAC for VGA, LVDS for embedded panels, and so on. On most modern discrete and integrated GPUs the encoder logic is embedded inside the display engine and not directly user-configurable. The DRM API still exposes encoder objects so that user-space can determine which CRTCs and connectors can be wired together. Not every CRTC can drive every connector; the encoder’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Smithay/drm-rs/llms.txt
Use this file to discover all available pages before exploring further.
possible_crtcs bitmask encodes these hardware constraints.
Encoders are enumerated through Device::resource_handles() and inspected with Device::get_encoder().
encoder::Handle
An opaque, copy-cheap handle to an encoder resource. Internally a NonZeroU32 wrapped with repr(transparent). Implements ResourceHandle with FFI_TYPE = DRM_MODE_OBJECT_ENCODER.
encoder::Info
Returned by Device::get_encoder(). Describes the type and current attachment of an encoder.
| Method | Return type | Description |
|---|---|---|
handle() | Handle | The encoder’s own handle |
kind() | Kind | Technology type of this encoder |
crtc() | Option<crtc::Handle> | The CRTC this encoder is currently feeding, or None if unused |
possible_crtcs() | CrtcListFilter | Bitmask of CRTCs that can drive this encoder; use with ResourceHandles::filter_crtcs |
Info also implements Display, formatting as "Encoder <id>".
possible_clones() is defined in the source but is currently unimplemented!(). Do not call it.encoder::Kind
The signal encoding technology. Maps to the kernel’s DRM_MODE_ENCODER_* constants.
| Variant | Description |
|---|---|
None | No encoder / unspecified |
DAC | Digital-to-Analogue Converter — drives VGA and TV outputs |
TMDS | Transition-Minimised Differential Signalling — HDMI and DVI-D |
LVDS | Low-Voltage Differential Signalling — internal laptop panels |
TVDAC | TV-specific DAC encoder |
Virtual | Virtual/software encoder (used with Virtual connectors) |
DSI | MIPI Display Serial Interface — mobile and embedded panels |
DPMST | DisplayPort Multi-Stream Transport hub |
DPI | Display Parallel Interface |
Kind implements From<u32> and From<Kind> for u32 for FFI conversion.