From debea631f38a37580921311ab0cf316105873da4 Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Thu, 4 Mar 2021 13:25:40 +0530 Subject: [PATCH] platforms/drm: inhibit the renderloop when screen is turned off Otherwise we will continue using gpu resources even when we can not show any content on screen. --- src/plugins/platforms/drm/drm_output.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/drm/drm_output.cpp b/src/plugins/platforms/drm/drm_output.cpp index 47d0ffa18e..94c6352b57 100644 --- a/src/plugins/platforms/drm/drm_output.cpp +++ b/src/plugins/platforms/drm/drm_output.cpp @@ -515,6 +515,7 @@ void DrmOutput::dpmsFinishOn() m_backend->checkOutputsAreOn(); m_crtc->blank(this); + m_renderLoop->uninhibit(); if (Compositor *compositor = Compositor::self()) { compositor->addRepaintFull(); } @@ -530,6 +531,7 @@ void DrmOutput::dpmsFinishOff() } else { waylandOutput()->setDpmsMode(toWaylandDpmsMode(DpmsMode::Off)); } + m_renderLoop->inhibit(); } bool DrmOutput::dpmsLegacyApply()