fix: wire redox-drm handoff patches

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-05-07 20:52:51 +01:00
parent e3a9a820ee
commit 612ef6ce36
3 changed files with 30 additions and 1 deletions
@@ -0,0 +1,28 @@
--- a/src/main.rs
+++ b/src/main.rs
@@ -21,6 +21,7 @@ use redox_driver_sys::pci::{
PCI_VENDOR_ID_AMD, PCI_VENDOR_ID_INTEL,
};
+use redox_driver_sys::pcid_client::PcidClient;
use redox_driver_sys::quirks::PciQuirkFlags;
use redox_scheme::{SignalBehavior, Socket};
@@ -164,6 +165,19 @@ fn select_gpu_from_args() -> Result<PciDeviceInfo> {
});
}
+ if let Some(mut pcid) = PcidClient::connect_default() {
+ let function = pcid.request_config().map_err(|e| {
+ DriverError::Pci(format!("failed to read pcid-spawner handoff config: {e}"))
+ })?;
+ let info = function.device_info();
+ info!(
+ "redox-drm: selected GPU from pcid-spawner handoff at {}",
+ info.location
+ );
+ return Ok(info);
+ }
+
let devices = enumerate_pci_class(PCI_CLASS_DISPLAY)
.map_err(|e| DriverError::Pci(format!("PCI scan failed: {e}")))?;
let first = devices
@@ -0,0 +1 @@
../../../patches/redox-drm/P6-pcid-coordinate-handoff.patch
+1 -1
View File
@@ -1,6 +1,6 @@
[source] [source]
path = "source" path = "source"
patches = ["P1-intel-gen-gate.patch", "P2-intel-display-fixes.patch", "P3-intel-gen8-gen9-firmware.patch", "P4-virtio-gpu-driver.patch", "P5-virtio-auto-probe.patch"] patches = ["P1-intel-gen-gate.patch", "P2-intel-display-fixes.patch", "P3-intel-gen8-gen9-firmware.patch", "P4-virtio-gpu-driver.patch", "P5-virtio-auto-probe.patch", "P6-pcid-coordinate-handoff.patch", "P7-unreachable-pattern-cleanup.patch", "P8-terminal-scheme-ebadf.patch", "P9-virtio-handoff-mmio-map.patch"]
[build] [build]
template = "cargo" template = "cargo"