Skip to content

Commit

Permalink
Update drm to 0.11
Browse files Browse the repository at this point in the history
Drm-rs now no longer requires separate generated bindings for each
platform, so this fixes the build on architectures/OSes where drm didn't
have bindings.

It also now uses Rustix instead of Nix, but Nix is still used by the
Wayland and X11 backends, until the next wayland-rs and x11rb release.

This is not a breaking change since `drm` isn't exposed in the API.
  • Loading branch information
ids1024 authored and notgull committed Nov 15, 2023
1 parent ac92d53 commit 58da196
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ raw_window_handle = { package = "raw-window-handle", version = "0.6", features =
[target.'cfg(all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox"))))'.dependencies]
as-raw-xcb-connection = { version = "1.0.0", optional = true }
bytemuck = { version = "1.12.3", optional = true }
drm = { version = "0.10.0", default-features = false, optional = true }
drm = { version = "0.11.0", default-features = false, optional = true }
fastrand = { version = "2.0.0", optional = true }
memmap2 = { version = "0.9.0", optional = true }
rustix = { version = "0.38.19", features = ["fs", "mm", "shm", "std"], default-features = false, optional = true }
Expand Down
3 changes: 1 addition & 2 deletions src/kms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,7 @@ impl<D: ?Sized, W: ?Sized> BufferImpl<'_, D, W> {
// returns `ENOSYS` and check that before allocating the above and running this.
match self.display.dirty_framebuffer(self.front_fb, &rectangles) {
Ok(()) => {}
Err(drm::SystemError::Unknown { errno })
if errno as i32 == rustix::io::Errno::NOSYS.raw_os_error() => {}
Err(e) if e.raw_os_error() == Some(rustix::io::Errno::NOSYS.raw_os_error()) => {}
Err(e) => {
return Err(SoftBufferError::PlatformError(
Some("failed to dirty framebuffer".into()),
Expand Down

0 comments on commit 58da196

Please sign in to comment.