Commit Graph

404 Commits

Author SHA1 Message Date
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Vincent Torri 4ae6eeb2cf efl: remove _MSC_VER (Visual Studio macro) usage in source code 2018-01-04 12:59:47 -08:00
Carsten Haitzler f40c91941d libinput check - move up to requiring 1.6 as a minimum for libinput 2017-11-12 21:47:02 +09:00
Cedric BAIL 0e8a20a0a6 ecore_drm: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Myoungwoon Roy, Kim 8c19d9251d docs: Fix typos and some wrong expressions
Covers: Ecore_Drm, Ecore_Evas, Ecore_File, Ecore_IMF, and
Ecore_IMF_Evas API reference doxygen.

Summary: I had fixed some typos and wrong expressions, such
as capital letters, singular Etc. in Ecore_Drm, Ecore_Evas,
Ecore_File, Ecore_IMF, and Ecore_IMF_Evas API reference doxygen.

Test Plan: Doxygen Revision

Reviewers: stefan, cedric, raster, jpeg, Jaehyun_Cho

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4680
2017-02-27 19:37:43 +09:00
Chris Michael af22796356 ecore-drm: Deprecate Ecore_Drm library
Small patch to deprecate Ecore_Drm. This patch also adds a configure
option to enable ecore_drm for older code. This option is disabled by
default, so must be explicitly specified during build.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-31 10:05:28 -04:00
Derek Foreman 1a339c9e59 ecore_drm: Handle wheel scrolling separately from finger scrolling
Wheels are discrete and scroll in clicks, fingers are continuous and scroll
in fractional pixels.

This change causes wheel based scrolling to be returned in "clicks"
instead of "degrees" - allowing us to roll a single menu item with a click.

It also will allow us to reduce the speed of two finger scrolling without
messing up the speed of wheel scrolling.
2016-05-13 16:36:42 -05:00
Chris Michael d40cd1dab2 ecore-drm: Fix potential segfault when setting output mode
If a NULL mode is passed into ecore_drm_output_mode_set, then we try
to disable the given output. If disabling the output fails, we were
trying to print an ERR message which tried to access the NULL mode.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-10 11:28:26 -04:00
Derek Foreman 1460321b12 ecore_drm: Fix off by 1000 in output rate calculation
This results in wayland wl_output modes having their refresh rates
1000x too high, which has the magical effect of making some native
Qt apps fail with a GTK error when Xwayland crashes on 32-bit systems.

@fix
Fixes T3587
2016-05-06 15:43:47 -05:00
Mike Blumenkrantz 03a8ab1f51 ecore-drm: reuse any created xkb map if no cached map exists
this prevents creating many identical maps during init
2016-04-27 12:52:08 -04:00
Chris Michael 7d450fba64 ecore-drm: Add missing initializer for fb2 command
drm_mode_fb_cmd2 has fields for a modifier to handle tiling,
compression, etc (per plane). Even tho we do not use these, we should
at least initialize them to zero else we end up with uninitialized
bytes in the cmd structure.

==11706== Syscall param ioctl(generic) points to uninitialised byte(s)
==11706==    at 0x57E05D9: ioctl (in /usr/lib/libc-2.20.so)
==11706==    by 0x4D30FA3: drmIoctl (in /usr/lib/libdrm.so.2.4.0)
==11706==    by 0x4CDF66B: _ecore_drm_fb_create2 (ecore_drm_fb.c:63)

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-26 11:00:40 -04:00
Chris Michael 4e64fb046e ecore-drm: Fix typo in doxygen
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-21 08:55:01 -04:00
Chris Michael acc1a5dcc0 ecore-drm: Don't leak object properties
When fetching possible planes for an output, we end up leaking object
properties here as these were never freed.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-13 12:55:59 -04:00
Mike Blumenkrantz c854b91c5a ecore-drm: do not attempt to destroy sprite outputs which have never repainted
silences a surprisingly large number of errors on shutdown

@fix
2016-04-01 15:55:41 -04:00
Derek Foreman b5425dc51a ecore_drm: Disable custom tick if we can't wait for vblank
If we fail to schedule a VBlank event, then we should disable custom
ticks and fallback to timer-based animators. This patch fixes some
issues with Intel Atom based setups where rendering would fail when
using custom animators.

@fix
2016-03-14 15:00:11 -04:00
Derek Foreman ee0508a2bb ecore_drm: Update device copy of framebuffer after page flip completes
The device struct is API, so its copy of the fb pointer needs to be
kept in sync with the output struct's.  We do this when the flip completes
to try to prevent access to an fb that's about to flip.

This fixes Enlightenment screenshots.

@fix
2016-03-11 11:53:46 -05:00
Mike Blumenkrantz 8e077745bc ecore-drm: don't set DBG on log level if DBG not already set
...
2016-03-09 15:36:53 -05:00
Chris Michael 96085feb6d ecore-drm: Disable default DBG log level
Simple patch to disable setting ecore-drm log level to DBG by default

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 15:24:56 -05:00
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
Chris Michael f87dceda85 ecore-drm: Don't reset event modifiers on touch motion
When we are sending an event for touch motion, we should be specifing
the modifers in the event structure (not setting them to zero).

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-22 12:13:06 -05:00
Derek Foreman fbf8ee656c ecore_drm: Check list presence by NULL test instead of counting
a count of < 1 will just be a NULL pointer, and a count of > 0 will
be non NULL, so we can simplify these conditionals.
2016-02-18 15:50:16 -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 937ca952ed ecore-drm: Only queue re-flip on the head that needs it
Prevents stuttering when a head that was successfully set bounces
back to a previous frame the other head failed to set.
2016-02-18 15:50:15 -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
Duna Oh 5ae5aade0a ecore-drm: Make ecore_drm_output_rotation_set fail properly
When trying to set a rotation on a given output, we would previously
always be returning EINA_TRUE. We should be returning EINA_FALSE when
the rotation_set fails.

