Commit Graph

290 Commits

Author SHA1 Message Date
Marcel Hollerbach 8e3606698e refactor build
libraries are split into deps, external deps, and pub deps.
Evas engines are refactored to use the predefined engine deps.

this is preparation work for efl-one.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11806
2020-05-27 11:06:46 +02:00
Stefan Schmidt b135341961 lib: add more c_args handling for places we missed before
These meson files did not have the c_args handling before. Make sure we
use package_c_args here as well.

Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11860
2020-05-26 10:15:27 +02:00
Christopher Michael ca169ec715 ecore-drm2: Add missing params for doxygen 2020-05-15 10:50:37 -04:00
Christopher Michael f3c4692221 ecore-drm2: Add API function to return default depth
Rather than hard-coding depth & bpp in the evas drm engines, we can
use this function to return the default depth & bpp.

@feature
2020-05-15 10:45:56 -04:00
Christopher Michael 7c1c09f3ed ecore-drm2: Add support for using page_flip_handler2
In our current Ecore_Drm2_Context structure, we are missing support
for using page_flip_handler2. This patch adds that ability. This could
prove useful when working with ecore_drm2 as it allows
page_flip_handler callbacks to setup a handler for page_flip_handler2,
which when the callback gets received, passes back the crtc_id which
the pageflip occured on.

@feature
2020-05-01 10:29:45 -04:00
Christopher Michael d0dbc48f1b ecore-drm2: Change _output_crtc_find to accept an int
There is no reason to be passing the whole device structure here just
to get the fd
2020-04-28 12:40:53 -04:00
Christopher Michael 92faf6a0e1 ecore-drm2: Change ERR to WRN
No real need for these to be ERR because we are not going to crash if
these happen anyway.
2020-04-20 19:31:44 -04:00
Xavi Artigas e7f4bc4c2a doxygen docs: Fix all invalid @param names
There were quite a few of these...
2020-04-20 12:24:41 +02:00
Chris Michael 2288c92bc5 ecore-drm2: Fix issue of shifting 1 by more than 32bits
Based on 9ca573f40f, this patch fixes
potential undefined behaviour on 64 bit systems.

@fix
2019-11-14 12:21:40 -05:00
Christopher Michael ead88ff2ad ecore-drm2: Add API to check if vblank is supported
This patch adds a small API that we can use to check if the current
video driver supports the usage of drmWaitVBlank. This check is
required for certain drivers (like vbox) which do not support
drmWaitVBlank and thus are causing our animators in ecore_evas to
freeze. We can now use this API from within Ecore_Evas to disable
vsync'd animators and fall back to timer based ones.

@feature
2019-05-22 07:44:00 -04:00
Carsten Haitzler 96c3edd701 ecore drm2 - fix warnigns in DBG eina logs for long types
on 32bit longs are 32bit so cast appropriately to not have warnings.
2019-05-13 14:27:00 +01:00
Carsten Haitzler 703ca74d67 ecore drm2 - fix timeout in case case called from thread
so sw rendering make call ecore drm2 calls from a thread - i didnt
know that. so this makes my fix for gl hangs add hangs in sw as a
result. this fixes that. not perfect but better. do need refcoutnts on
outputs to be perfect...

also sometimes the commits fail so retry a few times...

this still leaves us wth another hang that is a separate issue.

@fix
2019-04-30 11:51:06 +01:00
Christopher Michael b462d9bc11 ecore-drm2: Fix API function parameters for background color set
Passing int as parameters here is too small for left shifting the
colors so make these parameters uint64_t
2019-04-18 09:10:49 -04:00
Christopher Michael 5fe11b2dbf ecore-drm2: Update printf format to match changed value type
Commit 8e0c4d83ed changed the atomic property value type to be
uint64_t so we need to update the printf's to reflect that
2019-04-18 09:07:17 -04:00
Christopher Michael 2aaca58de0 ecore-drm2: Add API function to set crtc background color
This patch adds a new API function we can be called in order to set
the crtc background color of a given output.

@feature
2019-04-18 07:21:39 -04:00
Christopher Michael edd78d1800 ecore-drm2: Fill in crtc background color (if supported) during atomic
commits

Small patch to add the crtc background_color property (if supported)
to any atomic tests/commits

@feature
2019-04-18 07:21:39 -04:00
Christopher Michael d09664e20e ecore-drm2: Add background_color to crtc atomic properties
This patch adds a new field to the crtc atomic state which will be
used to support crtc background_color property, and also fills in that
state during crtc atomic state fill.

@feature
2019-04-18 07:21:39 -04:00
Christopher Michael 8e0c4d83ed ecore-drm2: Make atomic property values support uint64_t
Some Atomic property values are actually uint64_t, so fix the
structure to reflect that.

