Struct smithay::backend::drm::DrmDevice[][src]

pub struct DrmDevice<A: AsRawFd + 'static> { /* fields omitted */ }
Expand description

An open drm device

Implementations

Create a new DrmDevice from an open drm node

Arguments

  • fd - Open drm node
  • disable_connectors - Setting this to true will initialize all connectors
    as disabled on device creation. smithay enables connectors, when attached
    to a surface, and disables them, when detached. Setting this to false
    requires usage of drm-rs to disable unused connectors to prevent them
    showing garbage, but will also prevent flickering of already turned on
    connectors (assuming you won’t change the resolution).
  • logger - Optional slog::Logger to be used by this device.

Return

Returns an error if the file is no valid drm node or the device is not accessible.

Returns if the underlying implementation uses atomic-modesetting or not.

Returns a list of crtcs for this device

Returns a set of available planes for a given crtc

Creates a new rendering surface.

Arguments

Initialization of surfaces happens through the types provided by drm-rs.

  • crtcs represent scanout engines of the device pointing to one framebuffer.
    Their responsibility is to read the data of the framebuffer and export it into an “Encoder”.
    The number of crtc’s represent the number of independent output devices the hardware may handle.
  • mode describes the resolution and rate of images produced by the crtc and
    has to be compatible with the provided connectors.
  • connectors - List of connectors driven by the crtc. At least one(!) connector needs to be
    attached to a crtc in smithay.

Returns the device_id of the underlying drm node

Trait Implementations

Error type thrown if allocations fail

Try to create a buffer with the given dimensions and pixel format

Extracts the raw file descriptor. Read more

Formats the value using the given formatter. Read more

Gets the set of resource handles that this device currently controls

Gets the set of plane handles that this device currently has

Returns information about a specific connector

Returns information about a specific encoder

Returns information about a specific CRTC

Set CRTC state

Returns information about a specific framebuffer

Add a new framebuffer

Add framebuffer (with modifiers)

Mark parts of a framebuffer dirty

Destroy a framebuffer

Returns information about a specific plane

Set plane state. Read more

Returns information about a specific property.

Sets a property for a specific resource.

Create a property blob value from a given data blob

Get a property blob’s data

Destroy a given property blob value

Returns the set of Modes that a particular connector supports.

Gets a list of property handles and values for this resource.

Receive the currently set gamma ramp of a crtc

Set a gamma ramp for the given crtc

Open a GEM buffer handle by name

Close a GEM buffer handle

Create a new dumb buffer with a given size and pixel format

Map the buffer for access

Free the memory resources of a dumb buffer

👎 Deprecated:

Usage of deprecated ioctl set_cursor: use a cursor plane instead

Sets a hardware-cursor on the given crtc with the image of a given buffer Read more

👎 Deprecated:

Usage of deprecated ioctl set_cursor2: use a cursor plane instead

Sets a hardware-cursor on the given crtc with the image of a given buffer and a hotspot marking the click point of the cursor. Read more

👎 Deprecated:

Usage of deprecated ioctl move_cursor: use a cursor plane instead

Moves a set cursor on a given crtc

Request an atomic commit with given flags and property-value pair for a list of objects.

Convert a prime file descriptor to a GEM buffer handle

Convert a prime file descriptor to a GEM buffer handle

Queue a page flip on the given crtc

Receive pending events

Acquires the DRM Master lock for this process. Read more

Releases the DRM Master lock for another process to use.

👎 Deprecated:

Consider opening a render node instead.

Generates an AuthToken for this process.

Authenticates an AuthToken from another process.

Requests the driver to expose or hide certain capabilities. See ClientCapability for more information. Read more

Gets the BusID of this device.

Check to see if our AuthToken has been authenticated by the DRM Master Read more

Gets the value of a capability.

Possible errors: Read more

The type of events generated by your source.

Some metadata of your event source Read more

The return type of the user callback Read more

Process any relevant events Read more

Register yourself to this poll instance Read more

Re-register your file descriptors Read more

Unregister your file descriptors Read more

Make this object listen for signals from given signaler

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.