diff --git a/Cargo.lock b/Cargo.lock index 256d2bfade..58844cfb04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1982,8 +1982,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "1.1.2" -source = "git+https://github.com/jackpot51/rustix.git?branch=redox-ioctl#e7e66bc77455251463336582c0b97df01054ccb8" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ "bitflags 2.10.0", "errno", diff --git a/Cargo.toml b/Cargo.toml index ce2e26f7a5..2b5b5ce85e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,7 +89,6 @@ redox_termios = "0.1.3" [patch.crates-io] # Rustix doesn't support ioctls on Redox OS -rustix = { git = "https://github.com/jackpot51/rustix.git", branch = "redox-ioctl" } drm = { git = "https://github.com/Smithay/drm-rs.git" } drm-sys = { git = "https://github.com/Smithay/drm-rs.git" } diff --git a/drivers/graphics/ihdgd/Cargo.toml b/drivers/graphics/ihdgd/Cargo.toml index d73bf7c134..1f3c18c6ef 100644 --- a/drivers/graphics/ihdgd/Cargo.toml +++ b/drivers/graphics/ihdgd/Cargo.toml @@ -9,7 +9,7 @@ drm-sys = "0.8.0" #TODO: edid is abandoned, fork it an maintain? edid = "0.3.0" #TODO: waiting for bitbang-hal to update to embedded-hal 1.0 -embedded-hal = "0.2.7" +embedded-hal = { version = "0.2.7", features = ["unproven"] } log.workspace = true nb = "1.0" # Patched to allow for exact range allocation diff --git a/drivers/graphics/ihdgd/src/device/ddi.rs b/drivers/graphics/ihdgd/src/device/ddi.rs index 64c51bfd91..ac4ce1bd87 100644 --- a/drivers/graphics/ihdgd/src/device/ddi.rs +++ b/drivers/graphics/ihdgd/src/device/ddi.rs @@ -274,31 +274,26 @@ impl Ddi { Ok(edid_data) }; - let (source, edid_data) = match aux_read_edid(self) { - Ok(edid_data) => ("AUX", edid_data), + match aux_read_edid(self) { + Ok(edid_data) => return Ok(Some(("AUX", edid_data))), Err(err) => { log::debug!("DDI {} failed to read EDID from AUX: {}", self.name, err); - match gmbus_read_edid(self) { - Ok(edid_data) => ("GMBUS", edid_data), - Err(err) => { - log::debug!("DDI {} failed to read EDID from GMBUS: {}", self.name, err); - match gpio_read_edid(self) { - Ok(edid_data) => ("GPIO", edid_data), - Err(err) => { - log::debug!( - "DDI {} failed to read EDID from GPIO: {}", - self.name, - err - ); - // Will try again but not fail the driver - return Ok(None); - } - } - } - } } - }; - Ok(Some((source, edid_data))) + } + match gmbus_read_edid(self) { + Ok(edid_data) => return Ok(Some(("GMBUS", edid_data))), + Err(err) => { + log::debug!("DDI {} failed to read EDID from GMBUS: {}", self.name, err); + } + } + match gpio_read_edid(self) { + Ok(edid_data) => return Ok(Some(("GPIO", edid_data))), + Err(err) => { + log::debug!("DDI {} failed to read EDID from GPIO: {}", self.name, err); + } + } + // Will try again but not fail the driver + Ok(None) } pub fn voltage_swing_hdmi( diff --git a/drivers/graphics/ihdgd/src/device/gpio.rs b/drivers/graphics/ihdgd/src/device/gpio.rs index 9999b871eb..fe87e6b108 100644 --- a/drivers/graphics/ihdgd/src/device/gpio.rs +++ b/drivers/graphics/ihdgd/src/device/gpio.rs @@ -2,7 +2,6 @@ use std::convert::Infallible; use std::time::Duration; use common::io::{Io, MmioPtr}; -use embedded_hal::blocking::i2c; use embedded_hal::digital::v2 as digital; use crate::device::HalTimer;