Commit Graph

21 Commits

Author SHA1 Message Date
Elyes HAOUAS 1fd0435f21 Get rid of trailing whitespaces (4 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12002
2020-06-23 10:29:14 +02: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
Chris Michael e0c36d27f5 ecore-drm: Don't unset logind variable when disconnecting a device
For a case where we have more than one device open, if we set the
'logind' variable to false, then the second device would never close
properly.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 11:35:45 -05:00
Chris Michael 17fa5dee65 ecore-drm: Cleanup ecore-drm shutdown routine
This patch addresses an issue where when closing Enlightenment, the
shutdown procedure would previously end up calling the same functions
twice. These functions should be called from the ecore_evas drm
shutdown routine as the sprites, inputs, outputs, etc are all called
from the ecore_evas drm init routine.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 09:22:37 -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
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
Derek Foreman ccbcf3db0b ecore-drm: close fd when asked to close fd
Summary:
the logind device close function just lets logind revoke fd permissions
but doesn't actually close the (now useless) fd.

@fix

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2457
2015-04-30 14:31:14 -04:00
Derek Foreman c5a21aaf84 ecore-drm: append O_CLOEXEC always
Summary:
Seems libinput wasn't bothering to set this so all child processes get
their hands on input devices

@fix

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2455
2015-04-30 14:28:56 -04:00
Derek Foreman 1d887a1005 ecore_drm: close fd if flag set fails
@fix

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2454
2015-04-30 14:27:48 -04:00
Mike Blumenkrantz 3d71a10891 ecore-drm: add safety checks to all EAPI functions 2015-04-24 12:53:01 -04:00
Chris Michael 12dc91590d ecore-drm: Remove debug line from launcher
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:46:23 +02:00
Chris Michael 81a4731036 ecore-drm: Cleanup launcher code
Summary: This moves the VT switch handling code to the tty file, and
sets the proper flags on the VT when opened.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-26 08:37:08 -05:00
Chris Michael 205430ceb4 Revert "ecore-drm: Don't init tty unless we are Not using systemd"
This reverts commit 28e4901d04.

This broke vt switching in drm so revert (for now) until we get the
systemd vt and setup handlers
2015-01-19 12:55:50 -05:00
Chris Michael 28e4901d04 ecore-drm: Don't init tty unless we are Not using systemd
Summary: It turns out we don't need to handle open & setup of the tty
unless we are Not using systemd. This fixes an issue during
enlightenment restart where we are unable to reopen the tty.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-19 12:48:41 -05:00
Chris Michael 32a7eecf50 ecore-drm: Fix incorrect launcher shutdown procedure
Summary: We need to clean tty handlers and close the tty Before we can
call logind_disconnect as that function ends up shuttting down our
dbus connection.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-06 11:12:54 -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
Seunghun Lee 2e977a1e50 ecore-drm: fix passing wrong argument to open().
Summary: remove unintended argument.

@fix

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1765
2014-12-10 08:04:38 -05:00
Chris Michael a5654dbb24 ecore-drm: Fix ecore_drm_launcher_device_close to not cause segfaults
Summary: We can only call _ecore_drm_logind_device_close if we have an
actual device string. It is possible that this Could get called with
NULL, and thus cause a crash.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-09 15:12:36 -05:00
Chris Michael 29856509bf ecore-drm: Fix formatting
Summary: No functional changes, just fixing formatting

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-09 09:52:24 -05:00
Chris Michael 9f0e5ae57c ecore-drm: Fix error message typo
Summary: This just fixes a typo in the error message string

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-09 09:50:59 -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