From 6f722954a03190ced4d317f6dde97d41650b5d34 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Sat, 8 Apr 2023 23:47:42 +0200 Subject: [PATCH] backends/drm: set the scaling mode to none Setting it to "Full Aspect" causes some problems with amdgpu, breaking switching the refresh rate between modes BUG: 468235 --- src/backends/drm/drm_pipeline.cpp | 4 ++-- src/backends/drm/drm_pipeline_legacy.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backends/drm/drm_pipeline.cpp b/src/backends/drm/drm_pipeline.cpp index dcd156ac40..dab029e2eb 100644 --- a/src/backends/drm/drm_pipeline.cpp +++ b/src/backends/drm/drm_pipeline.cpp @@ -264,8 +264,8 @@ void DrmPipeline::prepareAtomicModeset(DrmAtomicCommit *commit) if (const auto hdr = m_connector->getProp(DrmConnector::PropertyIndex::HdrMetadata)) { commit->addProperty(hdr, 0); } - if (const auto scaling = m_connector->getProp(DrmConnector::PropertyIndex::ScalingMode); scaling && scaling->hasEnum(DrmConnector::ScalingMode::Full_Aspect)) { - commit->addEnum(scaling, DrmConnector::ScalingMode::Full_Aspect); + if (const auto scaling = m_connector->getProp(DrmConnector::PropertyIndex::ScalingMode); scaling && scaling->hasEnum(DrmConnector::ScalingMode::None)) { + commit->addEnum(scaling, DrmConnector::ScalingMode::None); } commit->addProperty(m_pending.crtc->getProp(DrmCrtc::PropertyIndex::Active), 1); diff --git a/src/backends/drm/drm_pipeline_legacy.cpp b/src/backends/drm/drm_pipeline_legacy.cpp index 306d842fd3..dabf6d418e 100644 --- a/src/backends/drm/drm_pipeline_legacy.cpp +++ b/src/backends/drm/drm_pipeline_legacy.cpp @@ -112,8 +112,8 @@ DrmPipeline::Error DrmPipeline::applyPendingChangesLegacy() m_connector->getProp(DrmConnector::PropertyIndex::Underscan_vborder)->setPropertyLegacy(m_pending.overscan); m_connector->getProp(DrmConnector::PropertyIndex::Underscan_hborder)->setPropertyLegacy(hborder); } - if (const auto scaling = m_connector->getProp(DrmConnector::PropertyIndex::ScalingMode); scaling && scaling->hasEnum(DrmConnector::ScalingMode::Full_Aspect)) { - scaling->setEnumLegacy(DrmConnector::ScalingMode::Full_Aspect); + if (const auto scaling = m_connector->getProp(DrmConnector::PropertyIndex::ScalingMode); scaling && scaling->hasEnum(DrmConnector::ScalingMode::None)) { + scaling->setEnumLegacy(DrmConnector::ScalingMode::None); } if (m_pending.crtc != m_current.crtc || m_pending.mode != m_current.mode) { Error err = legacyModeset();