Commit Graph

71 Commits

Author SHA1 Message Date
Carsten Haitzler fe56edae3f systemd - make libsystemd use/supprot entirely runtime "dlopened"
so i've moved all systemd and elogind support to be runtime only with
dlopen (eina_module) of libsystemd.so.0 (or libelogind.so.0 for elput)
and finding of symbols manually at runtime (if the right code paths or
env vars are set), thus remvoing the need to decide at compile time if
efl needs systemd support or not as it no longer needs systemd
headers/libs at compile time and just at runtime. this simplifies
building a bit and makes efl more adaptive to the final target system
at runtime.
2020-05-18 09:36:55 +01:00
Stefan Schmidt e1c26157f4 ecore_drm: ensure we have the symbol available at the right place.
Summary:
Linking under Fedora32 toolchain got more picky. Ecore_drm_device.c
needs the symbol so make sure we have it there.

Reviewers: devilhorns, raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11772
2020-05-05 11:29:19 +01: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 ddc6962d77 ecore_drm: Add pointer warping API
Adds a new API: ecore_drm_device_pointer_warp() which warps the pointer
to the specified location.  All libinput seats with pointers are warped.
2016-02-18 15:50:16 -05:00
Derek Foreman aa584dad19 ecore_drm: Refactor ecore_drm_fb_send into two functions
We'll need to set outputs individually from the page flip handle to handle
page flip problems, so we need the per output setting logic in its own
function.
2016-02-18 15:50:15 -05:00
Derek Foreman 5d7271683b ecore_drm: Change page flipping logic so we can't tear
Summary:
Previously if we ever tried to queue up two page flips in less than a
retrace interval (which can easily happen since the evas clock isn't
based on vblank) we'd give up on ever using page flips again, and tear
on every screen update.

This fixes that by using a vblank callback for custom ticks and using
page flips whenever possible.

If a page flip fails it means a page flip raced with the vblank ticker,
so we need to queue up that frame when the current page flip completes.
This ensures that while we might drop interim frames, we will never
lose the most recent.

Now it should only be possible to tear if two ticks fire during the
wait for a page flip to complete.  This would result in rendering
taking place in the front buffer.  I don't think this can happen,
but an error is logged if it does.

Reviewers: zmike, devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3594
2016-02-18 15:50:15 -05:00
Chris Michael babd202d05 ecore-drm: Add opaque structure for Ecore_Drm_Plane
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 08:53:16 -05:00
Chris Michael cb983f747b ecore-drm: Unify and cleanup tty code
This patch brings the tty code more inline with what the logind code
Was doing. It also fixes the return value from the vt_signal handler,
and opens the tty in non-blocking mode now.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 11:38:07 -05:00
Chris Michael f836aba678 ecore-drm: Fix formatting
NB: No functional changes

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-07 09:00:32 -05:00
JengHyun Kang b3dc27345a ecore-drm: Add a new API for keymap cache
Summary:
Originally, each keyboard devices could have their own keymap.
The one keyboard's keymap could different with others.
But for this, Ecore_Drm compile a new keymap when a keyboard is connected.
But this is a burden for some people who doesn't manage keymap for each keyboard.
They want to maintain only one keymap for system.
So, I added cached context/keymap and just ref/unref for each keyboard device.
People who want to different keymap for each keyboard just do not set cached
context/keymap. Then Ecore_Drm maintain keymaps about each keyboard devices.

Test Plan:
Connect a keyboard device and watch flow of ioctl.
Originally Ecore_Drm opened xkb data and compile keymap,
but after patch, that ioctl is disppeared.

@feature

Reviewers: raster, devilhorns, ManMower

Reviewed By: devilhorns, ManMower

Subscribers: cedric, input.hacker, ohduna, jpeg

Differential Revision: https://phab.enlightenment.org/D3503
2016-01-04 08:47:58 -05:00
Sung-Jin Park 936350d37f ecore-drm: Add APIs to support key remap functionality
Summary:
This adds two new APIs to enable/set key remap functionality and
a number of keys to be remapped to the other keys. As of now there is no
api to do this therefore we need to remap using linux utility such as
'setkeycodes'. By adding/calling these apis, each Ecore_Drm_Evdev device
will have its specific key remap hash and we can apply each remapping keys
for each key/keyboard device.

