summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_outputs.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-06-02 11:39:34 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-06-02 15:50:08 -0500
commit9d583b3fdbed686642dbc0d96d1e417485ca0077 (patch)
tree8fcb57a497ca26eeec8830104ca02572d7a06c62 /src/lib/ecore_drm2/ecore_drm2_outputs.c
parent0df7299526db2b361fbe37d554f4b590b78b5b91 (diff)
ecore_drm2: Fix dpms shutdown while disabling outputs
We need to set output->enabled to disabled *after* dpms takes place or set it to enabled *before* dpms takes place. We can't just set it at the start of the function or one of enable/disable will hit the dpms path with a disabled display.
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_outputs.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index b288679503..39fb8471cc 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -1237,16 +1237,19 @@ ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, Eina_Bool enabled)
1237 1237
1238 if (!output->connected) return; 1238 if (!output->connected) return;
1239 if (output->enabled == enabled) return; 1239 if (output->enabled == enabled) return;
1240 output->enabled = enabled;
1241 1240
1242 if (output->enabled) 1241 if (output->enabled)
1243 ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_ON); 1242 {
1243 output->enabled = enabled;
1244 ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_ON);
1245 }
1244 else 1246 else
1245 { 1247 {
1246 if (_ecore_drm2_use_atomic) 1248 if (_ecore_drm2_use_atomic)
1247 ecore_drm2_fb_flip(NULL, output); 1249 ecore_drm2_fb_flip(NULL, output);
1248 1250
1249 ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_OFF); 1251 ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_OFF);
1252 output->enabled = enabled;
1250 1253
1251 if (output->current.fb) 1254 if (output->current.fb)
1252 _ecore_drm2_fb_buffer_release(output, &output->current); 1255 _ecore_drm2_fb_buffer_release(output, &output->current);