From 0284aeb7bba61813d2eee611b0c58d56e821ac13 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Mon, 26 Apr 2021 21:56:35 +0200 Subject: [PATCH] platforms/drm: Don't release drm buffers in EglGbmBackend When we release the buffers that also removes the drm fbs. This causes failing atomic commits that the atomic code doesn't (yet) handle correctly, the result is a black screen when compositing is restarted. --- src/plugins/platforms/drm/drm_output.cpp | 8 -------- src/plugins/platforms/drm/drm_output.h | 1 - src/plugins/platforms/drm/egl_gbm_backend.cpp | 1 - 3 files changed, 10 deletions(-) diff --git a/src/plugins/platforms/drm/drm_output.cpp b/src/plugins/platforms/drm/drm_output.cpp index 7671c066fd..31d0383ab9 100644 --- a/src/plugins/platforms/drm/drm_output.cpp +++ b/src/plugins/platforms/drm/drm_output.cpp @@ -74,14 +74,6 @@ void DrmOutput::teardown() //this is needed so that the pageflipcallback handle isn't deleted } -void DrmOutput::releaseBuffers() -{ - m_crtc->setCurrent(nullptr); - m_crtc->setNext(nullptr); - m_primaryPlane->setCurrent(nullptr); - m_primaryPlane->setNext(nullptr); -} - bool DrmOutput::hideCursor() { return drmModeSetCursor(m_gpu->fd(), m_crtc->id(), 0, 0, 0) == 0; diff --git a/src/plugins/platforms/drm/drm_output.h b/src/plugins/platforms/drm/drm_output.h index 9a181c3259..b8cbf4a770 100644 --- a/src/plugins/platforms/drm/drm_output.h +++ b/src/plugins/platforms/drm/drm_output.h @@ -44,7 +44,6 @@ public: ///queues deleting the output after a page flip has completed. void teardown(); - void releaseBuffers(); bool showCursor(DrmDumbBuffer *buffer); bool showCursor(); bool hideCursor(); diff --git a/src/plugins/platforms/drm/egl_gbm_backend.cpp b/src/plugins/platforms/drm/egl_gbm_backend.cpp index eac8c69bad..0235ff43bb 100644 --- a/src/plugins/platforms/drm/egl_gbm_backend.cpp +++ b/src/plugins/platforms/drm/egl_gbm_backend.cpp @@ -69,7 +69,6 @@ void EglGbmBackend::cleanupFramebuffer(Output &output) void EglGbmBackend::cleanupOutput(Output &output) { cleanupFramebuffer(output); - output.output->releaseBuffers(); output.buffer = nullptr; output.secondaryBuffer = nullptr;