pub struct DrmDevice(pub u64);
Expand description
A Direct Rendering Manager (DRM) device.
It’s easiest to think of a DRM device as a graphics card. There are also DRM devices that are emulated in software but you are unlikely to encounter those accidentally.
Tuple Fields§
§0: u64
Implementations§
Source§impl DrmDevice
impl DrmDevice
Sourcepub fn connectors(self) -> Vec<Connector>
pub fn connectors(self) -> Vec<Connector>
Returns the connectors of this device.
Sourcepub fn syspath(self) -> String
pub fn syspath(self) -> String
Returns the syspath of this device.
E.g. /sys/devices/pci0000:00/0000:00:03.1/0000:07:00.0
.
Sourcepub fn vendor(self) -> String
pub fn vendor(self) -> String
Returns the vendor of this device.
E.g. Advanced Micro Devices, Inc. [AMD/ATI]
.
Sourcepub fn model(self) -> String
pub fn model(self) -> String
Returns the model of this device.
E.g. Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (Radeon RX 570 Armor 8G OC)
.
Sourcepub fn make_render_device(self)
pub fn make_render_device(self)
Makes this device the render device.
Sourcepub fn set_gfx_api(self, gfx_api: GfxApi)
pub fn set_gfx_api(self, gfx_api: GfxApi)
Sets the preferred graphics API for this device.
If the API cannot be used, the compositor will try other APIs.
Sourcepub fn set_direct_scanout_enabled(self, enabled: bool)
pub fn set_direct_scanout_enabled(self, enabled: bool)
Enables or disables direct scanout of client surfaces for this device.
Sourcepub fn set_flip_margin(self, margin: Duration)
pub fn set_flip_margin(self, margin: Duration)
Sets the flip margin of this device.
This is duration between the compositor initiating a page flip and the output’s vblank event. This determines the minimum input latency. The default is 1.5 ms.
Note that if the margin is too small, the compositor will dynamically increase it.