summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm_device.c
diff options
context:
space:
mode:
authorBoram Park <boram1288.park@samsung.com>2015-03-17 09:30:59 -0400
committerChris Michael <cp.michael@samsung.com>2015-03-17 09:31:18 -0400
commit9baacf802d637b2573af58e3d5c4fe1f336792cf (patch)
treeee5a964f90984d0d1e0373e02831b5a85b2125f4 /src/lib/ecore_drm/ecore_drm_device.c
parent841890a7b63d5c9dc4c73e28856d43981f017ef4 (diff)
ecore-drm: add ecore_drm_devices_get to get the list of drm devices
Summary: when enlightenment is working as wayland display server, enlightenment changes KDSETMODE to KD_GRAPHICS in _ecore_drm_tty_setup(). However, when enlightenment is killed by SIGSEGV, it doesn't changes KDSETMODE to KD_TEXT because englightenment process doesn't call ecore_drm_tty_close(). To make possible enlightenment call ecore_drm_tty_close(), drm devices should be exposed. When enlightenment is killed by SIGSEGV, it will get drm devices with ecore_drm_device_get_list(), and will call ecore_drm_launcher_disconnect(), and ecore_drm_launcher_disconnect will call ecore_drm_tty_close() internally. @feature Change-Id: I1c594739ec96660a09cee77b823ace6548ee5282 Reviewers: zmike, cedric, raster, gwanglim, devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2159
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm_device.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm_device.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c
index 89c6b86485..917a02b117 100644
--- a/src/lib/ecore_drm/ecore_drm_device.c
+++ b/src/lib/ecore_drm/ecore_drm_device.c
@@ -5,6 +5,8 @@
5#include "ecore_drm_private.h" 5#include "ecore_drm_private.h"
6#include <dlfcn.h> 6#include <dlfcn.h>
7 7
8static Eina_List *drm_devices;
9
8static void 10static void
9_ecore_drm_device_cb_page_flip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int sec EINA_UNUSED, unsigned int usec EINA_UNUSED, void *data) 11_ecore_drm_device_cb_page_flip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int sec EINA_UNUSED, unsigned int usec EINA_UNUSED, void *data)
10{ 12{
@@ -191,6 +193,8 @@ cont:
191 dev->session = NULL; 193 dev->session = NULL;
192 194
193 DBG("Using Drm Device: %s", dev->drm.name); 195 DBG("Using Drm Device: %s", dev->drm.name);
196
197 drm_devices = eina_list_append(drm_devices, dev);
194 } 198 }
195 199
196out: 200out:
@@ -236,6 +240,8 @@ ecore_drm_device_free(Ecore_Drm_Device *dev)
236 /* free session */ 240 /* free session */
237 free(dev->session); 241 free(dev->session);
238 242
243 drm_devices = eina_list_remove(drm_devices, dev);
244
239 /* free structure */ 245 /* free structure */
240 free(dev); 246 free(dev);
241} 247}
@@ -334,6 +340,12 @@ ecore_drm_device_close(Ecore_Drm_Device *dev)
334 return EINA_TRUE; 340 return EINA_TRUE;
335} 341}
336 342
343EAPI Eina_List *
344ecore_drm_devices_get(void)
345{
346 return drm_devices;
347}
348
337/** 349/**
338 * Get if a given Ecore_Drm_Device is master 350 * Get if a given Ecore_Drm_Device is master
339 * 351 *