Test Plan:
(1) Enable key remap and set remapping of a key on a specific keyboard device
(2) Plug in the keyboard device and check the key is being remapped or not
(3) Check the other keys are coming normally
(4) Check the the remapping key on a specific keyboard doesn't affect to any other devices

Signed-off-by: Sung-Jin Park <input.hacker@gmail.com>

Reviewers: raster, zmike, gwanglim, ManMower, devilhorns

Subscribers: JHyun, ohduna, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3463
2015-12-28 09:24:58 -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
Duna Oh 21b1a3f221 ecore-drm: Add logical pointer x, y variable in seat for reflecting multiple pointer's movement
Summary: When one pointer moves, we should update the position of other devices.

Test Plan:
(1) Two pointer devices are connected.
(2) Move the cursor to (x, y) position using "device 1".
(3) When you move the cursor using "device 2", the cursor doesn't start from (x, y) position. This causes discontinuous mouse motion.

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

Reviewed By: devilhorns, ManMower

Subscribers: cedric, Jeon, input.hacker, jpeg

Differential Revision: https://phab.enlightenment.org/D3384
2015-11-30 11:05:07 -05:00
Marcel Hollerbach 46e9eed2c4 build: replace libsystemd-{daemon, journal} with libsystemd
Summary:
since all the libs got merged into libsystemd in 209, we can just check
for libsystemd

Reviewers: cedric

Subscribers: stefan_schmidt, morlenxus

Differential Revision: https://phab.enlightenment.org/D2984
2015-08-25 10:52:47 +02:00
Chris Michael 443010b465 ecore-drm: Greatly improve drm rendering speed
Summary: This greatly improves rendering speed in evas drm engine.
Previously we would always call drmModeSetCrtc regardless if it was
needed or not. These changes greatly improve rendering speed in drm as
we now only call drmModeSetCrtc if it is needed.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:42:10 -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
Chris Michael df28c380d3 ecore-drm: Fix ecore_drm_output_edid_get to return a hex string
Summary: As we will use the edid string inside RandR code to store
unique information about an output, we should be returning this edid
in a "readable" form.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-12 12:07:31 -04:00
Chris Michael 94adf30b93 ecore-drm: Add support for a Primary Output
Summary: As 'primary' output support is not implemented in hardware,
we need to support this feature via software. For now, the first
output returned via libdrm will be marked as 'primary' until user
changes it via config

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 1ab4975491 ecore-drm: Add API function to return output modes
Summary: This adds a new API function to return a list of modes
supported on a given output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 34664306a9 ecore-drm: Add API function to return the edid of a given output
Summary: This adds a new API function to return the EDID string of a
given output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 3aee7d1b6f ecore-drm: Add connector type to output structure
Summary: This adds a connector type field to the Output structure.
This will be used in the Enlightenment Drm rendering code for RandR
config

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:45 -04:00
Chris Michael c4461ac5d8 ecore-drm: Add API function to return output connected state
Summary: This adds a new API function to check if a given output is connected or not.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:45 -04:00
Mike Blumenkrantz 054fed5336 ecore-drm: fix multiclick interval time
libinput returns timestamps in milliseconds as int, not double
2015-04-24 13:40:32 -04:00
Chris Michael 613e6ad934 ecore-drm: Don't fetch output geometry on every mouse movement
Summary: This is a better way to allow mouse movement across multiple
outputs as this does not require us to fetch output geometry on Every
mouse movement (as before).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-16 12:47:29 -04:00
Chris Michael 82ff6fc512 ecore-drm: Add private structure used during pageflip calls
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael 8f661eb5d1 ecore-drm: Move drm headers to Ecore_Drm
Summary: Since we only create one drm context in the drm_device
structure now, we need the drm headers to be included in Ecore_Drm.h

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 2b554161fe ecore-drm: Remove per-output framebuffers
Summary: No real need for each output to have its own framebuffers as
we can just create dumb buffers in the drm device structure

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 8d1e57e52e ecore-drm: Delay destroy of output if there is a pending flip
Summary: If an output has a pending page flip, we cannot destroy it
until the page flip has completed. This commit adds support to delay
destroying an output until the page flip is completed.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael f3edc3b20e ecore-drm: Improve drm output creation, mode detection, and cloning support
Summary: This refactors the output creation code to support better
mode detection, cloning of hotplugged outputs, and initial support for
setting of output gamma (API to follow)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:49 +02:00
Chris Michael 3a0577bd76 ecore-drm: Add support for DPMS on an output
Summary: This commit adds support for setting DPMS level of an output.
This adds a new API function 'ecore_drm_output_dpms_set' to set the
level.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:49 +02:00
Chris Michael e5e0b0b506 ecore-drm: Fix formatting
Summary: NO functional changes, just formatting.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:41:13 +02:00
Chris Michael c7ced198e6 ecore-drm: Move Eeze Udev Watch to Drm Device
Summary: Move the Eeze udev watch to inside the ecore_drm_device. This
allows us to only create One watch to catch all output changes. No
need for more than one watch (one per output) as was done previously

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:41:03 +02:00
Chris Michael 02e7931aeb ecore-drm: Add edid structure to Ecore_Drm_Output
Summary: This adds an edid substructure to Ecore_Drm_Output so that
when we parse out EDID information, we have a place to store it

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-04 14:52:04 -05:00
Derek Foreman 95cb1938c2 Use doubles to store libinput's mouse motion
Summary:
Using can result in motion being completely discarded.  Since we
only need integer data, we also only actually forward on an event
when the mouse moves more than a full unit.

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2062
2015-02-27 10:40:38 -05: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 c853181533 ecore-drm: Remove session parameter for internal function
The session take/release functions no longer require the name of the
session, so remove the function parameter

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-26 08:37:09 -05:00
Chris Michael feff00178e ecore-drm: Cleanup private header file
Summary: This moves the logind function prototypes to the private
header and thus removes the need for a separate logind header file.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-26 08:37:08 -05:00
Chris Michael 2eb0be048b ecore-drm: Add actual Outut to the Input device structure
Summary: This adds an actual Ecore_Drm_Output pointer to the
Ecore_Drm_Evdev structure so we can check the output size to limit
mouse corrdinates.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-13 10:35:52 -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 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
Chris Michael ff13e2d88d ecore-drm: Add output size to device structure and add internal
function for setting size

