kms: Support vrr as boolean property
This commit is contained in:
parent
352a3e2beb
commit
38403c254f
1 changed files with 2 additions and 0 deletions
|
|
@ -331,6 +331,7 @@ pub fn supports_vrr(dev: &impl ControlDevice, conn: connector::Handle) -> Result
|
||||||
get_property_val(dev, conn, "vrr_capable").map(|(val_type, val)| {
|
get_property_val(dev, conn, "vrr_capable").map(|(val_type, val)| {
|
||||||
match val_type.convert_value(val) {
|
match val_type.convert_value(val) {
|
||||||
property::Value::UnsignedRange(res) => res == 1,
|
property::Value::UnsignedRange(res) => res == 1,
|
||||||
|
property::Value::Boolean(res) => res,
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -352,6 +353,7 @@ pub fn set_vrr(
|
||||||
.and_then(|_| get_property_val(dev, crtc, "VRR_ENABLED"))
|
.and_then(|_| get_property_val(dev, crtc, "VRR_ENABLED"))
|
||||||
.map(|(val_type, val)| match val_type.convert_value(val) {
|
.map(|(val_type, val)| match val_type.convert_value(val) {
|
||||||
property::Value::UnsignedRange(vrr) => vrr == 1,
|
property::Value::UnsignedRange(vrr) => vrr == 1,
|
||||||
|
property::Value::Boolean(vrr) => vrr,
|
||||||
_ => false,
|
_ => false,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue