Remove DPMS-on when going offscreen

Forcing DPMS on when we lose our session may force an expensive modeset
operation, which is pointless if the next consumer (another compositor,
or the console) is going to do a modeset. These should force DPMS on
regardless.

This actively causes problems for the DRM backend, in that it may
actually require a repaint to set coherent state for DPMS off -> DPMS on
transitions, which is very much not what we want when going offscreen.

As DRM is the only backend which actually implements DPMS, just remove
this call.

Differential Revision: https://phabricator.freedesktop.org/D1483

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Daniel Stone 2016-11-08 15:47:09 +00:00
parent f33e104865
commit 893b936f9a
1 changed files with 1 additions and 8 deletions

View File

@ -3932,10 +3932,9 @@ weston_compositor_wake(struct weston_compositor *compositor)
switch (old_state) {
case WESTON_COMPOSITOR_SLEEPING:
weston_compositor_dpms(compositor, WESTON_DPMS_ON);
/* fall through */
case WESTON_COMPOSITOR_IDLE:
case WESTON_COMPOSITOR_OFFSCREEN:
weston_compositor_dpms(compositor, WESTON_DPMS_ON);
wl_signal_emit(&compositor->wake_signal, compositor);
/* fall through */
default:
@ -3951,10 +3950,6 @@ weston_compositor_wake(struct weston_compositor *compositor)
* This is used for example to prevent further rendering while the
* compositor is shutting down.
*
* \note When offscreen state is entered, outputs will be powered
* back on if they were sleeping (in DPMS off mode), even though
* no rendering will be performed.
*
* Stops the idle timer.
*/
WL_EXPORT void
@ -3964,8 +3959,6 @@ weston_compositor_offscreen(struct weston_compositor *compositor)
case WESTON_COMPOSITOR_OFFSCREEN:
return;
case WESTON_COMPOSITOR_SLEEPING:
weston_compositor_dpms(compositor, WESTON_DPMS_ON);
/* fall through */
default:
compositor->state = WESTON_COMPOSITOR_OFFSCREEN;
wl_event_source_timer_update(compositor->idle_source, 0);