aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-01-11 22:53:18 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-01-13 18:51:49 +0100
commit0a2f066c2d299edef7b58cc663c7bd22616b344d (patch)
tree867a693398c173ba628f8e4d84d1e683ea000d2b /src/lib/ecore_drm
parentecore_drm: check if device is already opened before open and free (diff)
downloadefl-0a2f066c2d299edef7b58cc663c7bd22616b344d.tar.gz
ecore_drm: close all devices in shutdown
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm.c16
-rw-r--r--src/lib/ecore_drm/ecore_drm_device.c10
2 files changed, 21 insertions, 5 deletions
diff --git a/src/lib/ecore_drm/ecore_drm.c b/src/lib/ecore_drm/ecore_drm.c
index 07b6a4f9cb..36eff1c7a8 100644
--- a/src/lib/ecore_drm/ecore_drm.c
+++ b/src/lib/ecore_drm/ecore_drm.c
@@ -108,15 +108,18 @@ log_err:
/**
* Shutdown the Ecore_Drm library.
- *
+ *
* @return The number of times the library has been initialized without
* being shutdown. 0 is returned if an error occurs.
- *
+ *
* @ingroup Ecore_Drm_Init_Group
*/
-EAPI int
+EAPI int
ecore_drm_shutdown(void)
{
+ Eina_List *lists;
+ Ecore_Drm_Device *dev;
+
/* _ecore_drm_init_count should not go below zero. */
if (_ecore_drm_init_count < 1)
{
@@ -127,6 +130,13 @@ ecore_drm_shutdown(void)
/* if we are still in use, decrement init count and get out */
if (--_ecore_drm_init_count != 0) return _ecore_drm_init_count;
+ /* free the list of devices */
+ lists = eina_list_clone(ecore_drm_devices_get());
+ EINA_LIST_FREE(lists, dev)
+ {
+ ecore_drm_device_free(dev);
+ }
+
_ecore_drm_inputs_shutdown();
/* close eeze */
diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c
index 1b7fc8b7b0..a91af954d6 100644
--- a/src/lib/ecore_drm/ecore_drm_device.c
+++ b/src/lib/ecore_drm/ecore_drm_device.c
@@ -277,12 +277,18 @@ ecore_drm_device_free(Ecore_Drm_Device *dev)
if (dev->dumb[i]) ecore_drm_fb_destroy(dev->dumb[i]);
dev->dumb[i] = NULL;
}
-
+ /* destroy all sprites*/
+ ecore_drm_sprites_destroy(dev);
+ /* clear inputs */
ecore_drm_inputs_destroy(dev);
-
/* free outputs */
EINA_LIST_FREE(dev->outputs, output)
ecore_drm_output_free(output);
+ /* disconnect launcher */
+ ecore_drm_launcher_disconnect(dev);
+ /* close myself */
+ ecore_drm_device_close(dev);
+
/* free crtcs */
if (dev->crtcs) free(dev->crtcs);