Commit Graph

89 Commits

Author SHA1 Message Date
Christopher Michael db666e93e9 ecore_drm2: Add API to find a display at given coordinates
NB: This also makes a small modification for calibrating displays
which should now properly work based on display rotation
2024-01-17 08:14:01 -05:00
Christopher Michael c7d2f9960d ecore_drm2: Add API to return device fd 2024-01-17 07:48:21 -05:00
Christopher Michael 2b900ab8e3 ecore_drm2: Add API to warp pointer 2024-01-17 07:34:48 -05:00
Christopher Michael 868a0b42ac ecore_drm2: Add API to return pointer position 2024-01-17 07:34:48 -05:00
Christopher Michael cfb8cabb3b ecore_drm2: Add API to return device clock id 2024-01-17 07:34:48 -05:00
Christopher Michael 948a328965 ecore_drm2: Handle raising event for session active/inactive 2023-11-22 08:33:04 -05:00
Christopher Michael f6b0565b2b ecore_drm2: Add event handler to listen for when devices get added 2023-11-22 07:39:26 -05:00
Christopher Michael f2b2971de7 ecore_drm2: Add API function to set virtual terminal 2023-11-22 07:23:52 -05:00
Christopher Michael 3912427601 ecore_drm2: Add API function to calibrate input devices 2023-11-22 07:20:46 -05:00
Christopher Michael 0caf4c7730 ecore_drm2: Add API function to set pointer rotation 2023-11-22 07:16:50 -05:00
Christopher Michael 2382b4ab73 ecore_drm2: Add API function to set pointer max values 2023-11-22 07:12:58 -05:00
Christopher Michael ad1cf3fe75 ecore_drm2: Add API function to get list of crtcs 2023-11-21 06:55:59 -05:00
Christopher Michael 57caf9a1bb ecore_drm2: Move to using a current & pending state
Large patch that essentially moves all the code to use a current &
pending 'state' so that we can apply changes on vblank
2023-03-08 09:42:33 -05:00
Christopher Michael e47a812240 ecore_drm2: Add API to get screen size range 2022-12-07 07:19:38 -05:00
Christopher Michael 4504e1d5ee ecore_drm2: Remove dead comments 2022-12-03 07:57:12 -05:00
Christopher Michael 51ae3a1c9b ecore_drm2: Comment out unused variable in session callback 2022-09-20 09:35:50 -04:00
Christopher Michael 5dffb60708 ecore_drm2: Add code to fill atomic state in threads for Crtcs, Connectors,
Displays, and Planes
2022-09-20 08:42:55 -04:00
Christopher Michael aaa694e551 ecore_drm2: Add API function to get preferred depth 2022-09-20 08:42:55 -04:00
Christopher Michael 94cdf5d9f2 ecore_drm2: Add API function to retrieve cursor size 2022-09-20 08:42:55 -04:00
Christopher Michael 45ef76a41f ecore-drm2: Add code to free Atomic State on device close 2022-09-20 08:42:55 -04:00
Christopher Michael df5a498859 ecore-drm2: Add support to fill Atomic Modesetting state 2022-09-20 08:42:55 -04:00
Christopher Michael 75975addc0 ecore-drm2: Be sure to initialize & shutdown elput_input 2022-09-20 08:42:55 -04:00
Christopher Michael b69bf1a6ac ecore_drm2: Add check for Atomic Modesetting support 2022-09-20 08:42:55 -04:00
Christopher Michael ee17764a5f ecore_drm2: Add code to open & close a drm device 2022-09-20 08:42:55 -04:00
Christopher Michael 1e6df64525 ecore_drm2: Start rework of Ecore_Drm2 library
This removes all old code and starts fresh with just simple
ecore_drm2_init & ecore_drm2_shutdown functions
2022-09-20 08:42:55 -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
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
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 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
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 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
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
Derek Foreman 0d845ce3aa ecore_drm2: Remove pointless goto
This "out" label probably used to be the target of multiple gotos,
but now it's just being used to jump over a single line of code.
2018-01-05 12:28:36 -06:00
Derek Foreman c264ef264f ecore_drm2: Don't fail if there's no boot_vga device
In a multi-seat configuration it's quite likely that only one
seat will have a boot_vga device.

