Skip to content

Commit

Permalink
drm: use modelines in vt restore
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Aug 18, 2024
1 parent 71d4967 commit 2d29c86
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/backend/drm/DRM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,16 @@ void Aquamarine::CDRMBackend::restoreAfterVT() {
};

auto& STATE = c->output->state->state();
auto& MODE = STATE.customMode ? STATE.customMode : STATE.mode;

if (!STATE.customMode && !STATE.mode) {
if (!MODE) {
backend->log(AQ_LOG_WARNING, "drm: Connector {} has output but state has no mode, will send a reset state event later.");
noMode.emplace_back(c);
continue;
}

if (STATE.mode && STATE.mode->modeInfo.has_value())
data.modeInfo = *STATE.mode->modeInfo;
if (MODE->modeInfo.has_value())
data.modeInfo = *MODE->modeInfo;
else
data.calculateMode(c);

Expand Down

0 comments on commit 2d29c86

Please sign in to comment.