From 1d7820beacd170e7fd7c8a8f37b5def29e21e0e3 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 14 May 2026 20:55:12 +0200 Subject: [PATCH 1/2] Add missing mapping for DRM_IOCTL_MODE_SETPLANE --- src/header/sys_ioctl/redox/drm.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/header/sys_ioctl/redox/drm.rs b/src/header/sys_ioctl/redox/drm.rs index 92fbc28dfd..662b3ab233 100644 --- a/src/header/sys_ioctl/redox/drm.rs +++ b/src/header/sys_ioctl/redox/drm.rs @@ -117,8 +117,9 @@ pub(super) unsafe fn ioctl(fd: c_int, func: u8, buf: IoctlBuffer) -> Result unsafe { dev.read_write_ioctl::(buf, MODE_MAP_DUMB) }, 0xB4 => unsafe { dev.read_write_ioctl::(buf, MODE_DESTROY_DUMB) }, 0xB5 => unsafe { dev.read_write_ioctl::(buf, MODE_GET_PLANE_RES) }, - 0xB8 => unsafe { dev.read_write_ioctl::(buf, MODE_ADD_FB2) }, 0xB6 => unsafe { dev.read_write_ioctl::(buf, MODE_GET_PLANE) }, + 0xB7 => unsafe { dev.read_write_ioctl::(buf, MODE_SET_PLANE) }, + 0xB8 => unsafe { dev.read_write_ioctl::(buf, MODE_ADD_FB2) }, 0xB9 => unsafe { dev.read_write_ioctl::(buf, MODE_OBJ_GET_PROPERTIES) }, From 0ae5d24a62fbae7084e7a4db24eaab4545156868 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 14 May 2026 20:55:51 +0200 Subject: [PATCH 2/2] Add DRM_IOCTL_MODE_CLOSEFB --- redox-ioctl/src/drm.rs | 10 +++++++++- src/header/sys_ioctl/redox/drm.rs | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/redox-ioctl/src/drm.rs b/redox-ioctl/src/drm.rs index 2f83646bdf..9437dfcc64 100644 --- a/redox-ioctl/src/drm.rs +++ b/redox-ioctl/src/drm.rs @@ -7,7 +7,7 @@ use core::{ pub use drm_sys::{ __kernel_size_t, DRM_PROP_NAME_LEN, drm_clip_rect, drm_get_cap, drm_mode_card_res, - drm_mode_connector_set_property, drm_mode_create_dumb, drm_mode_crtc, + drm_mode_closefb, drm_mode_connector_set_property, drm_mode_create_dumb, drm_mode_crtc, drm_mode_crtc_page_flip_target, drm_mode_cursor, drm_mode_cursor2, drm_mode_destroy_dumb, drm_mode_fb_cmd, drm_mode_fb_cmd2, drm_mode_fb_dirty_cmd, drm_mode_get_blob, drm_mode_get_connector, drm_mode_get_encoder, drm_mode_get_plane, drm_mode_get_plane_res, @@ -337,3 +337,11 @@ define_ioctl_data! { modifier: [u64; 4], } } + +pub const MODE_CLOSE_FB: u64 = 0xD0; +define_ioctl_data! { + struct drm_mode_closefb, DrmModeClosefb { + fb_id: u32, + pad: u32, + } +} diff --git a/src/header/sys_ioctl/redox/drm.rs b/src/header/sys_ioctl/redox/drm.rs index 662b3ab233..6f9f8dcf80 100644 --- a/src/header/sys_ioctl/redox/drm.rs +++ b/src/header/sys_ioctl/redox/drm.rs @@ -125,6 +125,7 @@ pub(super) unsafe fn ioctl(fd: c_int, func: u8, buf: IoctlBuffer) -> Result unsafe { dev.write_ioctl::(buf, MODE_CURSOR2) }, 0xCE => unsafe { dev.read_write_ioctl::(buf, MODE_GET_FB2) }, + 0xD0 => unsafe { dev.read_write_ioctl::(buf, MODE_CLOSE_FB) }, _ => { todo_skip!( 0,