From 5e3f6013e99cb6b4e43b90d5abb5d8119ea20923 Mon Sep 17 00:00:00 2001 From: Ikalco <73481042+ikalco@users.noreply.github.com> Date: Sat, 21 Dec 2024 16:14:38 -0600 Subject: [PATCH] drm: only fail INVALID format when enabled (#122) --- src/backend/drm/DRM.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/drm/DRM.cpp b/src/backend/drm/DRM.cpp index 3bd4daa..22d905a 100644 --- a/src/backend/drm/DRM.cpp +++ b/src/backend/drm/DRM.cpp @@ -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; @@ -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;