Commit Graph

70 Commits

Author SHA1 Message Date
Stefan Schmidt a6178c13e9 ecore/drm: Fix typo in comment 2014-08-29 15:55:37 +02:00
Chris Michael 4fe1475b7f ecore-drm: Fix copy/paste build error
This line should not have been pasted (and it breaks build)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-28 15:55:05 -04:00
Chris Michael 41147645d7 ecore-drm: Add local function to free outputs and on any errors during
create, call it

Basically, this will fix a potential leak (and a potential case of a
false output getting added) IF during creation of outputs, something
fails.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-28 15:41:33 -04:00
Chris Michael 80c0a33267 ecore-drm: Print out failed device name during setup
If we fail to setup an input device, let's print an error With the
device name also

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-28 12:13:18 -04:00
Stefan Schmidt d8fb36e791 ecore/drm: Remove unused enums now that spartacus is gone 2014-08-28 17:56:04 +02:00
Stefan Schmidt 37d20553bd ecore_drm_dbus: Do not use the same name for global and local variables
We use conn here for a global Dbus connection variable as well as sometimes
in a local scope. Better rename the global one to avoid confusion and
potential failures when the code would fallback to the global one even if
the local scope should be used and the var was simply forgotten.
2014-08-13 14:06:18 +02: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 0001b65783 ecore-drm: Fix improper shutdown for error cases in ecore_drm_init
If an error occurs during ecore_drm_init, we need to cleanup things in
the proper order. This fixes the case where ecore_event_shutdown and
ecore_shutdown May Not have been called (in previous revision) due to
the error conditions being out of order.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-24 11:33:21 -04:00
Chris Michael ff5bac5e6e ecore-drm: Fix trapping of SIGUSR1 for VT switching signals
SIGUSR1 is used here to catch VT switching and either acquire or
release the VT. The problem is that XWayland Also sends SIGUSR1 when
it has finished initializing. In order to not get confused about where
the SIGUSR1 came from we can check the pid inside the siginfo
structure and see if it matches.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-17 14:47:02 -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 9c20a1b979 ecore-drm: Reenable setting the VT to graphics mode
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:44:14 -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
Chris Michael 87049f9124 ecore-drm: When we destroy any evdev device, also close the associated
fd.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:44:14 -04:00
Chris Michael 24ed704c8c ecore-drm: Fix ecore_drm_device calls to drop & set drm master
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:44:14 -04:00
Chris Michael be325af372 ecore-drm: Add ecore_drm_dbus file for dbus functions
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:44:14 -04:00
Chris Michael 61070f779f ecore-drm: Cleanup ecore_drm init/shutdown functions
As we don't need to spawn the suid binary anymore, we can remove all
the old code that was doing socketpair, passing messages, etc, etc.
Replace with proper ecore_drm_dbus function calls.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:44:14 -04:00
Chris Michael e711a294b2 ecore-drm: Remove eldbus header and add dbus header
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:44:14 -04:00
Chris Michael 121be16f3a ecore-drm: Cleanup ecore_drm private header
Remove support for logging to a file.
Fix ecore_drm_dbus function prototypes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:44:14 -04:00
Chris Michael 6935c4febd ecore-drm: Add necessary headers for dbus and systemd-login
This feature allows us to open input devices and receive events from
them as a normal user without the need for special input device
permissions, or the need for a slave suid binary.

NB: This will only wor with dbus & systemd support

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-15 09:43:12 -04:00
Chris Michael 5eef4351fd ecore-drm: Shutdown ecore_event on udev error.
Since we have already called ecore_event_init prior to using any udev
functions, if udev fails for some reason or another, we should also
shutdown ecore_event subsystem.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-06 12:58:57 -04:00
Chris Michael e1e8859aa0 ecore-drm: Fix formatting from a7428edeb4
Fix horrible formatting before it gets too far...
Bad Stefan, no cookie ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-01 10:59:31 -04:00
Stefan Schmidt a7428edeb4 ecore_drm: Check for currently used CRTC first before searching others
If we have a CRTC already configured save the work to search for a new
crtc and encoder combination that works with this connector. Just use what
we have.

Also always check if the CRTC is already allocated for a different connection
before using it.
2014-07-01 15:10:00 +02:00
Stefan Schmidt 5a9e47d0fd ecore_drm: Make struct Ecore_Drm_Device available
Allow the struct to be used by other parts and not only ecore_drm.
This is needed to use ecore_drm in the evas drm engine.
2014-06-30 10:13:43 +02:00
Stefan Schmidt d27996ef23 ecore_drm: Test drm device for DUMB BUFFER capability
Without this we can't do software rendering on the DRM device.
2014-06-30 10:13:43 +02:00
Stefan Schmidt 017f2d34b5 ecore_drm: Use CLOEXEC option when openning drm device 2014-06-30 10:13:42 +02:00
Stefan Schmidt 4c0f9da2b9 ecore_drm: Iterate over all available connectors not just the first
Maybe this was here for some debugging? It does not make any sense though
to loop over all connectors but break out of the loop after the first run.
2014-06-30 10:13:42 +02:00
Chris Michael 2ebafca848 ecore-drm: remove unnecessary extra variable.
We can assign the result of these calculations directly, so remove the
extra integer.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2014-06-06 11:52:58 -04:00
Chris Michael 17ac41ad06 ecore-drm: don't declare w & h integers if we don't need them.
We only use w & h if one of the dev->abs.rel_* axis values are less
than zero, so let's not declare integers that we May not use until we
need them.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2014-06-06 11:47:33 -04:00
Chris Michael e5656ce0e7 ecore-drm: Fix formatting issues from D933 patch
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2014-06-06 11:46:45 -04:00
Moritz Bitsch 78737a9696 ecore-drm: implement multitouch support
Summary: Support for type B touch devices, tested with egalax_ts compatible touchscreen.