While we should use the boot_vga device if possible, we shouldn't
fail just because a seat's gpu isn't the boot_vga device.  Fallback
to the last viable drm device we saw.

Reported-by: n3rdopolis
ref D5712
ref T6455
2018-01-05 11:51:22 -06:00
Chris Michael 474da25165 ecore-drm2: Add API to allow setting pointer acceleration profile
Small patch to allow setting pointer acceleration profile (for
wayland) from within Enlightenment.

ref T4736

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-08-24 11:42:57 -04:00
Chris Michael b43f6c14dd ecore-drm2: Add API function to allow setting pointer acceleration speed
Small patch to add a new API function which can be called from
Enlightenment in order to allow setting pointer acceleration speed.

ref T4736

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-08-24 11:32:51 -04:00
Derek Foreman 70c1ce3be3 ecore_drm2: Remove useless safety checks
Now that the device is opened and found in one operation it's impossible
to have fd == -1, so we can stop testing for it.
2017-08-09 14:56:59 -05:00
Derek Foreman afd65a8a99 ecore_drm2: Merge ecore_drm2_device_free and _close
There's no reason to have them be separate, all callers must do them
back to back, so let's just combine them.
2017-08-09 14:56:58 -05:00
Derek Foreman d8a9b895bb ecore_drm2: Merge ecore_drm2_device_find and ecore_drm2_device_open
There's never a reason to find a device and not open it, so all callers
end up calling these two functions back to back.
2017-08-09 14:56:58 -05:00
Derek Foreman 8ff59b2c55 ecore_drm2: Pass Ecore_Drm2_Device instead of fd to most functions
Intended to simplify the upcoming commit that merges device find and
device open into a single function that returns a device.

The fd is something callers shouldn't really need to get their hands on,
right now there are still a few places where it's needed, but those will
be gone soon too.
2017-08-09 14:56:58 -05:00
Derek Foreman bc5ebd0a20 ecore_drm2: Fix linker problems
Accidentally used functions in the library directly instead of through
the sym_* dlsym looked-up variants.

Why this only caused problems in some installations may still be worth
investigating - we may be pulling in libdrm at link time from some
other library?
2017-08-04 12:13:40 -05:00
Derek Foreman 414d406b3b ecore_drm2: Ensure device we find can mode set
Some systems have dri devices that can't mode set, and if they're first in
the directory they'll get picked by our code and things fall apart later.

So, open the potential device and ensure it has basic functionality before
selecting it.

This is a little inefficient as it gets the device via elput twice before
it can be used - this will be addressed later as the changes are a little
more invasive to optimize.
2017-07-21 16:46:00 -05:00
Derek Foreman 57e826db69 ecore_drm2: Open elput manager before drm device
We're going to need to access the device as part of the find process,
so we need a manager.
2017-07-21 16:46:00 -05:00
Chris Michael bbd18510d6 ecore-drm2: Remove #ifdef HAVE_ATOMIC_DRM
As we now use static_libs/libdrm for compiling ecore-drm2, we can
remove the atomic #ifdefs as we can run-time check this now.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 14:20:05 -04:00
Chris Michael b7c7ce4ce0 ecore-drm2: Add API function to set pointer rotation
This patch adds a new API function which can be used to swap x & y
pointer axis and invert them according to rotation angle. Mouse input
events occur according to canvas coordinates so this can be used when
a canvas is rotated.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-08 10:03:36 -04:00
Derek Foreman 280c82fdd4 ecore_drm2: Don't try to disable all devices when session deactivates
We get this callback after we've lost the drm device to logind, so
deactivating stuff here will just generate a lot of ERR messages
and break our internal book-keeping.

Instead, we just turn on DPMS on session activation instead of trying
to go through the output enable path (that will bail if it's already
enabled)

This could potentially result in a display that's enabled and DPMS
off being switched back on during session activation - if that's a real
problem we can restore the previous dpms state instead...

@fix T5483
2017-06-02 15:50:09 -05:00