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
This commit is contained in:
parent
7a279522a8
commit
05877a8321
1 changed files with 5 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue