Commit 9d583b3f authored by Derek Foreman's avatar Derek Foreman

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.
parent 0df72995
......@@ -1237,16 +1237,19 @@ ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, Eina_Bool enabled)
if (!output->connected) return;
if (output->enabled == enabled) return;
output->enabled = enabled;
if (output->enabled)
ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_ON);
{
output->enabled = enabled;
ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_ON);
}
else
{
if (_ecore_drm2_use_atomic)
ecore_drm2_fb_flip(NULL, output);
ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_OFF);
output->enabled = enabled;
if (output->current.fb)
_ecore_drm2_fb_buffer_release(output, &output->current);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment