backends/drm: set scaling mode to full aspect with generated modes on internal displays

While the scaling mode has caused some issues with external displays, we've had several
reports that using "unify outputs" has caused the internal display to no longer show
anything, as it changes to an unsupported mode. This sets the scaling mode so that the
driver handles the scaling internally, instead of leaving it up to the panel, and it only
does so on internal displays with generated modes, to minimize the risk of further breakage.

BUG: 488111
This commit is contained in:
Xaver Hugl 2024-06-11 12:49:53 +02:00
parent 131c5399b3
commit 35a7e30952

View file

@ -321,8 +321,12 @@ bool DrmPipeline::prepareAtomicModeset(DrmAtomicCommit *commit)
} else if (m_connector->colorspace.isValid()) {
commit->addEnum(m_connector->colorspace, DrmConnector::Colorspace::Default);
}
if (m_connector->scalingMode.isValid() && m_connector->scalingMode.hasEnum(DrmConnector::ScalingMode::None)) {
commit->addEnum(m_connector->scalingMode, DrmConnector::ScalingMode::None);
if (m_connector->scalingMode.isValid()) {
if (m_connector->isInternal() && m_connector->scalingMode.hasEnum(DrmConnector::ScalingMode::Full_Aspect) && (m_pending.mode->flags() & OutputMode::Flag::Generated)) {
commit->addEnum(m_connector->scalingMode, DrmConnector::ScalingMode::Full_Aspect);
} else if (m_connector->scalingMode.hasEnum(DrmConnector::ScalingMode::None)) {
commit->addEnum(m_connector->scalingMode, DrmConnector::ScalingMode::None);
}
}
commit->addProperty(m_pending.crtc->active, 1);