diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-11-21 10:20:15 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-11-21 10:21:11 +0300 |
| commit | 98006a8dbae3ffc629891c463651968c01370c97 (patch) | |
| tree | 68e2c7652ff52ec9713896f3fba1f40ba31e8cd9 | |
| parent | 2d82fdd9c8b60f568c8acdb69864cb13e4e9b694 (diff) | |
| download | niri-98006a8dbae3ffc629891c463651968c01370c97.tar.gz niri-98006a8dbae3ffc629891c463651968c01370c97.tar.bz2 niri-98006a8dbae3ffc629891c463651968c01370c97.zip | |
Remove setting max bpc
| -rw-r--r-- | docs/wiki/Configuration:-Debug-Options.md | 4 | ||||
| -rw-r--r-- | src/backend/tty.rs | 33 |
2 files changed, 4 insertions, 33 deletions
diff --git a/docs/wiki/Configuration:-Debug-Options.md b/docs/wiki/Configuration:-Debug-Options.md index 5dea65f2..53ae54f9 100644 --- a/docs/wiki/Configuration:-Debug-Options.md +++ b/docs/wiki/Configuration:-Debug-Options.md @@ -320,6 +320,10 @@ Apparently, setting max bpc to 8 breaks some displays driven by AMDGPU. If this happens to you, set this debug flag, which will prevent niri from changing max bpc. AMDGPU bug report: https://gitlab.freedesktop.org/drm/amd/-/issues/4487. +<sup>Since: next release</sup> +This setting is deprecated and does nothing: niri no longer sets max bpc. +The old niri behavior with this setting enabled matches the new behavior. + ```kdl debug { keep-max-bpc-unchanged 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() |
