summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2
Commit message (Collapse)AuthorAgeFilesLines
* ecore_drm2: fix seat matching when checking for a device with a null seatChris Michael2018-01-221-3/+3
| | | | | | | | | | | | | | 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
* ecore_drm2: simplify device selection codeDerek Foreman2018-01-101-19/+6
| | | | | | | 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.
* ecore_drm2: Allow non-pci DRM devices to be selectedDerek Foreman2018-01-101-1/+2
| | | | | | | | | | | | | | 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: https://phab.enlightenment.org/D5727
* ecore-drm2: return supported rotations if not using hardwareChris Michael2018-01-091-6/+13
| | | | | | | | | | 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>
* ecore-drm2: Fix enabling outputsChris Michael2018-01-091-1/+1
| | | | | | | | | | | Commit 9d583b3fdbed686642dbc0d96d1e417485ca0077 broke ecore_drm2_output_enabled_set function due changing order of setting output->enabled value. This patch fixes both issues by checking the 'enabled' variable being passed in. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
* ecore_drm2: Remove pointless gotoDerek Foreman2018-01-051-4/+2
| | | | | 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.
* ecore_drm2: Don't fail if there's no boot_vga deviceDerek Foreman2018-01-051-3/+4
| | | | | | | | | | | | | 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
* efl: remove _MSC_VER (Visual Studio macro) usage in source codeVincent Torri2018-01-041-16/+8
|
* ecore-drm2: Fix issue of not being able to set output modeChris Michael2017-11-011-1/+1
| | | | | | | | | | | If we pass in screen geometry here when trying to set an output mode, we can encounter "out of memory" errors from libdrm with outputs that have a high resolution. As it turns out, we should be passing 0, 0 for the x/y values when trying to set an output mode. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
* ecore-drm2: Minor formatting fixChris Michael2017-09-191-0/+1
| | | | | | NB: No functional changes Signed-off-by: Chris Michael <cp.michael@samsung.com>
* ecore_drm2: Better handling of blank time checksDerek Foreman2017-09-051-3/+3
| | | | | | | | | | On some systems we'll successfully complete the vblank ioctl but get a reply of 0. When that happens we can't use that time for ticking as it will break all of the entire world. Fixes immediate screen blank on rpi3. @ref T5977
* ecore-drm2: Add API to allow setting pointer acceleration profileChris Michael2017-08-242-0/+19
| | | | | | | | | | | 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>
* ecore-drm2: Add API function to allow setting pointer acceleration speedChris Michael2017-08-242-0/+19
| | | | | | | | | | | 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>
* ecore_drm2: Add query for pending pageflipDerek Foreman2017-08-112-0/+22
| | | | | We've been tracking this in ecore_evas, but ecore_evas isn't the only caller, and it doesn't know about flips initiated by the evas engines.
* ecore_drm2: Remove ecore_drm2_output_resolution_get()Derek Foreman2017-08-092-28/+0
| | | | No local callers. Superseded by ecore_drm2_output_info_get()
* ecore_drm2: Remove ecore_drm2_output_crtc_size_get()Derek Foreman2017-08-092-31/+0
| | | | Replaced with ecore_drm2_output_info_get()
* ecore_drm2: Remove ecore_drm2_output_geometry_get()Derek Foreman2017-08-092-26/+0
| | | | Replaced with ecore_drm2_output_info_get()
* ecore_drm2: Add ecore_drm2_output_info_getDerek Foreman2017-08-092-0/+34
| | | | | We've got too many ways to query output information, so let's add more. (this will soon replace all of them)
* ecore_drm2: Remove useless safety checksDerek Foreman2017-08-091-3/+0
| | | | | 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.
* ecore_drm2: Merge ecore_drm2_device_free and _closeDerek Foreman2017-08-092-18/+0
| | | | | There's no reason to have them be separate, all callers must do them back to back, so let's just combine them.
* ecore_drm2: Merge ecore_drm2_device_find and ecore_drm2_device_openDerek Foreman2017-08-092-42/+18
| | | | | 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.
* ecore_drm2: Remove connector bitfieldDerek Foreman2017-08-092-41/+43
| | | | | This is unreliable - there's no reason to expect these connector ids will be low enough to sensibly store in a bit field.
* ecore_drm2: remove unused crtc bitfieldDerek Foreman2017-08-092-3/+1
| | | | | | We'll need something like this when multi-head works, but it can't be implemented this way anyway. There's no guarantee that crtc ids will be low enough to fit sensibly in a bitfield.
* ecore_drm2: Pass Ecore_Drm2_Device instead of fd to most functionsDerek Foreman2017-08-094-26/+48
| | | | | | | | | 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.
* ecore_drm2: Fix linker problemsDerek Foreman2017-08-041-2/+2
| | | | | | | | | 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?
* ecore_drm2: Stop making dumb fbs and mmapping for gbm fdsDerek Foreman2017-07-311-12/+0
| | | | | We were doing this so E could do screenshots in a hackish way, E has been fixed so this hack here no longer needs to live.
* ecore_drm2: Remove dead code in blank time getDerek Foreman2017-07-311-1/+0
| | | | | When I added the fallback block I left an if statement that could never evaluate to true. Remove it.
* ecore_drm2 - fix startup if edid blob is null.. assume all 0'sCarsten Haitzler (Rasterman)2017-07-301-0/+6
| | | | | | | this causes a crash when no edid is available. survive and dont crash. this causes e wayland to not work at all on my baytrail laptop. @fix
* ecore_drm2: Add a fallback method for vblank waitingDerek Foreman2017-07-282-0/+51
| | | | | | We can't depend on vblank waits being implemented by the driver, but we can count on page flips functioning, so add a fallback that does a page flip and waits for it.
* ecore_drm2: Allow picking a sequence number for blanktime_getDerek Foreman2017-07-282-3/+9
| | | | | | This lets us do a blocking wait for a vsync. Something we should try to do as infrequently as possible, but in some cases we need it one time at startup to catch graphics driver bugs.
* ecore_drm2: Ensure device we find can mode setDerek Foreman2017-07-211-1/+31
| | | | | | | | | | | | 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.
* ecore_drm2: Open elput manager before drm deviceDerek Foreman2017-07-211-9/+9
| | | | | We're going to need to access the device as part of the find process, so we need a manager.
* ecore_drm2: Add a query for the next vblank timeDerek Foreman2017-07-134-2/+39
| | | | | | | | | | I guess this is a feature, and we're deep in freeze, but: a) this is critical for fixing T5462 properly without any side effects. b) ecore_drm2 is all beta api c) this should only affect wayland users ref T5462
* ecore_drm2: fix scanout_on callback firing too oftenDerek Foreman2017-06-301-2/+3
| | | | | | | | We need to increase the on scanout count for a buffer only when the plane it's on makes its transition from pending to visible. Previously it was firing for every refresh which would break refcounting for any plane using surface that didn't change every frame.
* ecore_drm2: Add scanout status callbacksDerek Foreman2017-06-231-0/+8
| | | | | This generates callbacks when a fb becomes scanned out on a hardware plane or when it no longer is.
* ecore_drm2: Add callbacks for plane assign/releaseDerek Foreman2017-06-232-0/+11
| | | | E will need these to gate wayland buffer releases.
* ecore_drm2: Add Fb deleted eventDerek Foreman2017-06-232-0/+4
|
* ecore_drm2: Track number of times an fb is on scanoutDerek Foreman2017-06-232-0/+14
| | | | | | The same fb can be placed in multiple hardware planes, we need to keep track of the number of planes it's on at any time so we can send events to a compositor in a later commit.
* ecore_drm2: Track whether an Ecore_Drm2_Plane has ever been on scanoutDerek Foreman2017-06-232-1/+6
|
* ecore_drm2: Move fb from plane state struct to plane structDerek Foreman2017-06-232-5/+9
| | | | | | | | The plane state struct needs the fb id for drm updates, and the plane state can be updated even if it's pointed to by a dead plane. Dead planes need to keep their fb so we can properly handle the fb lifetime.
* ecore_drm2: Don't clear plane fb on releaseDerek Foreman2017-06-231-1/+0
| | | | | We'll need this later for post-page flip bookkeeping, and nothing will notice that it's not cleared now anyway.
* ecore_drm2: Remove obsolete per output fb callback apiDerek Foreman2017-06-233-25/+0
| | | | | It's all beta API so I can throw this away now that there are no in-tree users anymore.
* ecore_drm2: Stop using the old per output release callbacksDerek Foreman2017-06-231-3/+2
|
* ecore_drm2: Update buffer release mechanism to send new status informationDerek Foreman2017-06-231-1/+7
| | | | Begin moving internals over to the new per fb status updates.
* ecore_drm2: Add ecore_drm2_fb_status_handler_setDerek Foreman2017-06-233-0/+35
| | | | | | | | | | The old per output release handler is no longer complicated enough. In the near future we'll need to be able to tell an engine that its fb has been placed on scanout via hardware plane, or removed from a hardware plane. It's simpler to provide that information as well as release information through a single callback.
* ecore-drm2: add ecore_drm2_output_subpixel_get()Mike Blumenkrantz2017-06-162-0/+16
| | | | @feature
* ecore-drm2: Remove #ifdef HAVE_ATOMIC_DRMChris Michael2017-06-095-57/+32
| | | | | | | 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>
* ecore-drm2: Fix drm_mode variables to work with static libChris Michael2017-06-091-11/+10
| | | | | | | | | As we now use static_libs/libdrm to build ecore_drm2, we need to fix how our drm_mode variables are declared so we can use them. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
* ecore-drm2: Use static libdrm to build ecore-drm2Chris Michael2017-06-091-549/+6
| | | | | | | | | | As we will now use static_libs/libdrm to build ecore_drm2, we no longer need to include the copied code from the libdrm headers so remove all of the copied code from our source files. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
* ecore-drm2: Group API functions within their doxy groupChris Michael2017-06-091-38/+38
| | | | | | NB: No functional changes Signed-off-by: Chris Michael <cp.michael@samsung.com>