From 7384405add47be4f81faef66f364bffc9c710349 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Sun, 20 Mar 2022 21:06:50 +0100 Subject: [PATCH] backends/drm: set max bpc in DrmPipeline If it's only set in DrmConnector it may be reverted if a test commit fails CCBUG: 448220 --- src/backends/drm/drm_object_connector.cpp | 5 ----- src/backends/drm/drm_pipeline.cpp | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backends/drm/drm_object_connector.cpp b/src/backends/drm/drm_object_connector.cpp index 2a9f1d6ad5..baf129ffbe 100644 --- a/src/backends/drm/drm_object_connector.cpp +++ b/src/backends/drm/drm_object_connector.cpp @@ -355,11 +355,6 @@ bool DrmConnector::updateProperties() m_physicalSize = overwriteSize; } - if (auto bpc = getProp(PropertyIndex::MaxBpc)) { - // make sure the driver allows us to use high bpc - bpc->setPending(bpc->maxValue()); - } - // update modes bool equal = m_conn->count_modes == m_modes.count(); for (int i = 0; equal && i < m_conn->count_modes; i++) { diff --git a/src/backends/drm/drm_pipeline.cpp b/src/backends/drm/drm_pipeline.cpp index ce8473d7a9..17073dd318 100644 --- a/src/backends/drm/drm_pipeline.cpp +++ b/src/backends/drm/drm_pipeline.cpp @@ -224,6 +224,9 @@ void DrmPipeline::prepareAtomicModeset() m_connector->getProp(DrmConnector::PropertyIndex::Underscan_vborder)->setPending(pending.overscan); m_connector->getProp(DrmConnector::PropertyIndex::Underscan_hborder)->setPending(hborder); } + if (const auto bpc = m_connector->getProp(DrmConnector::PropertyIndex::MaxBpc)) { + bpc->setPending(bpc->maxValue()); + } pending.crtc->setPending(DrmCrtc::PropertyIndex::Active, activePending()); pending.crtc->setPending(DrmCrtc::PropertyIndex::ModeId, activePending() ? pending.mode->blobId() : 0);