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.
This commit is contained in:
Bhushan Shah 2021-03-04 13:25:40 +05:30 committed by Bhushan Shah
parent e7a5726c8b
commit debea631f3

View file

@ -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()
} else { } else {
waylandOutput()->setDpmsMode(toWaylandDpmsMode(DpmsMode::Off)); waylandOutput()->setDpmsMode(toWaylandDpmsMode(DpmsMode::Off));
} }
m_renderLoop->inhibit();
} }
bool DrmOutput::dpmsLegacyApply() bool DrmOutput::dpmsLegacyApply()