forked from enlightenment/efl
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.
This commit is contained in:
parent
0df7299526
commit
9d583b3fdb
|
@ -1237,16 +1237,19 @@ ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, Eina_Bool enabled)
|
||||||
|
|
||||||
if (!output->connected) return;
|
if (!output->connected) return;
|
||||||
if (output->enabled == enabled) return;
|
if (output->enabled == enabled) return;
|
||||||
output->enabled = enabled;
|
|
||||||
|
|
||||||
if (output->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
|
else
|
||||||
{
|
{
|
||||||
if (_ecore_drm2_use_atomic)
|
if (_ecore_drm2_use_atomic)
|
||||||
ecore_drm2_fb_flip(NULL, output);
|
ecore_drm2_fb_flip(NULL, output);
|
||||||
|
|
||||||
ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_OFF);
|
ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_OFF);
|
||||||
|
output->enabled = enabled;
|
||||||
|
|
||||||
if (output->current.fb)
|
if (output->current.fb)
|
||||||
_ecore_drm2_fb_buffer_release(output, &output->current);
|
_ecore_drm2_fb_buffer_release(output, &output->current);
|
||||||
|
|
Loading…
Reference in New Issue