diff --git a/src/plugins/platforms/drm/drm_gpu.cpp b/src/plugins/platforms/drm/drm_gpu.cpp index bb9ae1ca17..05872813f8 100644 --- a/src/plugins/platforms/drm/drm_gpu.cpp +++ b/src/plugins/platforms/drm/drm_gpu.cpp @@ -238,12 +238,10 @@ bool DrmGpu::updateOutputs() return c1->getProp(DrmConnector::PropertyIndex::CrtcId)->current() > c2->getProp(DrmConnector::PropertyIndex::CrtcId)->current(); }); } - auto config = findWorkingCombination({}, connectedConnectors, m_crtcs, m_planes); - - DrmPipeline::commitPipelines(config, DrmPipeline::CommitMode::Commit); + const auto config = findWorkingCombination({}, connectedConnectors, m_crtcs, m_planes); m_pipelines << config; - for (const auto &pipeline : qAsConst(config)) { + for (const auto &pipeline : config) { auto output = pipeline->output(); if (m_outputs.contains(output)) { // try setting hardware rotation @@ -267,7 +265,7 @@ QVector DrmGpu::findWorkingCombination(const QVector test configuration - if (testCombination(pipelines)) { + if (commitCombination(pipelines)) { return pipelines; } else { return {}; @@ -324,7 +322,7 @@ QVector DrmGpu::findWorkingCombination(const QVector &pipelines) +bool DrmGpu::commitCombination(const QVector &pipelines) { for (const auto &pipeline : pipelines) { auto output = findOutput(pipeline->connector()->id()); @@ -338,7 +336,7 @@ bool DrmGpu::testCombination(const QVector &pipelines) pipeline->setup(); } - if (DrmPipeline::commitPipelines(pipelines, DrmPipeline::CommitMode::Test)) { + if (DrmPipeline::commitPipelines(pipelines, DrmPipeline::CommitMode::Commit)) { return true; } else { for (const auto &pipeline : qAsConst(pipelines)) { diff --git a/src/plugins/platforms/drm/drm_gpu.h b/src/plugins/platforms/drm/drm_gpu.h index 37a93411e1..6142ecf035 100644 --- a/src/plugins/platforms/drm/drm_gpu.h +++ b/src/plugins/platforms/drm/drm_gpu.h @@ -120,7 +120,7 @@ private: void initDrmResources(); QVector findWorkingCombination(const QVector &pipelines, QVector connectors, QVector crtcs, const QVector &planes); - bool testCombination(const QVector &pipelines); + bool commitCombination(const QVector &pipelines); DrmBackend* const m_backend; QPointer m_eglBackend;