From a0a98d0b3171a4db956af5fbf256e66671c71866 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 9 Sep 2021 11:31:01 +0200 Subject: [PATCH] platforms/drm: only delete outputs if not pre-existing When there aren't enough CRTCs to drive all the outputs this could delete existing outputs. --- src/plugins/platforms/drm/drm_gpu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/drm/drm_gpu.cpp b/src/plugins/platforms/drm/drm_gpu.cpp index e2a8b82224..946664047d 100644 --- a/src/plugins/platforms/drm/drm_gpu.cpp +++ b/src/plugins/platforms/drm/drm_gpu.cpp @@ -340,8 +340,10 @@ bool DrmGpu::commitCombination(const QVector &pipelines) return true; } else { for (const auto &pipeline : qAsConst(pipelines)) { - Q_EMIT outputDisabled(pipeline->output()); - delete pipeline->output(); + if (!m_outputs.contains(pipeline->output())) { + Q_EMIT outputDisabled(pipeline->output()); + delete pipeline->output(); + } } return false; }