Make module dependencies explicit across the workspace

This commit is contained in:
Samuel Onoja committed 2026-10-22 01:28:03 +01:00
1 parent 610478f8c7
commit 1b4db0e681
104 files changed
+614 -203

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ mod transaction;
use diagnostics::{Diagnostics, PrimaryOutcome};
use output_power::{OutputPower, Power};
use redraw::{AnimationFallback, SchedulingMetrics};
use scheduling::*;
use scheduling::{cancel_output_timers, monotonic_now, request_frame, arm_frame, record_frame_schedule};
use smithay::backend::allocator::gbm::{GbmAllocator, GbmBufferFlags, GbmDevice};
use smithay::backend::allocator::{Buffer, Fourcc};
use smithay::backend::drm::compositor::{DrmCompositor, FrameFlags, PrimaryPlaneElement};
+4 -1
View File
@@ -1,7 +1,10 @@
//! Resume reads are asynchronous; newer switch events win over old replies.
use std::sync::{Arc, Mutex, mpsc};
use super::*;
use super::{
Duration, Error, Ferese, RegistrationToken, TimeoutAction, Timer, cancel_output_timers,
reconcile_outputs,
};
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub(super) struct Probe {
+9 -1
View File
@@ -1,6 +1,14 @@
//! A target displays a composition of the source, with no second workspace or input domain.
//! Source alone releases client callbacks/presentation feedback. Targets have independent KMS clocks.
use super::*;
#[cfg(test)]
use smithay::backend::allocator::Fourcc;
#[cfg(test)]
use smithay::output::Scale;
use super::{
CommitCounter, DirectOutput, Ferese, GlesRenderer, GlesTexture, Output, OutputMode,
PhysicalProperties, Subpixel, Transform, capture, sampled_output_elements,
};
use smithay::backend::renderer::Texture;
use smithay::utils::{Buffer, Physical, Rectangle};
+3 -1
View File
@@ -1,5 +1,7 @@
//! Uncertain KMS completion requires device reconciliation, not buffer reuse.
use super::*;
use super::{
DirectOutput, DrmNode, Duration, Ferese, Instant, TimeoutAction, Timer, crtc, reconcile_outputs,
};
const COMPLETION_TIMEOUT: Duration = Duration::from_secs(2);
+4 -1
View File
@@ -1,4 +1,7 @@
use super::*;
use super::{
DirectOutput, DrmNode, Duration, Ferese, Instant, Monotonic, Output, OutputMode, TimeoutAction,
Timer, arm_animation_timer, crtc, render_output, sleep_locked_outputs,
};
use crate::frame_scheduler::FramePlan;
pub(super) fn monotonic_now() -> Duration {
@@ -1,5 +1,9 @@
use smithay::{backend::session::Session, reexports::rustix::fs::OFlags, utils::DeviceFd};
use std::{io, os::fd::OwnedFd, path::Path};
use smithay::backend::session::Session;
use smithay::reexports::rustix::fs::OFlags;
use smithay::utils::DeviceFd;
use std::io;
use std::os::fd::OwnedFd;
use std::path::Path;
pub(super) struct SessionDevice<S: Session> {
session: S,
@@ -37,7 +41,10 @@ impl<S: Session> Drop for SessionDevice<S> {
#[cfg(test)]
mod tests {
use super::*;
use std::{cell::Cell, fs::File, os::fd::AsRawFd, rc::Rc};
use std::cell::Cell;
use std::fs::File;
use std::os::fd::AsRawFd;
use std::rc::Rc;
#[derive(Clone, Default)]
struct TestSession(Rc<Cell<Option<i32>>>);
+7 -1
View File
@@ -1,7 +1,13 @@
//! Desired device identities survive temporary loss of their DRM resources.
use std::path::PathBuf;
use super::*;
use super::{
DrmNode, Duration, Ferese, HashMap, HashSet, Instant, OutputMode, Path, PresentationClock,
RegistrationToken, Scale, Session, TimeoutAction, Timer, all_gpus, cancel_output_timers,
drm_device_key, lid, monotonic_now, open_device, output_transform, refresh_connected_info,
refresh_monitor_policy, remember_applied_configuration, remove_device, rescan_device,
sync_battery_timer, transaction, validate_desired_outputs,
};
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub(super) enum Availability<Node = DrmNode> {
+11 -2
View File
@@ -1,10 +1,19 @@
//! Validate a device-wide desired topology, then use Smithay for every real commit.
//! Smithay exposes TEST_ONLY per surface, but not a combined CRTC request. The
//! one raw request here is validation only; mode/plane ownership stays in Smithay.
use super::*;
use super::{
ControlDevice, DesiredOutputConfiguration, DirectDevice, DirectOutput, DrmDevice, DrmDeviceFd,
DrmMode, DrmNode, Error, Ferese, Fourcc, GbmAllocator, GbmBufferFlags, GbmFramebufferExporter,
GlesRenderer, HashMap, HashSet, OutputCompositor, OutputMode, OutputModeSource, OutputScan,
OutputSelection, OutputSettings, PrimaryPlaneElement, cancel_output_timers,
connected_mode_info, connector, create_direct_output, create_output, crtc, drm_device_key,
internal_connector, io, output_transform, property, remember_applied_configuration,
rescan_device, validate_desired_outputs,
};
use smithay::backend::allocator::Allocator;
use smithay::backend::drm::exporter::{ExportBuffer, ExportFramebuffer};
use smithay::reexports::drm::control::{AtomicCommitFlags, ResourceHandle, atomic::AtomicModeReq};
use smithay::reexports::drm::control::atomic::AtomicModeReq;
use smithay::reexports::drm::control::{AtomicCommitFlags, ResourceHandle};
fn property<D: ControlDevice, H: ResourceHandle>(
drm: &D,