1
0
Fork 0
forked from wry/wry

metal: reset unused DRM properties

This commit is contained in:
Julian Orth 2025-02-03 12:08:01 +01:00
parent 607e92d2d5
commit 1abb89d888
3 changed files with 172 additions and 26 deletions

View file

@ -672,11 +672,11 @@ pub struct DrmPropertyDefinition {
pub enum DrmPropertyType {
Range {
_min: u64,
_max: u64,
max: u64,
},
SignedRange {
_min: i64,
_max: i64,
max: i64,
},
Object {
_ty: u32,
@ -684,7 +684,7 @@ pub enum DrmPropertyType {
Blob,
Enum {
values: Vec<DrmPropertyEnumValue>,
_bitmask: bool,
bitmask: bool,
},
}

View file

@ -278,12 +278,12 @@ pub fn mode_getproperty(
if ty == DRM_MODE_PROP_RANGE {
DrmPropertyType::Range {
_min: vals[0],
_max: vals[1],
max: vals[1],
}
} else {
DrmPropertyType::SignedRange {
_min: vals[0] as _,
_max: vals[1] as _,
max: vals[1] as _,
}
}
}
@ -305,7 +305,7 @@ pub fn mode_getproperty(
}
DrmPropertyType::Enum {
values,
_bitmask: ty == DRM_MODE_PROP_BITMASK,
bitmask: ty == DRM_MODE_PROP_BITMASK,
}
}
DRM_MODE_PROP_BLOB => DrmPropertyType::Blob,