summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorSeunghun Lee <shiin.lee@samsung.com>2014-12-09 09:36:42 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-09 09:36:42 -0500
commitb10ab1a86f35ab793ba6efb49224d9ecdd1b7dbd (patch)
treea29763a81807d24d4a994dfff9b7098a02e22e45 /src/modules
parent05006e64634359613e093776af19e7b9ca0caec1 (diff)
ecore-drm: added drm launcher that is allow to determine whether to launch with logind or root privilege.
Summary: - allow to launch drm backend without systemd-logind with root privilege. - allow to open drm device node via logind, not directly open it, in case exist systemd-logind. - fixes issue that couldn't switch session, because ecore-drm couldn't drop master to drm device with no permission. (allow to switch session appropriate.) Reviewers: gwanglim, devilhorns Subscribers: torori, cedric Differential Revision: https://phab.enlightenment.org/D1704
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index ce6ce8445a..776939e91f 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -474,6 +474,12 @@ _ecore_evas_drm_init(const char *device)
474 goto dev_err; 474 goto dev_err;
475 } 475 }
476 476
477 if (!ecore_drm_launcher_connect(dev))
478 {
479 ERR("Could not connect DRM launcher");
480 goto launcher_err;
481 }
482
477 /* try to open the graphics card */ 483 /* try to open the graphics card */
478 if (!ecore_drm_device_open(dev)) 484 if (!ecore_drm_device_open(dev))
479 { 485 {
@@ -481,13 +487,6 @@ _ecore_evas_drm_init(const char *device)
481 goto dev_open_err; 487 goto dev_open_err;
482 } 488 }
483 489
484 /* try to open the tty */
485 if (!ecore_drm_tty_open(dev, NULL))
486 {
487 ERR("Could not open tty: %m");
488 goto tty_open_err;
489 }
490
491 /* try to create sprites */ 490 /* try to create sprites */
492 if (!ecore_drm_sprites_create(dev)) 491 if (!ecore_drm_sprites_create(dev))
493 { 492 {
@@ -516,11 +515,11 @@ _ecore_evas_drm_init(const char *device)
516output_err: 515output_err:
517 ecore_drm_sprites_destroy(dev); 516 ecore_drm_sprites_destroy(dev);
518sprite_err: 517sprite_err:
519 ecore_drm_tty_close(dev);
520tty_open_err:
521 ecore_drm_device_close(dev); 518 ecore_drm_device_close(dev);
522dev_open_err: 519dev_open_err:
523 ecore_drm_device_free(dev); 520 ecore_drm_device_free(dev);
521 ecore_drm_launcher_disconnect(dev);
522launcher_err:
524dev_err: 523dev_err:
525 ecore_drm_shutdown(); 524 ecore_drm_shutdown();
526 return --_ecore_evas_init_count; 525 return --_ecore_evas_init_count;
@@ -534,9 +533,9 @@ _ecore_evas_drm_shutdown(void)
534 ecore_drm_sprites_destroy(dev); 533 ecore_drm_sprites_destroy(dev);
535 /* NB: No need to free outputs here. Is done in device free */ 534 /* NB: No need to free outputs here. Is done in device free */
536 ecore_drm_inputs_destroy(dev); 535 ecore_drm_inputs_destroy(dev);
537 ecore_drm_tty_close(dev);
538 ecore_drm_device_close(dev); 536 ecore_drm_device_close(dev);
539 ecore_drm_device_free(dev); 537 ecore_drm_device_free(dev);
538 ecore_drm_launcher_disconnect(dev);
540 ecore_drm_shutdown(); 539 ecore_drm_shutdown();
541 540
542 ecore_event_evas_shutdown(); 541 ecore_event_evas_shutdown();