Commit debea631 authored by Bhushan Shah's avatar Bhushan Shah 📱 Committed by Bhushan Shah
Browse files

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.
parent e7a5726c
...@@ -515,6 +515,7 @@ void DrmOutput::dpmsFinishOn() ...@@ -515,6 +515,7 @@ void DrmOutput::dpmsFinishOn()
m_backend->checkOutputsAreOn(); m_backend->checkOutputsAreOn();
m_crtc->blank(this); m_crtc->blank(this);
m_renderLoop->uninhibit();
if (Compositor *compositor = Compositor::self()) { if (Compositor *compositor = Compositor::self()) {
compositor->addRepaintFull(); compositor->addRepaintFull();
} }
...@@ -530,6 +531,7 @@ void DrmOutput::dpmsFinishOff() ...@@ -530,6 +531,7 @@ void DrmOutput::dpmsFinishOff()
} else { } else {
waylandOutput()->setDpmsMode(toWaylandDpmsMode(DpmsMode::Off)); waylandOutput()->setDpmsMode(toWaylandDpmsMode(DpmsMode::Off));
} }
m_renderLoop->inhibit();
} }
bool DrmOutput::dpmsLegacyApply() bool DrmOutput::dpmsLegacyApply()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment