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>
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.
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
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>
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
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
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
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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
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>
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>
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
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
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
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
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>
Summary:
Added initial support for backlight in drm by adding various structures
and provided api for initializing the backlight struct.
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns, stefan_schmidt
Subscribers: stefan_schmidt, cedric
Differential Revision: https://phab.enlightenment.org/D1448