Add DRM_IOCTL_MODE_CLOSEFB

This commit is contained in:
bjorn3
2026-05-14 20:55:51 +02:00
parent 1d7820beac
commit 0ae5d24a62
2 changed files with 10 additions and 1 deletions
+9 -1
View File
@@ -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,
}
}
+1
View File
@@ -125,6 +125,7 @@ pub(super) unsafe fn ioctl(fd: c_int, func: u8, buf: IoctlBuffer) -> Result<c_in
},
0xBB => unsafe { dev.write_ioctl::<drm_mode_cursor2>(buf, MODE_CURSOR2) },
0xCE => unsafe { dev.read_write_ioctl::<drm_mode_fb_cmd2>(buf, MODE_GET_FB2) },
0xD0 => unsafe { dev.read_write_ioctl::<drm_mode_closefb>(buf, MODE_CLOSE_FB) },
_ => {
todo_skip!(
0,