Summary: This is needed so that events for mouse, touch, etc can get
transformed into output coordinates

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00
Chris Michael 7da19b4c21 ecore-drm: Cleanup structures in private header
Summary: With the port to libinput, some fields in the input & evdev
structures are not needed anymore, so this commit cleans those up.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-09 15:11:46 -05:00
Chris Michael 6eb10cd701 ecore-drm: Include libinput header in drm private header
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-09 10:00:29 -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
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
vivek 0fb11c15a1 ecore-drm: Added initial support to check if drm device is hotplug and update outputs
Summary:
Added watch to check if drm output device is hotplug and update the
outputs accordingly.

NB: This is only partially complete. The actual update of outputs
still needs to be implemented.

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1552
2014-10-20 10:16:32 -04:00
Srivardhan Hebbar dee101b08f ecore_drm: Removed unwanted FIXME line.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1520
2014-10-06 08:41:38 -04:00
vivek af6cb4e84a ecore-drm: Added private functions to get brightness levels in backlight
Summary:
 Added private internal functions to get various brightness levels
   1) Added _ecore_drm_actual_brightness_get to get Actual brightness
   2) Added _ecore_drm_max_brightness_get to get Max brightness
   3) Added _ecore_drm_brightness_get to get Brightness
 These functions will eventually be exposed with an API for ecore-drm
to get/set the backlight level for an output.

@feature

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1482
2014-09-24 10:02:37 -04:00
Chris Michael 777e64fea5 ecore-drm: Remove udev from private header and add an Eeze_Udev_Watch
for Ecore_Drm_Input

Summary: This commit removes all references to 'udev' in the private
header, and replaces udev_monitor (in Ecore_Drm_Input structure) with
an Eeze_Udev_Watch.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael e35f3414d1 ecore-drm: Add Eeze as an internal dependency for ecore-drm
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00