aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-11-21 10:20:15 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-11-21 10:21:11 +0300
commit98006a8dbae3ffc629891c463651968c01370c97 (patch)
tree68e2c7652ff52ec9713896f3fba1f40ba31e8cd9 /src
parent2d82fdd9c8b60f568c8acdb69864cb13e4e9b694 (diff)
downloadniri-98006a8dbae3ffc629891c463651968c01370c97.tar.gz
niri-98006a8dbae3ffc629891c463651968c01370c97.tar.bz2
niri-98006a8dbae3ffc629891c463651968c01370c97.zip
Remove setting max bpc
Diffstat (limited to 'src')
-rw-r--r--src/backend/tty.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/backend/tty.rs b/src/backend/tty.rs
index fcae8087..3a0b6113 100644
--- a/src/backend/tty.rs
+++ b/src/backend/tty.rs
@@ -1237,15 +1237,6 @@ impl Tty {
Err(err) => debug!("couldn't reset HDR properties: {err:?}"),
}
- if !niri.config.borrow().debug.keep_max_bpc_unchanged {
- // We only use 8888 RGB formats, so set max bpc to 8 to allow more types of links to
- // run.
- match set_max_bpc(&props, 8) {
- Ok(_bpc) => (),
- Err(err) => debug!("couldn't set max bpc: {err:?}"),
- }
- }
-
match get_panel_orientation(&props) {
Ok(x) => orientation = Some(x),
Err(err) => {
@@ -3224,30 +3215,6 @@ fn reset_hdr(props: &ConnectorProperties) -> anyhow::Result<()> {
Ok(())
}
-fn set_max_bpc(props: &ConnectorProperties, bpc: u64) -> anyhow::Result<u64> {
- let (info, value) = props.find(c"max bpc")?;
- let property::ValueType::UnsignedRange(min, max) = info.value_type() else {
- bail!("wrong property type")
- };
-
- let bpc = bpc.clamp(min, max);
- let property::Value::UnsignedRange(value) = info.value_type().convert_value(*value) else {
- bail!("wrong property type")
- };
-
- if value != bpc {
- props
- .device
- .set_property(
- props.connector,
- info.handle(),
- property::Value::UnsignedRange(bpc).into(),
- )
- .context("error setting property")?;
- }
- Ok(bpc)
-}
-
fn is_vrr_capable(device: &DrmDevice, connector: connector::Handle) -> Option<bool> {
let (_, info, value) = find_drm_property(device, connector, "vrr_capable")?;
info.value_type().convert_value(value).as_boolean()