@fix
2019-04-18 07:21:39 -04:00
Carsten Haitzler e2b56fe71d ecore drm2 - handle possible NULL fb when doing a flip 2019-04-10 16:49:47 +01:00
Christopher Michael d3a8f0f250 ecore-drm2: Add missing @ingroup for some doxy
Small patch to add missing @ingroup for doxygen comments, and correct
one that was in the wrong group

@fix
2019-04-01 10:31:08 -04:00
Christopher Michael e63c36056e ecore-drm2: Factor in output rotation when getting output info
Summary:
Enlightenment uses this function to get information about a given
output, so we should be accounting for output rotation when returning
width/height values.

ref T7690

@fix

Depends on D8114

Reviewers: raster, cedric, zmike

Reviewed By: cedric

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8115
2019-03-22 12:41:25 -04:00
Christopher Michael 828984393e ecore-drm2: Add API function to return output rotation
Summary:
Small patch to add an API function which can be used to return a given
output's rotation value

ref T7690

@feature

Depends on D8113

Reviewers: raster, cedric, zmike, stefan_schmidt, bu5hm4n

Reviewed By: cedric

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8114
2019-03-22 12:41:21 -04:00
Christopher Michael 9c08fe29d4 ecore-drm2: Set output rotation value
Summary:
When we call ecore_drm2_output_rotation_set we need to store that
value in the Output structure so that it can be checked later when
needed.

ref T7690

Depends on D8112

Reviewers: raster, cedric, zmike

Reviewed By: cedric

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8113
2019-03-22 12:41:17 -04:00
Christopher Michael 3315c0dd1c ecore-drm2: Disable hardware rotation for outputs
Summary:
Setting output primary plane rotation is broken at the moment, so this
commit will disable that for now until this can be investigated

ref T7690

Depends on D8111

Reviewers: raster, cedric, zmike

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8112
2019-03-22 12:41:12 -04:00
Christopher Michael 10474986cc ecore-drm2: Update plane state values based on FB
Summary:
When we are trying to set an FB onto a plane, we need to update the
plane state values to reflect any changes in the FB. Failure to do
this will result in Atomic Commit failures as the plane state values
will not match what the FB is.

ref T7690

@fix

Depends on D8110

Reviewers: raster, cedric, zmike

Reviewed By: cedric

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8111
2019-03-22 12:41:08 -04:00
Christopher Michael 9d301e4e03 ecore-drm2: Don't use AtomicAddProperty for plane rotation
Summary:
Apparently something has been changed recently in libdrm
that causes AtomicAddProperty to fail when trying to set plane rotation. Until
this can be found & fixed, let's just disable trying to rotate
hardware planes with atomic commits.

ref T7690

@fix

Reviewers: raster, cedric, zmike

Subscribers: zmike, cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8110
2019-03-22 12:41:03 -04:00
Carsten Haitzler 39f224b3a6 ecore drm2 - work around kms/drm bug seemingly when no flip event comes
so we request a flip so we can do vsync events. the flip event never
comes. i am not sure why it never comes, but we ask and nothing
arrives, and this basically halts all rendering in wayland compositor
mode as we are syncing rendering to vsync (of course). put in a
timeout of 0.05s (50ms) to try ask again if the event never comes and
log the error. this is a pretty useful workaround becauswe having your
entire display freeze is a ... bad thing.

@fix
2019-02-21 09:52:31 +00:00
Christopher Michael c62bac00cb ecore-drm2: Minor formatting fixes.
NB: No functional changes
2019-02-06 10:07:20 -05:00
Christopher Michael 3999a97579 ecore-drm2: Reduce duplicated code
No need for this line to be there twice as it is going to be called in
either case.

NB: No functional changes
2019-02-06 10:03:02 -05:00
Christopher Michael 65bf9c6e0f ecore-drm2: Remove useless if check
_ecore_drm2_use_atomic is already checked just above this, so there is
no need for this if statement
2019-02-06 10:00:51 -05:00
Michaël Bouchaud (yoz) 72f9a94188 ecore_drm2: Add API to allow settings tap-to-click on pointer device
Summary:
Add a way to configure pointer device with tap-to-click features.

