From a65ef8ea860e70183d0e0b44d650f0e9d2a9bf0e Mon Sep 17 00:00:00 2001 From: Markus Ongyerth Date: Mon, 26 Feb 2018 18:12:51 +0100 Subject: restore dpms state on drm resume If there is no current mode, set outputs to dpms off in drm resume. Sets current mode to null on disable to ensure this can be checked. --- backend/drm/drm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backend/drm/drm.c') diff --git a/backend/drm/drm.c b/backend/drm/drm.c index b2863414..d6388597 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -282,7 +282,7 @@ void wlr_drm_connector_start_renderer(struct wlr_drm_connector *conn) { } } -static void wlr_drm_connector_enable(struct wlr_output *output, bool enable) { +void wlr_drm_connector_enable(struct wlr_output *output, bool enable) { struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output; if (conn->state != WLR_DRM_CONN_CONNECTED) { return; @@ -296,6 +296,8 @@ static void wlr_drm_connector_enable(struct wlr_output *output, bool enable) { if (enable) { wlr_drm_connector_start_renderer(conn); + } else { + output->current_mode = NULL; } wlr_output_update_enabled(&conn->output, enable); -- cgit v1.2.3