Reviewers: devilhorns

Reviewed By: devilhorns

CC: cedric

Differential Revision: https://phab.enlightenment.org/D933
2014-06-06 11:40:33 -04:00
Moritz Bitsch 2d3ecfa20c ecore-drm: convert compose string into utf8
Summary:
	Key event string encoding was LATIN1 instead of UTF-8.
	This unifies the handling with the x backend.

Reviewers: raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D912
2014-05-29 11:33:20 +09:00
Chris Michael cd5f8d0d25 ecore-drm: Send proper keycode to ecore key event, and remove
erroneous variable.

@bugfix: Since later functions which process the ecore key event will
end up subtracting X's broken keycode values from This original
keycode value, we had better send the proper code with the offset
already added.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-05-12 13:55:02 +01:00
Jérémy Zurcher 9a79d1e864 silence a few warnings 2014-05-08 00:15:53 +02:00
Gwanglim Lee ca443ac152 Fixed a problem with e wl server that sent invalid key value to wl client.
Summary:
This problem occurred due to xkb_keysym_t value of libxkbcommon by e wl server.
e wl server should pass keycode from evdev input device on to wl client.
In order that e wl server receives valid keycode Ecore_Event_Key should have
an extended data member. This patch should be applied with server side patch.

@fix

Test Plan: run e wl server -> create wl client -> type keys

Reviewers: raster, devilhorns, zmike

CC: cedric

Differential Revision: https://phab.enlightenment.org/D712
2014-04-14 09:41:43 -04:00
Chris Michael a93cd29847 ecore-drm: Fix mouse wheel to not be inverted
@bugfix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-01 07:09:49 +01:00
Chris Michael bba98a515c ecore-drm: Add API function for getting size of an output.
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-01 07:09:49 +01:00
Carsten Haitzler 4da1081c4d drm - shut up warnings (not actual bugs) 2014-03-22 19:12:07 +09:00
Chris Michael b87cbf8fe4 ecore-drm: Fix absolute motion coordinate calculation
@bugfix: When calculating center point for absolute motion, use the
proper min_y value for calculating Y axis

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-20 07:15:23 +00:00
Stefan Schmidt 897b70437f evas/engine/drm: Avoid shadow of a function parameter
Having the same name for a parameter as well as a local var name could
cause quite some problems. Better avoid it.
2014-03-19 16:16:55 +01:00
zmike beff8db14e ecore drm now semi-supports absolute motion (touchpads!)
this is a little bit sensitive. you have been warned
2014-03-18 17:53:32 -04:00
Mike Blumenkrantz 2aabdb8f48 ecore drm evdev probably shouldn't treat my touchpad as a keyboard (BTN_TOOL_FINGER)
this is pretty insane and likely needs more competent/reliable handling
2014-03-18 16:12:58 -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 0368c4e194 ecore-drm: Fix ecore_drm_device_window_set to use an unsigned int
@fix: The majority of ecore_evas code expects that the 'window' returned
from ecore_evas_window_get be an Ecore_Window. Previously, this was
not possible as this function was using a void pointer. This change
fixes that issue.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-18 09:12:57 +00:00
Jeff Grimshaw 9ff9faae70 ecore_drm: fix Doxygen markup to prevent warnings.
Summary:
These files are missing group titles on the @defgroup line.  Added the titles so Doxygen does not
complain.

Test Plan: make doc 2> doc/doxyerr.log

CC: cedric

Differential Revision: https://phab.enlightenment.org/D612

Signed-off-by: Cedric BAIL <cedric.bail@free.fr>
2014-03-15 20:04:24 +09:00
Chris Michael 05e4ba0027 ecore-drm: Set sprite output to NULL by default
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-13 08:15:13 +00:00
Chris Michael 5e7d52dfad ecore-drm: Remove dead commented line
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-13 08:15:13 +00:00
Chris Michael 722704c32c ecore-drm: Remove debug message for key repeat events
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-13 08:15:13 +00:00
Chris Michael 2f3082df66 ecore-drm: Quiet down ecore_drm_output rendering messages
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-12 10:41:57 +00:00
Chris Michael c48fc5155a ecore-drm: Fix doxygen group for sprites
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-12 10:30:33 +00:00
Chris Michael bdf00c28b7 ecore-drm: Add API function to return the drm device name
@feature: Add new API function to return the drm device name

NB: This will be used in the ecore_evas_drm code to set the
ecore_evas->name.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-12 09:27:44 +00:00