@fix

Summary: ecore_drm_output_rotation_set should be returning EINA_FALSE when the output doesn't have a plane of requested type.

Test Plan:
1. call ecore_drm_output_rotation_set() with ECORE_DRM_PLANE_TYPE_CURSOR
2. If output doesn't have a plane of ECORE_DRM_PLANE_TYPE_CURSOR, the for statement does nothing. But return value is TRUE;

Reviewers: raster, stefan_schmidt, gwanglim, devilhorns, zmike

Subscribers: input.hacker, cedric, JHyun, ManMower, jpeg

Differential Revision: https://phab.enlightenment.org/D3678
2016-02-15 08:46:08 -05:00
Chris Michael 497a287f07 This should not have been pushed. Revert
Revert "ecore-drm: Add API functions for rotation support"

This reverts commit b8ceaf0d40.
2016-02-04 09:44:45 -05:00
Chris Michael 1486c7053a This should not have been pushed. Unsure what happened here, but
revert this

Revert "ecore-drm: Add opaque type for Plane support"

This reverts commit 94082f54e8.
2016-02-04 09:44:17 -05:00
Chris Michael b8ceaf0d40 ecore-drm: Add API functions for rotation support
This adds 2 new API functions for getting supported rotations of an
output, and for setting rotation on an output

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 09:36:33 -05:00
Chris Michael 94082f54e8 ecore-drm: Add opaque type for Plane support
This adds an opaque structure to represent a hardware plane for use in
rotation, setting cursor/overlay/primary plane content, etc

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>

ecore-drm: Add API functions for rotation support

This adds 2 new API functions for getting supported rotations from an
output, and for setting rotation on an output.

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 09:35:51 -05:00
Chris Michael 3ed4b3e6fd ecore-drm: Add internal function to create planes for an output
This patch adds an internal function that we use during output
creation in order to create the planes necessary and get the supported
rotation values for an output

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 09:27:40 -05:00
Chris Michael 26eefa970f ecore-drm: Add API function to set rotation on an output
This patch adds an API function to allow the Screen Setup dialog in
Enlightenment to support setting rotations on an output when running
under drm

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 09:27:40 -05:00
Chris Michael bb774a538e ecore-drm: Add API function to get supported rotations from an output
This patch adds an API function so that we can get the supported
rotations from an output. This is needed so that the Screen Setup
dialog in Enlightenment can list the rotations supported for the user
to choose from while running using drm

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 09:27:38 -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 e0c36d27f5 ecore-drm: Don't unset logind variable when disconnecting a device
For a case where we have more than one device open, if we set the
'logind' variable to false, then the second device would never close
properly.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 11:35:45 -05:00
Chris Michael 4ba349be4f ecore-drm: Destroy any existing eeze watch when we free the device
If a user frees a device without closing it we could end up with a
dangling eeze watch. This small patch just makes sure to delete the
watch if it exists

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 11:32:53 -05:00
Chris Michael cddc7ba445 ecore-drm: Refactor logind code to use tty functions
This patch cleans up some of the logind code to make use of the
existing tty functions as they both did the same thing

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 11:20:29 -05:00
Chris Michael 17fa5dee65 ecore-drm: Cleanup ecore-drm shutdown routine
This patch addresses an issue where when closing Enlightenment, the
shutdown procedure would previously end up calling the same functions
twice. These functions should be called from the ecore_evas drm
shutdown routine as the sprites, inputs, outputs, etc are all called
from the ecore_evas drm init routine.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 09:22:37 -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
Marcel Hollerbach 0a2f066c2d ecore_drm: close all devices in shutdown 2016-01-13 18:51:49 +01:00
Marcel Hollerbach 093846aaea ecore_drm: check if device is already opened before open and free
check if fd is -1 before opening a device, so a device cannot be opened
twice.

Also check if fd is != -1 before closing it.
2016-01-13 18:51:49 +01:00
Stefan Schmidt d1609c2afe ecore_drm: make sure we include math.h and link against libm for floor()
When we introduced the usage of floor() in ecore_drm_evdev.c we forgot to
include math.h for it as well as linking against libm. This caused linking
failures on some systems while it still worked on others. Better fix it for
good.

Original patch by aerodynamik.

ref T2953
2016-01-13 17:06:39 +01:00
Chris Michael d50784a086 ecore-drm: Call inputs shutdown before eina_shutdown
As we end up freeing the input hash inside the
_ecore_drm_inputs_shutdown function, it should be called before we
shutdown eina

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-12 09:26:48 -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
Chris Michael 0d6383d69f ecore-drm: Add missing variable 'dev'
Seems this should have been declared in the previously pushed patch,
but was missing.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-29 09:12:50 -05:00
JengHyun Kang eb9b894167 Add a new Ecore_Drm API for setting left-handed mouse
Summary:
Add a new Ecore_Drm API named ecore_drm_device_left_handed_set().
Libinput support various input options. Left handed mode is one of options.
Right-handed people and left-handed people use a mouse
using different button mapping.
So if a left handed option is enabled, libinput change right mouse button and
left mouse button.
So support this option, I added this api using libinput's left handed option.

@feature

Test Plan:
After set left handed mode, left mouse button generate button numbered 3,
and right mouse button generate button numbered 1.

Reviewers: raster, ManMower, devilhorns

Subscribers: ohduna, cedric, jpeg, input.hacker

Differential Revision: https://phab.enlightenment.org/D3431
2015-12-29 09:04:16 -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