Skip to content

Commit

Permalink
drm: only fail INVALID format when enabled (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikalco authored Dec 21, 2024
1 parent a23e9a9 commit 5e3f601
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/backend/drm/DRM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1429,11 +1429,6 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) {
}
}

if (STATE.drmFormat == DRM_FORMAT_INVALID) {
backend->backend->log(AQ_LOG_ERROR, "drm: No format for output");
return false;
}

if (COMMITTED & COutputState::eOutputStateProperties::AQ_OUTPUT_STATE_FORMAT) {
// verify the format is valid for the primary plane
bool ok = false;
Expand All @@ -1450,6 +1445,11 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) {
}
}

if (STATE.enabled && STATE.drmFormat == DRM_FORMAT_INVALID) {
backend->backend->log(AQ_LOG_ERROR, "drm: No format for output");
return false;
}

if (STATE.adaptiveSync && !connector->canDoVrr) {
backend->backend->log(AQ_LOG_ERROR, "drm: No Adaptive sync support for output");
return false;
Expand Down

0 comments on commit 5e3f601

Please sign in to comment.