Commit Graph

25 Commits

Author SHA1 Message Date
Cedric BAIL 0e8a20a0a6 ecore_drm: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Mike Blumenkrantz 8e077745bc ecore-drm: don't set DBG on log level if DBG not already set
...
2016-03-09 15:36:53 -05:00
Chris Michael 96085feb6d ecore-drm: Disable default DBG log level
Simple patch to disable setting ecore-drm log level to DBG by default

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 15:24:56 -05:00
Chris Michael d4307e3494 ecore-drm: Don't re-include config.h
As ecore_drm_private.h already includes config.h header, we don't need
to include it here in these files also

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 08:27:05 -05:00
Chris Michael 2dbe2732a2 ecore-drm: Update copyright notice
As portions of this code have been derived from existing code in
Weston, we should also be including their copyright/licence text to
give credit.

NB: Fixes T3286

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 08:22:22 -05:00
Marcel Hollerbach 0a2f066c2d ecore_drm: close all devices in shutdown 2016-01-13 18:51:49 +01:00
Chris Michael d50784a086 ecore-drm: Call inputs shutdown before eina_shutdown
As we end up freeing the input hash inside the
_ecore_drm_inputs_shutdown function, it should be called before we
shutdown eina

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-12 09:26:48 -05:00
Duna Oh cb23fd2af2 ecore-drm: Fix failure of setting/closing evdev->fd which causes fd leak
Summary:
When a input device is plugged in, _cb_open_restricted() is called before creating evdev.
So setting fd value on evdev was failed in _cb_open_restricted() and also closing evdev->fd was invalid.
Using a eina_hash which has 'path-fd' pairs, we can find fd value after evdev is created.

@fix

Test Plan:
(1) Multiple input devices are connected. Their evdev->fd remains zero or initial value.
(2) When one of those devices are plugged out, fd leak would happen.

Reviewers: raster, zmike, gwanglim, stefan_schmidt, devilhorns, ManMower

Subscribers: cedric, jpeg, Jeon, input.hacker

Differential Revision: https://phab.enlightenment.org/D3428
2015-12-15 10:28:39 -05:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Seunghun Lee 500e76fd53 ecore_drm: Add event of ECORE_DRM_EVENT_SEAT_ADD.
Summary: To support multi-seat, ecore_drm need to issue the event to notify compositor of seat is added.

Test Plan: N/A

Reviewers: zmike, raster, gwanglim, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2212
2015-03-24 10:45:11 -04:00
Derek Foreman 0d69422cca ecore-drm Add hooks for updating wl_output when outputs are hotplugged
Summary:
This provides callbacks to any bound wl_output listeners when a
display is hotplugged.

NOTE: Currently we don't receive hotplug events
ANOTHER NOTE: We don't yet handle display removal

Reviewers: devilhorns, zmike

Reviewed By: devilhorns, zmike

Subscribers: cedric

Maniphest Tasks: T2131

Differential Revision: https://phab.enlightenment.org/D2006
2015-02-19 14:48:25 -05:00
Chris Michael 7fbe17f5c4 ecore-drm: Fix formatting
Summary: No functional changes, just formatting fixes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:13:33 -05:00
Seunghun Lee 5720a350f9 ecore-drm: Add event to notify session activation state.
Summary:
this event is to notify session activation state to compositor.
thus compositor can change composite state by this event.

Reviewers: devilhorns

Subscribers: torori, cedric

Differential Revision: https://phab.enlightenment.org/D1767
2014-12-10 12:12:21 -05:00
Seunghun Lee b10ab1a86f 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
2014-12-09 09:36:42 -05:00
Chris Michael f4ba6fdc2d ecore-drm: Remove dead functions
Summary: These functions were never exposed via API/Header, and never
used internally. Since drm gbm stuff is handled inside the gl_drm evas
engine now, we don't need this code here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-30 09:36:48 -04:00
Srivardhan Hebbar 399c571ab6 ecoreidrm: Cleaned up unwanted code.
Summary: Cleaned up all unwanted code's in ecore_drm. This just
removes a bunch of already commented out code.

@fix

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1615
2014-10-30 09:36:21 -04:00
Chris Michael 3341692acf ecore-drm: Add error message for calling shutdown without calling init
first.

Summary: If someone calls ecore_drm_shutdown without first calling
ecore_drm_init, then the init count is wrong. Warn the caller.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-23 10:32:59 -04:00
Srivardhan Hebbar 7b1f4c09b9 ecore_drm: Making _ecore_drm_init_count not to go below zero in _ecore_drm_shutdown.
Summary:
If _ecore_drm_init_count goes below zero, then when next time ecore_drm_init is called, it won't do the initializations which it is supposed to do. So preventing this scenario by not making it go
below zero in _ecore_wl_shutdown function.

@fix

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1573
2014-10-23 09:04:55 -04:00
Chris Michael 16d8352ebe ecore-drm: Remove references to udev functions and init Eeze during
startup

Summary: This removes the variable & function calls to udev and adds
code to initialize/shutdown Eeze.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael 0001b65783 ecore-drm: Fix improper shutdown for error cases in ecore_drm_init
If an error occurs during ecore_drm_init, we need to cleanup things in
the proper order. This fixes the case where ecore_event_shutdown and
ecore_shutdown May Not have been called (in previous revision) due to
the error conditions being out of order.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-24 11:33:21 -04:00
Chris Michael 61070f779f ecore-drm: Cleanup ecore_drm init/shutdown functions
As we don't need to spawn the suid binary anymore, we can remove all
the old code that was doing socketpair, passing messages, etc, etc.
Replace with proper ecore_drm_dbus function calls.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:44:14 -04:00
Chris Michael 5eef4351fd ecore-drm: Shutdown ecore_event on udev error.
Since we have already called ecore_event_init prior to using any udev
functions, if udev fails for some reason or another, we should also
shutdown ecore_event subsystem.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-06 12:58:57 -04:00
Carsten Haitzler 4da1081c4d drm - shut up warnings (not actual bugs) 2014-03-22 19:12:07 +09:00
Chris Michael 337a18a5dd ecore-drm: Initialize ecore_event on ecore_drm_init
@bugfix: Initialize ecore_event on ecore_drm_init

We need to make sure ecore_event_init has been called so we can
process events for ecore_evas.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-10 12:40:30 +00:00
Chris Michael 3762e85c39 ecore-drm: Add Ecore_Drm code
@feature: Add Ecore_Drm library code for setting up drm card, outputs,
virtual terminals, framebuffers, and input for use with ecore_evas drm
code.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-06 10:57:26 +00:00