pub struct Modifier(pub u64);Expand description
A DRM format modifier describing the memory layout of a buffer.
Getting this right is a bandwidth question, not a correctness one: falling
back to Modifier::LINEAR when a vendor tiled or compressed layout was
available can halve effective memory bandwidth on an embedded panel. The
chosen modifier is therefore always logged, and a negotiation that cannot
find a common non-linear layout is reported rather than silently accepted.
Tuple Fields§
§0: u64Implementations§
Source§impl Modifier
impl Modifier
Sourcepub const INVALID: Self
pub const INVALID: Self
The “driver picks” sentinel, DRM_FORMAT_MOD_INVALID.
Valid only where no explicit modifier negotiation happened. It must never reach an atomic commit that was built from a negotiated set.
pub const fn is_linear(self) -> bool
pub const fn is_valid(self) -> bool
Trait Implementations§
impl Copy for Modifier
impl Eq for Modifier
Source§impl Ord for Modifier
impl Ord for Modifier
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Modifier
impl PartialOrd for Modifier
impl StructuralPartialEq for Modifier
Auto Trait Implementations§
impl Freeze for Modifier
impl RefUnwindSafe for Modifier
impl Send for Modifier
impl Sync for Modifier
impl Unpin for Modifier
impl UnsafeUnpin for Modifier
impl UnwindSafe for Modifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more