ecore_drm2: Allow enabling outputs in drm events
authorDerek Foreman <derekf@osg.samsung.com>
Fri, 15 Jul 2016 17:01:31 +0000 (12:01 -0500)
committerDerek Foreman <derekf@osg.samsung.com>
Fri, 15 Jul 2016 17:15:09 +0000 (12:15 -0500)
Previously a drm event could create a new output or disconnect an output,
but could not re-enable an existing output.

This results in failure to properly wake from screen blanker.

src/lib/ecore_drm2/ecore_drm2_outputs.c

index 42e8e1a..1eb50d6 100644 (file)
@@ -669,6 +669,24 @@ next:
                }
           }
      }
+
+   connected = (dev->alloc.conn & connected);
+   if (connected)
+     {
+        Ecore_Drm2_Output *output;
+        Eina_List *l;
+
+        EINA_LIST_FOREACH(dev->outputs, l, output)
+          {
+             if (connected & (1 << output->conn_id))
+               {
+                  connected &= ~(1 << output->conn_id);
+                  output->connected = EINA_TRUE;
+                  output->enabled = EINA_TRUE;
+                  _output_event_send(output);
+               }
+          }
+     }
 }
 
 static void