Commit Graph

31 Commits

Author SHA1 Message Date
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
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
Chris Michael e399e9df4a ecore-drm: Quiet down output from libinput
Summary: As libinput has matured enough now, we can reduce the noise
in outputs logs by adjusting libinput log level priority

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-23 13:27:28 -04:00
Mike Blumenkrantz e65de76e52 ecore-drm: shutup libinput log info 2015-04-28 16:12:55 -04:00
Mike Blumenkrantz 3d71a10891 ecore-drm: add safety checks to all EAPI functions 2015-04-24 12:53:01 -04: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
Chris Michael 6597d39e90 ecore-drm: Fix issue of ecore_drm not calling ReleaseDevice when an
input is destroyed

Summary: This fixes an issue where if you VT switch away from a
running Enlightenment and VT switch back, then input would no longer
be working. This was because we never called ReleaseDevice (dbus call)
when we destroyed a device, so any calls to recreate the device would
fail in libinput due to control already being taken.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-17 16:19:55 -05:00
Chris Michael 79a09007bc ecore-drm: Remove unused function
Summary: Since we now have a reference to the actual output inside the
input device, we no longer need this function to update the Input
device's view of the output size.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-13 10:35:52 -05:00
Chris Michael 0b77b7f59f ecore-drm: Free devices before we release the libinput reference
Summary: When destroying evdev devices, we make calls to
libinput_device_unref ... but we cannot Make that call if the libinput
context has been destroyed already (as happens when we free input). So
to fix, don't release the libinput context until all devices have been
released.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 14:26:52 -05:00
Chris Michael 9980082c6a ecore-drm: Also update device calibration when output size changes
Summary: When the output size gets updated, it could end up changing
the device calibration (wrt input event transformation), so we should
update the device calibration also

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:59 -05:00
Chris Michael ce473d88a1 ecore-drm: Add internal function to set the output size in the input
device structure

Summary: This is used to update all input devices as to the new output
size so that input device events can get their coordinates transformed
into output coords

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00
Chris Michael 893297e6f7 ecore-drm: Remove libinput log print callback
Summary: This was causing crashes in libinput when trying to print out
via eina_log. Disable/Remove it. Let libinput print it's own logs.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00
Chris Michael 33e3e9c8a2 ecore-drm: Port ecore_drm to use libinput
Summary: This ports the input code of ecore_drm to make use of
libinput for handling of devices, events, etc

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-09 15:13:49 -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
Seunghun Lee fe4bb3901c ecore-drm: remove unnecessary setting file's flag of O_RDWR that are ignored.
Summary: setting flag of O_RDWR by F_SETFL is no effect. it's ignored.

@fix

Reviewers: gwanglim, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1695
2014-11-26 08:59:41 -05:00
Seunghun Lee b2b81f2cd4 ecore-drm: fix error check of _device_flags_set function
Summary: the function return -1 if it's failed so checking for ! is
incorrect. We should check if the return is less than zero.

@fix

Reviewers: gwanglim, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1682
2014-11-21 09:18:36 -05:00
Srivardhan Hebbar 56f3d4cadf ecore_drm: Removed hard coded seat value.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1519
2014-10-06 08:32:01 -04:00
vivek 4d54525d47 ecore-drm: Fix _device_add function to check input
Summary:
Add condition to check if input is NULL in _device_add function

@fix

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1493
2014-09-26 09:04:53 -04:00
Chris Michael 2bc462f55b ecore-drm: Don't crash if we get no devpath from Eeze
Summary: During a device remove event, we should check that Eeze has
returned us a devpath to remove else we segfault when trying to strcmp
the device path later during actual remove.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-25 12:04:23 -04:00
Chris Michael 44e2cde623 ecore-drm: Add some more debug information if a device fails to open
Summary: This is mainly for debugging, but lets print out a bit more
information if a device fails to open.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-25 11:46:46 -04:00
Chris Michael b81cafcd7b ecore-drm: Fix adding an input device when we don't get the devpath
from Eeze.

Summary: If we fail to get a devpath from Eeze for an input device,
then we need to error out gracefully and not add a failed input device.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-25 11:36:24 -04:00
Chris Michael a0395b07c5 ecore-drm: Port ecore_drm_inputs code to use Eeze instead of udev
Summary: This changes all of our internal ecore-drm input code to use
Eeze library instead of udev directly.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael 500491069f ecore-drm: Rework input code to function with Eldbus
Summary: Eldbus runs async so we needed to rework the internal input
code to function with it. This commit changes the iternal code to
issue a device open, and then wait for Eldbus to return us a callback
from the proxy that the device open is finished. This Does add a delay
during startup (which means devices will not always be immediately
ready for use) but thus is the nature of Eldbus.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-22 15:54:37 -04:00
Chris Michael d91e607dd6 ecore-drm: Fix missing close of fd on _device_add
If we failed to create an evdev device for an input, we should also be
closing the fd before we return

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-15 15:43:14 -04:00
MinJeong Kim 0e4fd1b4d1 ecore-drm: implement function to disable ecore drm inputs on vt
switching

Summary:
When vt is released by SIGUSR1, drm_inputs have to be disabled.
For that this revision includes,
    1. Unrefer udev monitor
    2. Remove fd handler for udev monitor
    3. Release dbus device

Reviewers: stefan_schmidt, devilhorns, gwanglim

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1268
2014-08-04 08:50:40 -04:00
Chris Michael d1c583d30c ecore-drm: Reduce debug noise
As input is sorted out here (for now), we don't need to be so noisy
and printout extra debug stuff

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-17 12:56:02 -04:00
Chris Michael c043021397 ecore-drm: Cleanup ecore_drm_input code to add/remove devices
This removes calls to the ecore_drm slave binary, and makes use of our
new dbus function calls to open an input device

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:44:14 -04:00
Mike Blumenkrantz 34acd14563 ecore-drm fails with appropriate error message on failing to open input 2014-03-18 14:24:06 -04: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