Skip to main content

DeviceCommitter

Struct DeviceCommitter 

Source
pub struct DeviceCommitter<'a> {
    pub commits: usize,
    /* private fields */
}
Expand description

A TestCommitter that issues real TEST_ONLY commits.

Builds a fresh request per test that (a) disables every candidate plane not in the assignment, then (b) applies each assigned layer’s properties — the order matters for the reason emit_disable describes.

Fields§

§commits: usize

How many test commits have been issued, for diagnostics.

Implementations§

Source§

impl<'a> DeviceCommitter<'a>

Source

pub fn new( device: &'a Device, map: &'a PlanePropertyMap, registry: &'a PlaneRegistry, crtc_index: u32, flags: AtomicCommitFlags, modeset: Option<&'a Modeset<'a>>, ) -> Self

A committer over the planes this CRTC could use.

The candidate list comes from force_disable_candidates rather than being supplied, so a test commit and the apply commit that follows it clear exactly the same set. Handing them different lists would let a configuration pass TEST_ONLY and then be applied with a plane the test had cleared still live.

Trait Implementations§

Source§

impl TestCommitter for DeviceCommitter<'_>

Source§

fn lit_planes(&mut self, crtc_id: u32) -> Option<Vec<u32>>

The planes the kernel has lit on crtc_id right now, whoever lit them; None when the committer cannot tell. Read more
Source§

fn test_assignment( &mut self, assignment: &[(u32, LayerRef<'_>)], ) -> Result<(), TestFailure>

Validate an assignment with a TEST_ONLY commit. Read more
Source§

fn set_extra_plane(&mut self, plane_id: u32, layer: Layer)

Arm one more plane in every test, alongside the assignment. Read more
Source§

fn clear_extra_plane(&mut self)

Stop arming the plane set by TestCommitter::set_extra_plane.

Auto Trait Implementations§

§

impl<'a> !Freeze for DeviceCommitter<'a>

§

impl<'a> !RefUnwindSafe for DeviceCommitter<'a>

§

impl<'a> !Sync for DeviceCommitter<'a>

§

impl<'a> Send for DeviceCommitter<'a>

§

impl<'a> Unpin for DeviceCommitter<'a>

§

impl<'a> UnsafeUnpin for DeviceCommitter<'a>

§

impl<'a> UnwindSafe for DeviceCommitter<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.