Commit 05877a83 authored by Xaver Hugl's avatar Xaver Hugl
Browse files

backends/drm: reduce "max bpc" to what is actually used

This prevents triggering a bug in the BenQ GW2765 monitor, and should
in theory have no downsides.

BUG: 449906
FIXED-IN: 5.24.5
parent 7a279522
Pipeline #169384 passed with stage
in 12 minutes and 59 seconds
......@@ -231,7 +231,11 @@ void DrmPipeline::prepareAtomicModeset()
m_connector->getProp(DrmConnector::PropertyIndex::Underscan_hborder)->setPending(hborder);
}
if (const auto bpc = m_connector->getProp(DrmConnector::PropertyIndex::MaxBpc)) {
bpc->setPending(bpc->maxValue());
uint64_t preferred = 8;
if (auto backend = dynamic_cast<EglGbmBackend *>(gpu()->platform()->renderBackend()); backend && backend->prefer10bpc()) {
preferred = 10;
}
bpc->setPending(std::min(bpc->maxValue(), preferred));
}
m_pending.crtc->setPending(DrmCrtc::PropertyIndex::Active, activePending());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment