Struct drm::Master [] [src]

pub struct Master<'a> { /* fields omitted */ }

Represents a card when the process is the card master.

Only one process can control modesetting of a card. To do this they use a DRM_IOCTL_SET_MASTER. If it successful modesetting, calls can be performed until DRM_IOCTL_UNSET_MASTER, is called or the process exits.

This object is created when Device::set_master is called and when dropped, it will make the Unset call.

Due to some mutability constraits this also implements DerefMut for the associated card. (Essentailly it used to be impossible to read events and have card master at the same time, because Read requires mutable access).

Methods

impl<'a> Master<'a>
[src]

Set the mode, and the frame buffer.

The driver will pick a path from the given crtc to the given connectors.

Methods from Deref<Target = Device>

Set the file descriptor to non-blocking mode.

Set this process to be the current card master.

Returns a Guard that will unset master on drop. The card master can set the mode of the device and can update the frame buffer.

Returns a Invalid Arguement error (ErrorKind::InvalidInput) when another process already is already card master.

Get driver version information.

Fetches the busid of the card.

Dev notes: on my system this is an empty string. In xf86drm.h there are functions that use this string to open the device. I assume it might be realted to path names in /sys/.

Request a vblank event, that can be late read by an read_event.

crtc_num is the index of the CRTC id returned by Resources::crtcs.

Reads the next available event.

Errors

  • If no events are availble an error with kind ErrorKind::WouldBlock is returned.
  • If a syscall is interrupted ErrorKind::Interrupted
  • If suprising data is returned ErrorKind::InvalidData.
  • Any other io:Error from the kernel.

Get the capability or value associated with a given capability.

Trait Implementations

impl<'a> Debug for Master<'a>
[src]

Formats the value using the given formatter.

impl<'a> Deref for Master<'a>
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<'a> DerefMut for Master<'a>
[src]

The method called to mutably dereference a value

impl<'a> Drop for Master<'a>
[src]

A method called when the value goes out of scope. Read more