redox-drm: switch recipe to local/sources/redox-drm fork, bump 0.2.3
Point the redox-drm recipe at the new durable fork at local/sources/redox-drm/. The source tree is now an absolute symlink from local/recipes/gpu/redox-drm/source to the fork, matching the pipewire / wireplumber fork model. The absolute target survives moving the project root. Drop the dead recipe-local patches (P5, P8, P10 — P9 was dropped in the prior redox-drm recipe commit). All four were already applied to the in-tree source before the fork move, so the patch artefacts were inert. The fork is the durable source of truth; future Red Bear changes go as git commits there. Bump version 0.1.0 -> 0.2.3 and add the v6.0 2026 Red Bear fork marker to the description. The recipe documentation now describes the supported GPU targets (virtio-gpu, Intel Meteor Lake / Arrow Lake / Lunar Lake, AMD display glue) and the hardware validation status of each.
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
diff --git a/src/drivers/mod.rs b/src/drivers/mod.rs
|
||||
--- a/src/drivers/mod.rs
|
||||
+++ b/src/drivers/mod.rs
|
||||
@@ -27 +27 @@ const INTEL_GEN12_MTL_IDS: &[u16] = &[
|
||||
- 0x7D40, 0x7D41, 0x7D45, 0x7D51, 0x7D55, 0x7D60, 0x7D67, 0x7DD1, 0x7DD5,
|
||||
+ 0x7D40, 0x7D45, 0x7D55, 0x7D60, 0x7DD5,
|
||||
@@ -29,2 +29,2 @@ const INTEL_GEN12_MTL_IDS: &[u16] = &[
|
||||
-const INTEL_GEN12_ARL_IDS: &[u16] = &[0x6420, 0x64A0, 0x64B0];
|
||||
-const INTEL_GEN12_LNL_IDS: &[u16] = &[0xB640];
|
||||
+const INTEL_GEN12_ARL_IDS: &[u16] = &[0x7D41, 0x7D51, 0x7DD1, 0x7D67, 0xB640];
|
||||
+const INTEL_GEN12_LNL_IDS: &[u16] = &[0x6420, 0x64A0, 0x64B0];
|
||||
diff --git a/src/main.rs b/src/main.rs
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -297 +297,5 @@ fn intel_display_firmware_keys(device_id: u16) -> Option<&'static [&'static str]>
|
||||
- 0x7D40 | 0x7D41 | 0x7D45 | 0x7D51 | 0x7D55 | 0x7D60 | 0x7D67 | 0x7DD1 | 0x7DD5 => {
|
||||
+ 0x7D40 | 0x7D45 | 0x7D55 | 0x7D60 | 0x7DD5 => {
|
||||
+ Some(INTEL_MTL_DMC_KEYS)
|
||||
+ }
|
||||
+ // Arrow Lake (ARL) — display IP 14.0, same DMC as Meteor Lake
|
||||
+ 0x7D41 | 0x7D51 | 0x7DD1 | 0x7D67 | 0xB640 => {
|
||||
@@ -1,25 +0,0 @@
|
||||
diff --git a/local/recipes/gpu/redox-drm/source/src/main.rs b/local/recipes/gpu/redox-drm/source/src/main.rs
|
||||
index 612a64e0f..7af80bd75 100644
|
||||
--- a/local/recipes/gpu/redox-drm/source/src/main.rs
|
||||
+++ b/local/recipes/gpu/redox-drm/source/src/main.rs
|
||||
@@ -168,9 +168,9 @@ fn select_gpu_from_args() -> Result<PciDeviceInfo> {
|
||||
.map_err(|e| DriverError::Pci(format!("PCI scan failed: {e}")))?;
|
||||
let first = devices
|
||||
.into_iter()
|
||||
- .find(|d| d.vendor_id == PCI_VENDOR_ID_AMD || d.vendor_id == PCI_VENDOR_ID_INTEL)
|
||||
+ .find(|d| d.vendor_id == PCI_VENDOR_ID_AMD || d.vendor_id == PCI_VENDOR_ID_INTEL || d.vendor_id == 0x1AF4)
|
||||
.ok_or_else(|| {
|
||||
- DriverError::NotFound("no AMD or Intel GPU found via scheme:pci".to_string())
|
||||
+ DriverError::NotFound("no AMD, Intel, or VirtIO GPU found via scheme:pci".to_string())
|
||||
})?;
|
||||
let mut pci = PciDevice::open_location(&first.location)
|
||||
.map_err(|e| DriverError::Pci(format!("failed to open GPU {}: {e}", first.location)))?;
|
||||
@@ -205,7 +205,7 @@ fn verify_supported_gpu(info: &PciDeviceInfo) -> Result<()> {
|
||||
)));
|
||||
}
|
||||
|
||||
- if info.vendor_id != PCI_VENDOR_ID_AMD && info.vendor_id != PCI_VENDOR_ID_INTEL {
|
||||
+ if info.vendor_id != PCI_VENDOR_ID_AMD && info.vendor_id != PCI_VENDOR_ID_INTEL && info.vendor_id != 0x1AF4 {
|
||||
return Err(DriverError::Pci(format!(
|
||||
"device {} is vendor {:#06x}, expected AMD {:#06x} or Intel {:#06x}",
|
||||
info.location, info.vendor_id, PCI_VENDOR_ID_AMD, PCI_VENDOR_ID_INTEL
|
||||
@@ -1,69 +0,0 @@
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -24,6 +24,7 @@ use redox_driver_sys::pcid_client::PcidClient;
|
||||
use redox_driver_sys::quirks::PciQuirkFlags;
|
||||
use redox_scheme::{SignalBehavior, Socket};
|
||||
+use syscall04::error::EBADF;
|
||||
|
||||
use crate::driver::{DriverError, DriverEvent, GpuDriver, Result};
|
||||
use crate::drivers::DriverRegistry;
|
||||
@@ -71,11 +72,6 @@ fn run() -> Result<()> {
|
||||
info.location
|
||||
);
|
||||
|
||||
- let socket = Socket::create("drm")
|
||||
- .map_err(|e| DriverError::Initialization(format!("failed to register drm scheme: {e}")))?;
|
||||
- info!("redox-drm: registered scheme:drm");
|
||||
-
|
||||
let (event_tx, event_rx) = mpsc::sync_channel::<DriverEvent>(8);
|
||||
|
||||
let irq_driver: Arc<dyn GpuDriver> = driver.clone();
|
||||
@@ -108,6 +104,15 @@ fn run() -> Result<()> {
|
||||
}
|
||||
});
|
||||
|
||||
+ // redox-scheme opens the scheme fd with O_CLOEXEC. On Redox, thread startup can
|
||||
+ // invalidate a close-on-exec fd opened before the thread workers exist, which
|
||||
+ // showed up as an immediate EBADF from next_request() during QEMU greeter boot.
|
||||
+ // Register scheme:drm only after the worker threads are running so the listening
|
||||
+ // fd remains stable for compositor clients.
|
||||
+ let socket = create_drm_socket()?;
|
||||
+ info!("redox-drm: registered scheme:drm");
|
||||
+
|
||||
loop {
|
||||
let request = match socket.next_request(SignalBehavior::Restart) {
|
||||
Ok(Some(request)) => request,
|
||||
@@ -118,6 +123,10 @@ fn run() -> Result<()> {
|
||||
break;
|
||||
}
|
||||
Err(e) => {
|
||||
+ if e.errno == EBADF {
|
||||
+ info!("redox-drm: scheme fd closed, exiting");
|
||||
+ break;
|
||||
+ }
|
||||
error!("redox-drm: failed to receive scheme request: {}", e);
|
||||
continue;
|
||||
}
|
||||
@@ -145,11 +154,22 @@ fn run() -> Result<()> {
|
||||
};
|
||||
|
||||
if let Err(e) = socket.write_response(response, SignalBehavior::Restart) {
|
||||
+ if e.errno == EBADF {
|
||||
+ info!("redox-drm: scheme fd closed while writing response, exiting");
|
||||
+ break;
|
||||
+ }
|
||||
error!("redox-drm: failed to write scheme response: {}", e);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+fn create_drm_socket() -> Result<Socket> {
|
||||
+ Socket::create("drm")
|
||||
+ .map_err(|e| DriverError::Initialization(format!("failed to register drm scheme: {e}")))
|
||||
+}
|
||||
+
|
||||
fn select_gpu_from_args() -> Result<PciDeviceInfo> {
|
||||
let mut args = env::args().skip(1);
|
||||
let parsed = match (args.next(), args.next(), args.next()) {
|
||||
@@ -1,6 +1,21 @@
|
||||
# redox-drm — DRM/KMS scheme daemon (Red Bear OS fork).
|
||||
#
|
||||
# This recipe builds the Red Bear fork of the upstream redox-drm scheme
|
||||
# daemon maintained at local/sources/redox-drm/. The fork is directly
|
||||
# editable and is the durable source of truth for the daemon.
|
||||
#
|
||||
# redox-drm registers scheme:drm/cardN for the GPU detected on the PCI
|
||||
# bus. It supports:
|
||||
# * virtio-gpu (QEMU default display)
|
||||
# * Intel i915-like (Meteor Lake, Arrow Lake, Lunar Lake)
|
||||
# * AMD display glue (DRM/KMS path, hardware validation pending)
|
||||
#
|
||||
# The fork integrates with redox-driver-sys (PCI, MMIO, IRQ, quirks)
|
||||
# and linux-kpi (C headers for the AMD glue path). The bounded Red
|
||||
# Bear display glue path is built on top of the imported Linux AMD DC
|
||||
# source tree; connector detection, modeset, and init live in Rust.
|
||||
[source]
|
||||
path = "source"
|
||||
patches = ["P5-virtio-auto-probe.patch", "P8-terminal-scheme-ebadf.patch", "P9-virtio-handoff-mmio-map.patch", "P10-arrow-lake-device-ids.patch"]
|
||||
path = "../../../local/sources/redox-drm"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
@@ -10,5 +25,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[package]
|
||||
version = "0.2.3"
|
||||
description = "redox-drm 0.2.3 (v6.0 2026) — DRM/KMS scheme daemon (Red Bear fork). Registers scheme:drm/cardN and provides GPU modesetting, GEM/GTT/ring state, and KMS handling. Supports virtio-gpu (QEMU), Intel i915-like (Meteor Lake, Arrow Lake, Lunar Lake), and AMD display glue. Source maintained at local/sources/redox-drm/."
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
@@ -1 +1 @@
|
||||
../../../local/sources/redox-drm
|
||||
/home/kellito/Builds/RedBear-OS/local/recipes/gpu/redox-drm/../../../sources/redox-drm
|
||||
Reference in New Issue
Block a user