Commit Graph

292 Commits

Author SHA1 Message Date
Derek Foreman d8c9f8ef17 ecore_drm2: Add busy status to ecore_drm2_fb
We've been tracking this in the outbuf code, but that logic is going to
be moved into ecore_evas_drm to use the new ticking paradigm.
2016-09-08 13:55:23 -05:00
Derek Foreman 871a9cff03 ecore_drm2: Fix a condition where no outputs are enabled
If the first output we test is disconnected but has the crtc of
the primary display assigned then we'll fail to assign the crtc
to the connector it's really connected to later.

This is a quick hack as trying to sort this out properly may be
too invasive for the upcoming 1.18 and isn't really important until
1.19 supports multihead anyway.
2016-08-02 13:29:09 -05:00
Derek Foreman f975cdf513 ecore-drm2: Silence compiler warning
We probably can't actually use this variable uninitialized, but
let's init it anyway to keep gcc happy.
2016-07-27 15:23:12 -05:00
Chris Michael 4431ff01ff ecore-drm2: Fix issue of VT-Switching going blank on returns
As it turns out, when we vt-switch Back to a running Enlightenment,
it ends up processing all outputs and causes Evas to create a giant
canvas to cover all outputs. This new canvas causes a blank screen as
the pageflipping fails (due to fb being too large). As we do not yet
support output on more an one screen anyway, temporarily disable any
output which is not marked as primary.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-27 15:35:42 -04:00
Chris Michael 1bbc23b086 ecore-drm2: Add API for vt-switching
This commit adds a function we can call from inside Enlightenment in
order to fix an issue with VT-Switching. The problem was when a client
application is open, the compositor does not pass along the key-combo
for vt-switch but rather sends it to an application. This patch (along
with upcoming Enlightenment one) fixes the issue.

NB: This late API add approved by Stefan ;)

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-27 13:28:10 -04:00
Jean-Philippe Andre a9d4d7e836 drm2: Fix shadow variable
int ret is not even needed here.
2016-07-19 17:55:07 +09:00
Derek Foreman 55c59d3c40 ecore_drm2: Allow enabling outputs in drm events
Previously a drm event could create a new output or disconnect an output,
but could not re-enable an existing output.

This results in failure to properly wake from screen blanker.
2016-07-15 12:15:09 -05:00
Derek Foreman f8e07c4d7c ecore_drm2: Try to mmap gbm buffers
We're currently doing screenshots in E under wayland by copying data
out of the framebuffer, mmaping gbm buffers makes screenshots work
again when rendering with GL.
2016-07-14 16:25:05 -05:00
Chris Michael 5a482e9af4 ecore-drm2: Perform input device calibration based on output name
When a new input device gets added, device calibration may need to be
performed. In order for that to be done properly, we need to know
which output this input device is associated with. This patch makes a
function call to Elput in order to retrieve that output name and
perform the proper calibration.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-08 08:05:20 -04:00
Jean-Philippe Andre 570a398e29 ecore_drm2: Fix mouse pointer when using absolute coords
Running E wl2 in KVM led to the following issue: integrated mouse
pointer would always be stuck at (0,0).

The reason was that calibration would never happen, and it's
required* for absolute pointing devices, such as the qemu mouse
integration.

Fix: Listen to device add and calibrate based on the first
output. No idea if we could calibrate on any other output,
or how this should be done in case of multiple screens.

[*] I believe calibration might actually not be required, as
    the absolute position is already the correct one when
    received from libinput.
2016-07-07 16:15:59 +09:00
Chris Michael 7b0a1933a0 ecore-drm2: Don't leak return from _output_name_get function
Coverity reports that we end up leaking the return from
_output_name_get as the storage is never freed.

Fixes Coverity CID1357161

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-30 11:11:22 -04:00
Derek Foreman 761b89b741 ecore_drm: Don't pass uninit garbage to drm ioctls
Hasn't actually caused us any problems so far, but valgrind
whines about it, so fixing anyway.
2016-06-28 15:57:41 -05:00
Chris Michael 51b589da6a ecore-drm2: Fix redrawing screen when we vt-switch back to a session
When we vt-switch away from a running session, we need to disable
rendering to an output and re-enable when we switch back. This patch
set essentially makes vt-switching work again in Enlightenment Wayland.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-21 12:55:17 -04:00
Chris Michael 09805d2b15 ecore-drm2: Add API functions to support cacheing of context & keymap
@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 0416aa6bf3 ecore-drm2: Add API function to calibrate input devices
This adds a new API function that Ecore_Evas can call to calibrate
input devices given size of the output

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Mike Blumenkrantz da8bcbc7c6 ecore-drm2: update to latest elput 2016-05-27 11:57:53 -04:00
Mike Blumenkrantz c1253164b2 ecore-drm2: perform logind connection after finding device path in ecore_drm2_device_find 2016-05-27 11:57:53 -04:00
Chris Michael 7b5af2f0df ecore-drm2: Add API function to set left-handed mouse mode
This commit adds an API function used to set a mouse to be left-handed

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 8b3e05a7f1 ecore-drm2: Check return of elput_manager_open
We should check to make sure that opening the device has succeeded
before trying to continue

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 92553e167e ecore-drm2: Initialize elput input when device gets opened
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 6697584fb9 ecore-drm2: Fix potential invalid access to output current_mode
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael e934f546ad ecore-drm2: Add API function to get screen size range
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael f3b7672551 ecore-drm2: Add API function to return available crtcs
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 0c0dd22b5f ecore-drm2: Add API function to get possible crtc of a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 253f88b3ec ecore-drm2: Add API to return current fb used on a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael d08d7e18e3 ecore-drm2: Add API to return current resolution of a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 1eb85aab57 ecore-drm2: Add API function to return connector type of an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael bd2ab7de96 ecore-drm2: Add API function to get cloned & connected properties of an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael bdddc912d7 ecore-drm2: Add API functions to get name & model of an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael a6b018a2a8 ecore-drm2: Add API function to set the mode of an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 55f228a238 ecore-drm2: Add API function to return information about a given output mode
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael ed58056e06 ecore-drm2: Add API function to return list of output modes for a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael ad58670c56 ecore-drm2: Add API function to return physical size of a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael b634f9485a ecore-drm2: Add API functions to get/set if an output is enabled
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 758ce91719 ecore-drm2: Add API functions to get/set if an output is primary
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 13337c2583 ecore-drm2: Add API functions needed to port Ecore_Evas drm
This patch adds 2 new API functions which are required by Ecore_Evas
in order for it to function with drm. These API functions allow for
restricting pointer movement, and for setting the window id which will
be used when sending input events

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 3c332e1f88 ecore-drm2: Add drm2 event for session activation
This patch adds a new Ecore_Drm2_Event_Activate that can be raised to
inform Enlightenment that a session has been activated or suspended so
that rendering can be paused/resumed

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 296d233f64 ecore-drm2: Add API functions to get and set pointer position
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael d2b4176592 ecore-drm2: Add API functions to work with framebuffer objects
This patch adds support for creating, deleting, and manipulating
framebuffer objects via exposed API.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 4e38aabdc0 ecore-drm2: Add API functions to work with outputs
This patch adds support for creating, destroying, and otherwise
working with outputs via exposed API functions.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 9c7b657287 ecore-drm2: Add API functions to work with a drm device
This commit adds new API functions to find, open, and close a drm
device, along with API functions to retrieve clock_id and cursor size.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael a0d3b955bf ecore-drm2: Add start of Ecore_Drm2 library
This new library is going to replace the existing Ecore_Drm. This will
refactor a lot of the code, bring improvements over the existing API,
and provide additional support for missing features.

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00