Commit ba43e3d6 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 6da3c218
Pipeline #169401 passed with stage
in 17 minutes and 27 seconds
...@@ -242,7 +242,11 @@ void DrmPipeline::prepareAtomicModeset() ...@@ -242,7 +242,11 @@ void DrmPipeline::prepareAtomicModeset()
m_connector->getProp(DrmConnector::PropertyIndex::Underscan_hborder)->setPending(hborder); m_connector->getProp(DrmConnector::PropertyIndex::Underscan_hborder)->setPending(hborder);
} }
if (const auto bpc = m_connector->getProp(DrmConnector::PropertyIndex::MaxBpc)) { if (const auto bpc = m_connector->getProp(DrmConnector::PropertyIndex::MaxBpc)) {
bpc->setPending(bpc->maxValue()); uint64_t preferred = 8;
if (gpu()->eglBackend() && gpu()->eglBackend()->prefer10bpc()) {
preferred = 10;
}
bpc->setPending(std::min(bpc->maxValue(), preferred));
} }
pending.crtc->setPending(DrmCrtc::PropertyIndex::Active, activePending()); 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