diff --git a/drm/DrmAtomicStateManager.cpp b/drm/DrmAtomicStateManager.cpp index 7722e27..89e1d6d 100644 --- a/drm/DrmAtomicStateManager.cpp +++ b/drm/DrmAtomicStateManager.cpp @@ -120,9 +120,16 @@ auto DrmAtomicStateManager::CommitFrame(AtomicCommitArgs &args) -> int { nonblock = false; new_frame_state.crtc_active_state = *args.active; if (!crtc->GetActiveProperty().AtomicSet(*pset, *args.active ? 1 : 0) || - !connector->GetCrtcIdProperty().AtomicSet(*pset, crtc->GetId())) { + !connector->GetCrtcIdProperty().AtomicSet(*pset, *args.active + ? crtc->GetId() + : 0)) { return -EINVAL; } + if (!*args.active) { + if (!crtc->GetModeProperty().AtomicSet(*pset, 0)) { + return -EINVAL; + } + } } auto *drm = pipe_->device;