@feature
Depends on D7843

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7847
2019-01-31 08:41:04 -05:00
Christopher Michael 9dedaddf2d ecore-drm2: Support multiple gpus during vblank
Summary:
When we try to calculate a drm vblank type, we should take into
account the output's pipe value which is used to determine if we are
using multiple gpus (if so, we need to use the high_crtc_mask.

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7803
2019-01-28 14:45:23 -05:00
Christopher Michael c6ebe8241e ecore-drm2: Fix formatting
NB: No functional changes
2019-01-17 10:58:43 -05:00
Christopher Michael 8079d6d38a ecore-drm2: Pass output as data to drmModePageFlip and drmModeAtomicCommit
In order to support per-output ticking, the drmModePageFlip and
drmModeAtomicCommit functions need to pass the actual Output as data
to the pageflip callback so that the pageflip callback function can
pass the proper rectangle to ecore_evas_animator_tick

Differential Revision: https://phab.enlightenment.org/D7678
2019-01-17 09:37:33 -06:00
Christopher Michael 6fcffef3ff ecore-drm2: Add support for specifying a particular drm card
Summary:
There are cases where the drm card that we wish to run on is not
always the first card (ie: card1, card2, etc). In our previous code,
we would always start searching at card0 and if found we would always
use that card. This patch allows a card to be specified in the
environment that can be searched for and used. For example, if we
specify ECORE_DRM2_CARD=card1 than that card will be searched and used
if found. This also allows wildcard searches such as
ECORE_DRM2_CARD=card[1-9]* which can be used to skip the first card
(card0).

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7530
2019-01-02 10:33:42 -05:00
Christopher Michael bd6d83bee7 ecore-drm2: Fix drmModeSetCrtc call during fb flip
drmModeSetCrtc x & y values are actually offsets into the framebuffer
memory. As such, we should not be sending output position here.

@fix
2019-01-02 10:03:06 -05:00
Christopher Michael cbac8eddb0 ecore-drm2: Minor formatting fixes
NB: No functional changes
2019-01-02 10:01:55 -05:00
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
Derek Foreman 7d54989f9b ecore_drm2: Fix failure to properly set up new plane
Summary:
When we add a plane we need to add it to the list before doing the atomic
test to ensure we're testing new state that includes the plane, and to
ensure the next screen update includes the plane we just added.

Fix T7066

Reviewers: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7066

Differential Revision: https://phab.enlightenment.org/D6432
2018-06-26 15:28:07 -04:00
Chris Michael ccf064f5ae ecore-drm2: Add API function to retrieve output user data
With the rework of Ecore_Evas drm engine, we need to get the
ecore_evas itself in the pageflip callback so we have to reassign
output->user_data to the ecore_evas which we can then use to retrieve
via this function

This is needed as the pageflip callback will pass us the output on
which the pageflip completed.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-27 09:31:33 -05:00
Chris Michael 72b192c012 ecore-drm2: Free stringshare for relative output during output_free
When we destroy a given output, we should be freeing the
eina_stringshare for relative.to

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-27 09:22:04 -05:00
Chris Michael fc4f66c6c2 ecore-drm2: Add API to get/set which output is relative to another
In order to know which output we should clone, we need a way to
store/retrieve the output which should be cloned. This patch adds a
small api we can use in randr config dialog to get/set that value.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-27 09:16:00 -05:00
Chris Michael 124c7535bb ecore-drm2: Fix typo when comparing output relative mode
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-20 09:40:14 -05:00
Chris Michael f877f6c09f ecore-drm2: Account for output relative mode when getting cloned value
As an output may have it's relative mode set to clone from the E randr
dialog, we should account for that also when returning output cloned
mode.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-20 08:53:59 -05:00
Chris Michael a78dc2d816 ecore-drm2: Add API functions to get/set output relative mode
These API functions will be used inside Enlightenment in order to
determine the proper extended screen size based on outputs relative
position.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-13 11:44:11 -05:00
Chris Michael e93f7bce30 ecore-drm2: Ensure output changed event is sent for removed outputs
If an output gets disconnected, we would still like to be notified of
that. In the _outputs_update function, we mark an output as
disconnected by setting output->connected and output->enabled to
FALSE. With this line in place (in the output_event_send function) we
would never get notified if an output was disconnected.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-06 13:01:25 -05:00
Chris Michael d1a7dd5e42 ecore_drm2: fix seat matching when checking for a device with a null seat
Summary: Check to make sure that the seat from the matching device is still null.

Test Plan: Make sure that devices are not being rejected while on seat1. This depends on another patch

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: ManMower, devilhorns, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5711
2018-01-22 11:26:13 -05:00
Derek Foreman 54fede47a9 ecore_drm2: simplify device selection code
The platform check was added for systems (like ARM) that don't generally
have PCI graphics devices.  However, now we pick a fallback device that
doesn't have a PCI constraint, so the platform check should no longer be
necessary.
2018-01-10 12:54:42 -06:00
Derek Foreman 324c917a20 ecore_drm2: Allow non-pci DRM devices to be selected
Summary: This is a tweak to c264ef264f for D5712 . chosen_dev in the loop was only being set for DRM devices attached to PCI devices. While this is useful for determining if the device is the preferred boot_vga device, There is no apparent requirement (comparing to Weston) for all DRM devices to be attached to a PCI device. (This is considering USB DisplayLink devices. I am not sure how the parent device tree is with these...)

Reviewers: devilhorns, ManMower

Reviewed By: devilhorns, ManMower

Subscribers: cedric, jpeg, #efl

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5727
2018-01-10 12:23:34 -06:00
Chris Michael 2ac8458238 ecore-drm2: return supported rotations if not using hardware
If we are Not using Atomic/Hardware support for output rotations, we
should return all available rotations as these will still work in
software mode.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-01-09 12:48:25 -05:00