Commit Graph

22 Commits

Author SHA1 Message Date
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
Chris Michael cddc7ba445 ecore-drm: Refactor logind code to use tty functions
This patch cleans up some of the logind code to make use of the
existing tty functions as they both did the same thing

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 11:20:29 -05:00
Derek Foreman 943f2df006 ecore_drm/ecore_wl2: logging: remove errant usage of %m
Summary:
printf %m stringifies and prints errno.  I've tried to remove its use
anywhere that the immediately preceding function might not set errno
or is a complicated function for which knowing errno doesn't really
give any useful information.

I've left a few of the drmMode calls because they're just wrappers
around ioctl, which legitimately sets errno.

@fix

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3572
2016-01-14 13:06:02 -05:00
Chris Michael a2c1faef70 ecore-drm: Add missing field initializers for vt_mode
Summary: clang reports missing field initializers for usage of vt_mode
structure, so add the missing initializers

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-14 09:37:20 -04:00
Chris Michael 3aaa9f2f9f ecore-drm: Fix purpose of ecore_drm_output_enable/disable functions
Summary: These API functions should be used for enable/disable of a
given output. They were previously being misused to stop/start
rendering on an output when we VT switch away so now we add an
internal function we can call to disable/enable rendering.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:42:03 -04:00
Derek Foreman f7ae5f28d4 ecore-drm: don't return EINA_FALSE as an invalid fd
Summary:
0 is a valid fd.  EINA_FALSE is 0.  EINA_FALSE is a valid fd.

@fix

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2456
2015-04-30 14:29:51 -04:00
Chris Michael 0e35734ef9 ecore-drm: Update device active state on VT switch and use new output_disable function
Summary: This marks an Ecore_Drm_Device as active or not when we VT
switch. We do this so we can skip rendering if we are not active.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Marcel Hollerbach 94299e2bfd ecore_drm: use get_vt instead of parsing the tty attribute
Summary: logind has a seperate function to get the vt number.

@fix

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2252
2015-03-30 10:41:03 -04:00
Mun, Gwan-gyeong 3c056419d7 ecore-drm: Fixed null pointer free
Summary:
Fixed null pointer free
         when sd_session_get_seat() fails, it does not allocate string.

Reviewers: zmike, cedric, raster, gwanglim, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2219
2015-03-24 09:11:07 -04:00
Chris Michael 96cbbb3416 ecore-drm: Don't recreate ecore_event handlers if we already have them
Summary: If we already have the ecore_event_handlers for logind, then
do not recreate them on logind_connect.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-17 16:19:55 -05:00
Chris Michael ab2487037f ecore-drm: Disable/Enable inputs if we release/aquire VT through logind
Summary: Due to libinput processing events directly from evdev, we
need to disable/enable input events when we release/acquire the vt.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-11 14:51:44 -05:00
Mike Blumenkrantz c0683bc2dd ecore-drm should not use sscanf when getting logind vt
this should be more robust for when something like "/dev/tty4" is passed

@fix
2015-02-10 16:24:39 -05:00
Chris Michael 559b7d7ee6 ecore-drm: Fix formatting
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-02 11:46:50 -05:00
Chris Michael 8eb78df3bb ecore-drm: Remove session parameter for session take/release functions
The functions to take or release a session no longer accept session
name as a parameter, so fix calls to those functions

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-26 08:37:09 -05:00
Chris Michael c7d557cf4e ecore-drm: Fix various issues with logind code
Summary: This fixes a few issues with the logind code such as: Getting
the VT from systemd (if available), Properly setup the VT using proper
'open' flags, adding a 'restore' function to reset the tty properly,
and handle take/release session.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-26 08:37:08 -05:00
Seunghun Lee 2db6ed0945 ecore-drm: remove duplicated code from logind and tty.
Summary: integrates the code used in common.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1796
2015-01-05 09:08:27 -05:00
Chris Michael 6972d25dc9 ecore-drm: Don't declare sprite variable unless we need it, also fix
some formatting.

Summary: This commit saves from declaring variable for
Ecore_Drm_Sprite unless we are going inactive and need to iterate
sprites. (and also fixes some formatting)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:17:37 -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 7ac4020874 ecore-drm: cleanup data when failed to setup tty.
Summary: added code to free string of tty's name when failed to setup tty.

@fix

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1763
2014-12-10 08:02:52 -05:00
Seunghun Lee 31ac7989d4 ecore-drm: Added cleanup data code as a error handling of connect logind.
Summary: need to clean also dbus, when failed open VT as a connection progress of logind.

@fix

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1756
2014-12-10 08:00:23 -05:00
Carsten Haitzler 407f7bbb0b ecoreodrm - fix build if systemd is not enabled 2014-12-10 08:54:02 +09: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