pub struct Modeset<'a> { /* private fields */ }Expand description
The CRTC and connector writes that bring a display up.
Plane properties alone do not light a screen. Until the CRTC has a mode and
is ACTIVE, and some connector routes to it, a commit that binds planes to
that CRTC is rejected – and the planes have nowhere to scan out to even if
it were not. Upstream folds these writes into the first commit after
create() or rebind() and ORs in ALLOW_MODESET to let them through;
this is the same set.
Easy to leave out and not notice: most desktops run a DRM fbdev client that re-enables the CRTC as soon as the previous master drops it, so a scene that never writes these still commits successfully on a developer’s machine. It fails on a system that boots without one.
Implementations§
Source§impl<'a> Modeset<'a>
impl<'a> Modeset<'a>
Sourcepub fn learn(
device: &'a Device,
crtc_id: u32,
connector_id: u32,
mode: &Mode,
) -> Result<Self, CoreError>
pub fn learn( device: &'a Device, crtc_id: u32, connector_id: u32, mode: &Mode, ) -> Result<Self, CoreError>
Resolve the three property ids and stage mode as a blob.
The blob is created once and reused for every commit: it describes the mode, which does not change while the scene is bound to this CRTC.
§Errors
CoreError if a property is missing – every atomic driver exposes
all three, so an absent one means this is not an atomic-capable device
– or if the kernel refuses the blob.