summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm_device.c (unfollow)
AgeCommit message (Collapse)Author
2016-04-27ecore-drm: reuse any created xkb map if no cached map existsMike Blumenkrantz
this prevents creating many identical maps during init
2016-03-14ecore_drm: Disable custom tick if we can't wait for vblankDerek Foreman
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-11ecore_drm: Update device copy of framebuffer after page flip completesDerek Foreman
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-09ecore-drm: Don't re-include config.hChris Michael
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-09ecore-drm: Update copyright noticeChris Michael
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-02-18ecore_drm: Add pointer warping APIDerek Foreman
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-18ecore-drm: Only queue re-flip on the head that needs itDerek Foreman
Prevents stuttering when a head that was successfully set bounces back to a previous frame the other head failed to set.
2016-02-18ecore_drm: Change page flipping logic so we can't tearDerek Foreman
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-01-21ecore-drm: Destroy any existing eeze watch when we free the deviceChris Michael
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-21ecore-drm: Cleanup ecore-drm shutdown routineChris Michael
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-14ecore_drm/ecore_wl2: logging: remove errant usage of %mDerek Foreman
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-13ecore_drm: close all devices in shutdownMarcel Hollerbach
2016-01-13ecore_drm: check if device is already opened before open and freeMarcel Hollerbach
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-07ecore-drm: Fix formattingChris Michael
NB: No functional changes Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-04ecore-drm: Add a new API for keymap cacheJengHyun Kang
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
2015-12-29Add a new Ecore_Drm API for setting left-handed mouseJengHyun Kang
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-11-30ecore-drm: Add logical pointer x, y variable in seat for reflecting multiple ↵Duna Oh
pointer's movement Summary: When one pointer moves, we should update the position of other devices. Test Plan: (1) Two pointer devices are connected. (2) Move the cursor to (x, y) position using "device 1". (3) When you move the cursor using "device 2", the cursor doesn't start from (x, y) position. This causes discontinuous mouse motion. Reviewers: raster, zmike, gwanglim, stefan_schmidt, devilhorns, ManMower Reviewed By: devilhorns, ManMower Subscribers: cedric, Jeon, input.hacker, jpeg Differential Revision: https://phab.enlightenment.org/D3384
2015-11-05ecore-drm: Remove unused functionChris Michael
As we no longer have an fd handler to listen on the drm fd, we don't need this function anymore @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-05ecore-drm: Fix issue of hanging in read()Chris Michael
Summary: As we already call drmHandleEvent when we pageflip, we don't need to be using an fd handler to catch them. This should fix T2791 @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-30ecore-drm: Add some debug printing for driver detailsChris Michael
Summary: In efforts to debug some non-working drm issues for people, it would be helpful to know what drivers and versions they are using. This commit just adds some debug printing for that information Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13ecore-drm: Greatly improve drm rendering speedChris Michael
Summary: This greatly improves rendering speed in evas drm engine. Previously we would always call drmModeSetCrtc regardless if it was needed or not. These changes greatly improve rendering speed in drm as we now only call drmModeSetCrtc if it is needed. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07ecore-drm: Add new API function to mark an output as primaryChris Michael
Summary: This adds a new API function which we can use to mark a given Ecore_Drm_Output as being the primary output. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07ecore-drm: Add API function to find an output given a nameChris Michael
Summary: This adds a new API function to find an Ecore_Drm_Output which matches a given name. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07ecore-drm: Set drm client capabilities to support universal planesChris Michael
Summary: If we do not set client capabilities to support universal planes, then libdrm does not expose the primary or cursor planes so this adds a quick call to set DRM_CLIENT_CAP_UNIVERSAL_PLANES @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07ecore-drm: Add API function to return screen size rangeChris Michael
Summary: This adds new API function to return the min & max width & height of valid screen range for an Ecore_Drm_Device @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-04ecore-drm: Remove debug noiseChris Michael
Summary: No real function changes, just commented out some debug lines so we have less noise for release Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-24ecore-drm: add safety checks to all EAPI functionsMike Blumenkrantz
2015-04-22ecore-drm: fix ecore_drm_devices_get() to return a const valueMike Blumenkrantz
this is the internal device list, we're pretty hosed if someone decides to free it because there's no const
2015-04-20ecore-drm: Use #if 0 to comment out unused functionChris Michael
Summary: It was mentioned on the mailing list to use #if 0 instead of commenting the block. This does not change any functionality @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-20Revert "ecore-drm: Remove 'defined but not used' function"Chris Michael
This reverts commit d625167e0707cca3648e9933ef65936043372447. Reverting this to use #if 0 as suggested by q66
2015-04-20ecore-drm: Remove 'defined but not used' functionChris Michael
Summary: As we no longer require the idler to repaint outputs, comment out the function that was defined for the idler. NB: I left it commented (and not totally removed) just in case it is needed for a later (undiscovered) issue @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-16ecore-drm: Fix hotplugging of outputsChris Michael
Summary: In order to process hotplugging of outputs, we need to send the 'dev' structure as data to the callback so that we can update outputs. This fixes hotplugging of outputs when running E @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10ecore-drm: Modify device pageflip function to accept ecore_drm_fb callbacksChris Michael
Summary: This modifies the ecore_drm_device pageflip function to make use of the ecore_drm_fb callbacks passed into the ecore_drm_fb_send function @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10ecore-drm: Add API function to find an output at given coordinatesChris Michael
Summary: This commit adds an API function that can be used to find an output given an x/y coordinate pair. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10ecore-drm: Move doxygen documentation to main Ecore_Drm headerChris Michael
Summary: This moves all doxygen to the main Ecore_Drm header to match rest of efl. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10ecore-drm: Create drmEventContext Once during device openChris Michael
Summary: This changes allows us to reuse the same drmEventContext once so that when we get drm events, we are not constantly recreating the drmEventContext. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10ecore-drm: Skip repaints if we are VT switched awayChris Michael
Summary: This allows us to skip output rendering if we are VT switched away. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10ecore-drm: Update drm device & output code to remove per-output dumb buffersChris Michael
Summary: Since we now create the dumb buffers in the ecore_drm_device structure, we don't need them on a per-output basis. This commit fixes the output & device code to adjust to this. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10ecore-drm: Delay destroy of output if there is a pending flipChris Michael
Summary: If an output has a pending page flip, we cannot destroy it until the page flip has completed. This commit adds support to delay destroying an output until the page flip is completed. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09ecore-drm: Move Eeze Udev Watch to Drm DeviceChris Michael
Summary: Move the Eeze udev watch to inside the ecore_drm_device. This allows us to only create One watch to catch all output changes. No need for more than one watch (one per output) as was done previously @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-17ecore-drm: add ecore_drm_devices_get to get the list of drm devicesBoram Park
Summary: when enlightenment is working as wayland display server, enlightenment changes KDSETMODE to KD_GRAPHICS in _ecore_drm_tty_setup(). However, when enlightenment is killed by SIGSEGV, it doesn't changes KDSETMODE to KD_TEXT because englightenment process doesn't call ecore_drm_tty_close(). To make possible enlightenment call ecore_drm_tty_close(), drm devices should be exposed. When enlightenment is killed by SIGSEGV, it will get drm devices with ecore_drm_device_get_list(), and will call ecore_drm_launcher_disconnect(), and ecore_drm_launcher_disconnect will call ecore_drm_tty_close() internally. @feature Change-Id: I1c594739ec96660a09cee77b823ace6548ee5282 Reviewers: zmike, cedric, raster, gwanglim, devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2159
2015-03-04ecore-drm: Add function to return the pointer xy of Ecore_Drm_DeviceChris Michael
Summary: This adds a function (ecore_drm_device_pointer_xy_get) to we can return the mouse position inside ecore_evas_pointer_xy_get calls. This is going to be used for centering the mouse when E-Wl starts up. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-26ecore-drm: Default device->session to NULLChris Michael
Summary: This sets the default session to NULL when a device is created. Also a formatting fix @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-09ecore-drm: added drm launcher that is allow to determine whether to launch ↵Seunghun Lee
with logind or root privilege. Summary: - allow to launch drm backend without systemd-logind with root privilege. - allow to open drm device node via logind, not directly open it, in case exist systemd-logind. - fixes issue that couldn't switch session, because ecore-drm couldn't drop master to drm device with no permission. (allow to switch session appropriate.) Reviewers: gwanglim, devilhorns Subscribers: torori, cedric Differential Revision: https://phab.enlightenment.org/D1704
2014-10-30ecoreidrm: Cleaned up unwanted code.Srivardhan Hebbar
Summary: Cleaned up all unwanted code's in ecore_drm. This just removes a bunch of already commented out code. @fix Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1615
2014-10-23ecore-drm: Added documentation for various APIs in ecore_drm_device modulevivek
Summary: Added documentation for ecore_drm_device_fd_get, ecore_drm_device_window_set and ecore_drm_device_name_get APIs in ecore_drm_device module. @fix Signed-off-by: vivek <vivek.ellur@samsung.com> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1568
2014-10-08ecore-drm: Fix drm cards on ARM platform not having boot_vga parameterChris Michael
Summary: On some ARM platforms, the drivers do not list boot_vga as an attribute, so we cannot do checks for that. This patch fixes finding drm cards on those platforms by skipping the boot_vga check if we had to use "platform" to find it. Thanks to shiin for the report :) @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-08ecore-drm: Fix failure of finding drm device on ARM platforms.Chris Michael
Summary: On some ARM platforms we were failing to find the drm device card. This was due to those ARM platforms using SUBSYSTEM="platform" as a udev attribute instead of "pci". This fixes that issue so that those devices are found again. Thanks to shiin for the report :) @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-24ecore-drm: Remove need to use an extra variable for storing device.Chris Michael
Summary: This commit just modifies the internal code to remove the need for an extra variable. There really is no need to store the device twice. We already have it in the list of returned devices. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23ecore-drm: Fix ecore_drm_device_find function to use EezeChris Michael
Summary: This converts the internal code of ecore_drm_device_find function to use Eeze function calls instead of udev in order to locate the drm card. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>