aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/backend.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-05-13 09:04:15 -0400
committerGitHub <noreply@github.com>2017-05-13 09:04:15 -0400
commit537096807efebad8dab2b5573187dbf0d2337810 (patch)
tree8654459a95395a38a1ddf692c07a6422f97106ee /backend/drm/backend.c
parentc436e76240ab190a07afcd961ca2dd279af72968 (diff)
parent599d1bcbdc8e0e9fb2d743d70dbf8b6fa9f3bea2 (diff)
Merge pull request #3 from ascent12/master
DPMS support
Diffstat (limited to 'backend/drm/backend.c')
-rw-r--r--backend/drm/backend.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index 0da84745..f202d4d6 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -101,3 +101,11 @@ error_backend:
free(backend);
return NULL;
}
+
+void wlr_drm_backend_dpms(struct wlr_backend *backend, bool screen_on) {
+ struct wlr_backend_state *state = backend->state;
+ for (size_t i = 0; i < state->outputs->length; ++i) {
+ struct wlr_output_state *output = state->outputs->items[i];
+ wlr_drm_output_dpms(state->fd, output, screen_on);
+ }
+}