all: set rust edition to 2024
This commit is contained in:
parent
02a18f620b
commit
3338909170
515 changed files with 1225 additions and 1187 deletions
|
|
@ -2,7 +2,7 @@ use {
|
|||
crate::{format::Format, utils::oserror::OsError, video::Modifier},
|
||||
arrayvec::ArrayVec,
|
||||
std::rc::Rc,
|
||||
uapi::{c::ioctl, OwnedFd, _IOW, _IOWR},
|
||||
uapi::{_IOW, _IOWR, OwnedFd, c::ioctl},
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ use {
|
|||
crate::{
|
||||
utils::oserror::OsError,
|
||||
video::drm::sys::{
|
||||
create_lease, drm_event, drm_event_vblank, gem_close, get_cap,
|
||||
get_device_name_from_fd2, get_minor_name_from_fd, get_node_type_from_fd, get_nodes,
|
||||
mode_addfb2, mode_atomic, mode_create_blob, mode_destroy_blob, mode_get_resources,
|
||||
mode_getconnector, mode_getencoder, mode_getplane, mode_getplaneresources,
|
||||
mode_getprobblob, mode_getproperty, mode_obj_getproperties, mode_rmfb,
|
||||
prime_fd_to_handle, set_client_cap, DRM_DISPLAY_MODE_LEN, DRM_MODE_ATOMIC_TEST_ONLY,
|
||||
DRM_MODE_FB_MODIFIERS, DRM_MODE_OBJECT_BLOB, DRM_MODE_OBJECT_CONNECTOR,
|
||||
DRM_MODE_OBJECT_CRTC, DRM_MODE_OBJECT_ENCODER, DRM_MODE_OBJECT_FB,
|
||||
DRM_MODE_OBJECT_MODE, DRM_MODE_OBJECT_PLANE, DRM_MODE_OBJECT_PROPERTY,
|
||||
DRM_DISPLAY_MODE_LEN, DRM_MODE_ATOMIC_TEST_ONLY, DRM_MODE_FB_MODIFIERS,
|
||||
DRM_MODE_OBJECT_BLOB, DRM_MODE_OBJECT_CONNECTOR, DRM_MODE_OBJECT_CRTC,
|
||||
DRM_MODE_OBJECT_ENCODER, DRM_MODE_OBJECT_FB, DRM_MODE_OBJECT_MODE,
|
||||
DRM_MODE_OBJECT_PLANE, DRM_MODE_OBJECT_PROPERTY, create_lease, drm_event,
|
||||
drm_event_vblank, gem_close, get_cap, get_device_name_from_fd2, get_minor_name_from_fd,
|
||||
get_node_type_from_fd, get_nodes, mode_addfb2, mode_atomic, mode_create_blob,
|
||||
mode_destroy_blob, mode_get_resources, mode_getconnector, mode_getencoder,
|
||||
mode_getplane, mode_getplaneresources, mode_getprobblob, mode_getproperty,
|
||||
mode_obj_getproperties, mode_rmfb, prime_fd_to_handle, set_client_cap,
|
||||
},
|
||||
},
|
||||
ahash::AHashMap,
|
||||
|
|
@ -29,7 +29,7 @@ use {
|
|||
rc::{Rc, Weak},
|
||||
},
|
||||
thiserror::Error,
|
||||
uapi::{c, OwnedFd, Pod, Ustring},
|
||||
uapi::{OwnedFd, Pod, Ustring, c},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
|
@ -38,18 +38,18 @@ use crate::{
|
|||
io_uring::{IoUring, IoUringError},
|
||||
utils::{buf::Buf, errorfmt::ErrorFmt, stack::Stack, syncqueue::SyncQueue, vec_ext::VecExt},
|
||||
video::{
|
||||
INVALID_MODIFIER, Modifier,
|
||||
dmabuf::DmaBuf,
|
||||
drm::sys::{
|
||||
auth_magic, drm_event_crtc_sequence, drm_format_modifier, drm_format_modifier_blob,
|
||||
drop_master, get_version, queue_sequence, revoke_lease, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP,
|
||||
DRM_CAP_CURSOR_HEIGHT, DRM_CAP_CURSOR_WIDTH, FORMAT_BLOB_CURRENT,
|
||||
DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP, DRM_CAP_CURSOR_HEIGHT, DRM_CAP_CURSOR_WIDTH,
|
||||
FORMAT_BLOB_CURRENT, auth_magic, drm_event_crtc_sequence, drm_format_modifier,
|
||||
drm_format_modifier_blob, drop_master, get_version, queue_sequence, revoke_lease,
|
||||
},
|
||||
Modifier, INVALID_MODIFIER,
|
||||
},
|
||||
};
|
||||
pub use sys::{
|
||||
drm_mode_modeinfo, DRM_CLIENT_CAP_ATOMIC, DRM_MODE_ATOMIC_ALLOW_MODESET,
|
||||
DRM_MODE_ATOMIC_NONBLOCK, DRM_MODE_PAGE_FLIP_ASYNC, DRM_MODE_PAGE_FLIP_EVENT,
|
||||
DRM_CLIENT_CAP_ATOMIC, DRM_MODE_ATOMIC_ALLOW_MODESET, DRM_MODE_ATOMIC_NONBLOCK,
|
||||
DRM_MODE_PAGE_FLIP_ASYNC, DRM_MODE_PAGE_FLIP_EVENT, drm_mode_modeinfo,
|
||||
};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
|
|||
|
|
@ -10,21 +10,21 @@ use {
|
|||
oserror::OsError,
|
||||
},
|
||||
video::drm::{
|
||||
DrmError,
|
||||
sys::{
|
||||
sync_ioc_merge, sync_obj_create, sync_obj_destroy, sync_obj_eventfd,
|
||||
sync_obj_fd_to_handle, sync_obj_handle_to_fd, sync_obj_signal, sync_obj_transfer,
|
||||
DRM_SYNCOBJ_CREATE_SIGNALED, DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE,
|
||||
DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE,
|
||||
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE,
|
||||
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE, sync_ioc_merge, sync_obj_create,
|
||||
sync_obj_destroy, sync_obj_eventfd, sync_obj_fd_to_handle, sync_obj_handle_to_fd,
|
||||
sync_obj_signal, sync_obj_transfer,
|
||||
},
|
||||
DrmError,
|
||||
},
|
||||
},
|
||||
std::{
|
||||
rc::Rc,
|
||||
sync::atomic::{AtomicU64, Ordering::Relaxed},
|
||||
},
|
||||
uapi::{c, OwnedFd},
|
||||
uapi::{OwnedFd, c},
|
||||
};
|
||||
|
||||
static SYNCOBJ_ID: AtomicU64 = AtomicU64::new(0);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ use {
|
|||
ffi::CString,
|
||||
io::{BufRead, BufReader},
|
||||
},
|
||||
uapi::{c, pod_zeroed, OwnedFd, Pod, Ustring},
|
||||
uapi::{OwnedFd, Pod, Ustring, c, pod_zeroed},
|
||||
};
|
||||
|
||||
pub unsafe fn ioctl<T>(fd: c::c_int, request: c::c_ulong, t: &mut T) -> Result<c::c_int, OsError> {
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ use {
|
|||
hash_map_ext::HashMapExt, numcell::NumCell, oserror::OsError, stack::Stack,
|
||||
},
|
||||
video::drm::{
|
||||
sync_obj::{SyncObj, SyncObjCtx, SyncObjPoint},
|
||||
DrmError,
|
||||
sync_obj::{SyncObj, SyncObjCtx, SyncObjPoint},
|
||||
},
|
||||
},
|
||||
std::{cell::Cell, rc::Rc},
|
||||
uapi::{c, OwnedFd},
|
||||
uapi::{OwnedFd, c},
|
||||
};
|
||||
|
||||
pub struct WaitForSyncObj {
|
||||
|
|
|
|||
|
|
@ -3,15 +3,16 @@
|
|||
use {
|
||||
crate::{
|
||||
allocator::{
|
||||
Allocator, AllocatorError, BufferObject, BufferUsage, MappedBuffer, BO_USE_CURSOR,
|
||||
BO_USE_LINEAR, BO_USE_PROTECTED, BO_USE_RENDERING, BO_USE_SCANOUT, BO_USE_WRITE,
|
||||
Allocator, AllocatorError, BO_USE_CURSOR, BO_USE_LINEAR, BO_USE_PROTECTED,
|
||||
BO_USE_RENDERING, BO_USE_SCANOUT, BO_USE_WRITE, BufferObject, BufferUsage,
|
||||
MappedBuffer,
|
||||
},
|
||||
format::{formats, Format},
|
||||
format::{Format, formats},
|
||||
utils::oserror::OsError,
|
||||
video::{
|
||||
INVALID_MODIFIER, Modifier,
|
||||
dmabuf::{DmaBuf, DmaBufIds, DmaBufPlane, PlaneVec},
|
||||
drm::{Drm, DrmError},
|
||||
Modifier, INVALID_MODIFIER,
|
||||
},
|
||||
},
|
||||
std::{
|
||||
|
|
@ -21,7 +22,7 @@ use {
|
|||
slice,
|
||||
},
|
||||
thiserror::Error,
|
||||
uapi::{c, OwnedFd},
|
||||
uapi::{OwnedFd, c},
|
||||
};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue