From c54e079238f85a99d6c299ff781be7b7178d0aac Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Wed, 9 Oct 2024 13:52:46 -0700 Subject: [PATCH] drm/surface/legacy: Remove unused `active` field of `State` This field is currently set, but never read. This logically doesn't need to be part of `state`/`pending` either, since a full commit is not needed to change the DPMS state. --- src/backend/drm/surface/legacy.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/backend/drm/surface/legacy.rs b/src/backend/drm/surface/legacy.rs index 027bdc8e11d9..ecaa78fae3d5 100644 --- a/src/backend/drm/surface/legacy.rs +++ b/src/backend/drm/surface/legacy.rs @@ -18,7 +18,6 @@ use tracing::{debug, info, info_span, instrument, trace}; #[derive(Debug, PartialEq, Eq, Clone)] pub struct State { - pub active: bool, pub mode: Mode, pub connectors: HashSet, } @@ -74,9 +73,6 @@ impl State { // we need to be sure, we require a mode to always be set without relying on the compiler. // So we cheat, because it works and is easier to handle later. Ok(State { - // On legacy there is not (reliable) way to read-back the dpms state. - // So we just always assume it is off. - active: false, mode: current_mode.unwrap_or_else(|| unsafe { std::mem::zeroed() }), connectors: current_connectors, }) @@ -107,7 +103,6 @@ impl LegacyDrmSurface { let state = State::current_state(&*fd, crtc)?; let pending = State { - active: true, mode, connectors: connectors.iter().copied().collect(), };