path: root/src/lib/ecore_drm2/ecore_drm2_device.c (follow)
AgeCommit message (Collapse)Author
2020-05-15ecore-drm2: Add API function to return default depthChristopher Michael
Rather than hard-coding depth & bpp in the evas drm engines, we can use this function to return the default depth & bpp. @feature
2019-11-14ecore-drm2: Fix issue of shifting 1 by more than 32bitsChris Michael
Based on 9ca573f40f1065cc717c0c5aabb787671bab852b, this patch fixes potential undefined behaviour on 64 bit systems. @fix
2019-05-22ecore-drm2: Add API to check if vblank is supportedChristopher Michael
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-13ecore drm2 - fix warnigns in DBG eina logs for long typesCarsten Haitzler (Rasterman)
on 32bit longs are 32bit so cast appropriately to not have warnings.
2019-04-18ecore-drm2: Update printf format to match changed value typeChristopher Michael
Commit 8e0c4d83edd changed the atomic property value type to be uint64_t so we need to update the printf's to reflect that
2019-04-18ecore-drm2: Add background_color to crtc atomic propertiesChristopher Michael
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-01-31ecore_drm2: Add API to allow settings tap-to-click on pointer deviceMichaƫl Bouchaud (yoz)
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:
2019-01-02ecore-drm2: Add support for specifying a particular drm cardChristopher Michael
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:
2018-01-22ecore_drm2: fix seat matching when checking for a device with a null seatChris Michael
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:
2018-01-10ecore_drm2: simplify device selection codeDerek Foreman
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-10ecore_drm2: Allow non-pci DRM devices to be selectedDerek Foreman
Summary: This is a tweak to c264ef264f0936632a1603fef45c59a50369631d 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:
2018-01-05ecore_drm2: Remove pointless gotoDerek Foreman
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-05ecore_drm2: Don't fail if there's no boot_vga deviceDerek Foreman
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
2017-08-24ecore-drm2: Add API to allow setting pointer acceleration profileChris Michael
Small patch to allow setting pointer acceleration profile (for wayland) from within Enlightenment. ref T4736 @feature Signed-off-by: Chris Michael <>
2017-08-24ecore-drm2: Add API function to allow setting pointer acceleration speedChris Michael
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 <>
2017-08-09ecore_drm2: Remove useless safety checksDerek Foreman
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-09ecore_drm2: Merge ecore_drm2_device_free and _closeDerek Foreman
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-09ecore_drm2: Merge ecore_drm2_device_find and ecore_drm2_device_openDerek Foreman
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-09ecore_drm2: Pass Ecore_Drm2_Device instead of fd to most functionsDerek Foreman
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-04ecore_drm2: Fix linker problemsDerek Foreman
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-07-21ecore_drm2: Ensure device we find can mode setDerek Foreman
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-21ecore_drm2: Open elput manager before drm deviceDerek Foreman
We're going to need to access the device as part of the find process, so we need a manager.
2017-06-09ecore-drm2: Remove #ifdef HAVE_ATOMIC_DRMChris Michael
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 <>
2017-06-08ecore-drm2: Add API function to set pointer rotationChris Michael
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 <>
2017-06-02ecore_drm2: Don't try to disable all devices when session deactivatesDerek Foreman
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-05-30ecore-drm2: Don't fill device atomic state if atomic is disabledChris Michael
If atomic support is disabled (via kernel or env var), then we do not need to fill device atomic state as it will not be used anyway. @fix Signed-off-by: Chris Michael <>
2017-05-26ecore-drm2: simplify output name checking on device changeMike Blumenkrantz
eina_streq handles null and stringshare params
2017-05-26elput: start elput_device_ and elput_seat_ namespaces, rename some functionsMike Blumenkrantz
2017-05-26elput/drm: redo xkb context/keymap settingMike Blumenkrantz
context and keymap need to be set at the same time in order to effectively update keyboard state, and active group should be accessible through api as well preserve old function ABI to ensure old binaries don't crash
2017-05-05ecore_drm2: Add an env var to disable atomic pageflipsDerek Foreman
Allows testing non-atomic paths without a reboot or a rebuild.
2017-05-05ecore-drm2: Remove newly added atomic API functionsChris Michael
As we need to do atomic commits on a per-output basis, these 2 newly added API functions can go because these functions did one atomic commit for all outputs Signed-off-by: Chris Michael <>
2017-05-05ecore-drm2: Enable filling state structures without atomic supportChris Michael
This commit enables the ability to fill our state structures even if atomic support is not enabled. This will allow us to reuse those state structures for dealing with pageflip in both the atomic & non-atomic use cases. @fix Signed-off-by: Chris Michael <>
2017-04-19ecore-drm2: Iterate plane formats properlyChris Michael
This patch addresses an issue where plane formats were not being properly copied into our Plane State structure and causing any usage of our atomic code paths to crash and burn @fix Signed-off-by: Chris Michael <>
2017-04-18ecore-drm2: Free any previous atomic requestChris Michael
If we fail the atomic request merge, cleanup any previous request and just use the new one. Signed-off-by: Chris Michael <>
2017-04-18ecore-drm2: Add API functions for atomic commit test and commitChris Michael
This patch adds 2 new API functions, one which we can use to test atomic commits before actually applying them, and another which does the actual Atomic commit. @feature Signed-off-by: Chris Michael <>
2017-04-18ecore-drm2: Move defines for CAP_CURSOR sizes to private headerChris Michael
As we may need these defines in other files, move them to the private header so there is access to them. @fix Signed-off-by: Chris Michael <>
2017-04-18ecore-drm2: Store cursor size on deviceChris Michael
As we will need these values later to determine if an FBO can go onto the cursor plane, we should store this in the device structure to avoid having to refetch them later. @fix Signed-off-by: Chris Michael <>
2017-04-18ecore-drm2: Add support for plane formatsChris Michael
Small patch to store supported formats on a given plane state. This will be used for assigning dmabuf clients to a hardware plane based on size and supported format. @feature Signed-off-by: Chris Michael <>
2017-04-18ecore-drm2: Disable driver whitelist testsChris Michael
While having the ability to test for specific driver and kernel versions is nice to ensure that Atomic is supported, it quickly can get out of hand trying to maintain this whitelist so (for now) disable it and rely on the kernel results from drmSetCap. @fix Signed-off-by: Chris Michael <>
2017-01-18ecore-drm2: Add API function to return supported rotations of an outputChris Michael
Small patch to add an API function which can be used to return the supported rotations of a given output. This is used inside the Enlightenment wl_drm module to determine if rotations is supported on an output. @feature Signed-off-by: Chris Michael <>
2017-01-18ecore-drm2: Add API to determine if a device prefers shadow buffersChris Michael
Small patch to add a new API function that can be called to determine if a given drm device prefers the use of shadow buffers. This API will be used later to provide some optimizations on various platforms. NB: Requested by Derek @feature Signed-off-by: Chris Michael <>
2016-11-15ecore-drm2: Make calls to symlink'd libdrm functionsChris Michael
Instead of linking to libdrm and calling drmMode functions, we will instead symlink the functions we need during runtime and call those symlinks. Signed-off-by: Chris Michael <>
2016-09-22ecore-drm2: Add code to free Atomic state on shutdownChris Michael
Signed-off-by: Chris Michael <>
2016-09-22ecore-drm2: Add code to fill Plane Atomic stateChris Michael
Signed-off-by: Chris Michael <>
2016-09-22ecore-drm2: Add code to fill Connector Atomic stateChris Michael
Signed-off-by: Chris Michael <>
2016-09-22ecore-drm2: Add code to fill Atomic Crtc StateChris Michael
This patch adds code to enable Atomic Modesetting support (via ioctl) and to fill in Atomic Crtc state during startup. Signed-off-by: Chris Michael <>
2016-09-22ecore-drm2: Add code to check if Atomic Modesettting is usableChris Michael
This code will detect the drm driver name and check that the kernel itself is new enough to use Atomic Modesetting. This is needed as some drivers (i915) do not handle Atomic Modesetting propertly without a new enough kernel. Signed-off-by: Chris Michael <>
2016-07-27ecore-drm2: Add API for vt-switchingChris Michael
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 <>
2016-07-08ecore-drm2: Perform input device calibration based on output nameChris Michael
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 <>
2016-07-07ecore_drm2: Fix mouse pointer when using absolute coordsJean-Philippe Andre
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.