From 780bba76d2805bab2b738ec82d570eadd5b76497 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 27 Jul 2015 16:48:19 -0400 Subject: [PATCH] add wl_drm dpms setting --- src/modules/wl_drm/e_mod_main.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index 468f67481..697e598ec 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -607,13 +607,35 @@ _drm_randr_apply(void) } } +static void +_drm_dpms(int set) +{ + Ecore_Drm_Device *dev; + Ecore_Drm_Output *out; + E_Randr2_Screen *s; + const Eina_List *l, *ll; + + EINA_LIST_FOREACH(ecore_drm_devices_get(), l, dev) + { + EINA_LIST_FOREACH(e_randr2->screens, ll, s) + { + out = ecore_drm_device_output_name_find(dev, s->info.name); + if (!out) continue; + + if ((!s->config.configured) || s->config.enabled) + ecore_drm_output_dpms_set(out, set); + } + } +} + static E_Comp_Screen_Iface drmiface = { .available = _drm_randr_available, .init = _drm_randr_stub, .shutdown = _drm_randr_stub, .create = _drm_randr_create, - .apply = _drm_randr_apply + .apply = _drm_randr_apply, + .dpms = _drm_dpms, }; static void