Commit Graph

88 Commits

Author SHA1 Message Date
Chris Michael e0b61a35c5 ecore-drm2: Add API function to return screen dpi
This patch adds a new API function which will be called from
Ecore_Evas to return the screen dpi

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-28 10:09:41 -05:00
Derek Foreman aa3479570d ecore_drm2: Add a panic mode to drm2_fb_release
Previously we'd call this only when we absolutely needed to, so it made
sense to always attempt to free a buffer, including ones on scanout or
pending flip.

However, it's useful to have a way to release the "next" only, so we can
do that before starting a render to free up the buffer that's never going
to be scanned out.
2016-11-18 09:41:52 -06:00
Chris Michael fbc58c3424 ecore-drm2: Add API function for drmHandleEvent
As we are not compile-time linking to libdrm anymore, Ecore_Evas_Drm
needs to be able to call drmHandleEvent, so add an API function to
Ecore_Drm2 that can be used there.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-15 08:42:07 -05:00
Chris Michael 45ce4c8008 ecore-drm2: Rename output_fb_release to just fb_release
As this function releases FBOs on a given output, lets just shorten
the API function name so it can stay grouped into the ecore_drm2_fb.c
file ... leaving it as ecore_drm2_output_fb_release reads like it
should have gone into the ecore_drm2_output.c file...

NB: No real function changes here, just an API rename.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-09 15:10:47 -04:00
Derek Foreman 21ad56aa32 ecore_drm2: Add ecore_drm2_output_fb_release way to force buffer release
Adds an api to attempt to release an fb from an output.  This will try
to first free any queued but not display buffers, which may harmlessly
give us a render target.

However, if that fails it will try to get buffers that have been sent to
scanout, which can lead to tearing.
2016-09-09 13:39:05 -05:00
Derek Foreman 30d14779a6 ecore_drm2: Add release handlers for buffers
Allow the engine to register a callback for buffer release.  This lets us
do appropriate buffer bookkeeping (for example, gbm locking) in the
engine.
2016-09-09 13:39:05 -05:00
Derek Foreman 0722eae960 ecore_drm2: Store gbm_bo for Fbs and add a getter function for it
This will aid with proper locking in gl_drm later
2016-09-09 13:39:05 -05:00
Derek Foreman 255b990055 ecore_drm2: Remove get/set for next fb
We no longer needs these at all.
2016-09-08 13:55:25 -05:00
Derek Foreman cc29a25c47 ecore_drm2: simplify API to get latest FB
What we've always wanted when getting the "current" FB is to get
the most recently submit one - this may be current, next, or pending.

Replace ecore_drm2_output_current_fb_get() with a function that gets the
most recent one - ecore_drm2_output_latest_fb_get().  Now callers don't
have to check the next buffer themselves first, and we don't have to
add an API for pending.
2016-09-08 13:55:25 -05:00
Derek Foreman b4cbf860b9 ecore_drm2: Add a page flip completion call
Add a function for ecore_evas_drm to call after a page flip happens so
ecore_drm2 can track busy status for fbs itself (including for the fb
that's currently being flipped to scanout)

Also, call the completion function from ecore_evas_drm
2016-09-08 13:55:24 -05:00
Derek Foreman 3d39c1e9b8 ecore_drm2: Add a function to set the pageflip callback data once
Instead of passing the user data for the page flip callback every time,
set it just once.

This will make it easier to push tick logic into ecore_evas_drm, as there
will be a transitional period where page flips are driven in two places
that don't have access to the same pointers.
2016-09-08 13:55:23 -05:00
Derek Foreman d8c9f8ef17 ecore_drm2: Add busy status to ecore_drm2_fb
We've been tracking this in the outbuf code, but that logic is going to
be moved into ecore_evas_drm to use the new ticking paradigm.
2016-09-08 13:55:23 -05:00
Chris Michael 1bbc23b086 ecore-drm2: Add API for vt-switching
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 <cp.michael@samsung.com>
2016-07-27 13:28:10 -04:00
Chris Michael 09805d2b15 ecore-drm2: Add API functions to support cacheing of context & keymap
@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 0416aa6bf3 ecore-drm2: Add API function to calibrate input devices
This adds a new API function that Ecore_Evas can call to calibrate
input devices given size of the output

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Mike Blumenkrantz da8bcbc7c6 ecore-drm2: update to latest elput 2016-05-27 11:57:53 -04:00
Chris Michael 7b5af2f0df ecore-drm2: Add API function to set left-handed mouse mode
This commit adds an API function used to set a mouse to be left-handed

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael e934f546ad ecore-drm2: Add API function to get screen size range
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael f3b7672551 ecore-drm2: Add API function to return available crtcs
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 0c0dd22b5f ecore-drm2: Add API function to get possible crtc of a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 253f88b3ec ecore-drm2: Add API to return current fb used on a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael d08d7e18e3 ecore-drm2: Add API to return current resolution of a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 1eb85aab57 ecore-drm2: Add API function to return connector type of an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael bd2ab7de96 ecore-drm2: Add API function to get cloned & connected properties of an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael bdddc912d7 ecore-drm2: Add API functions to get name & model of an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael a6b018a2a8 ecore-drm2: Add API function to set the mode of an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 55f228a238 ecore-drm2: Add API function to return information about a given output mode
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael ed58056e06 ecore-drm2: Add API function to return list of output modes for a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael ad58670c56 ecore-drm2: Add API function to return physical size of a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael b634f9485a ecore-drm2: Add API functions to get/set if an output is enabled
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 758ce91719 ecore-drm2: Add API functions to get/set if an output is primary
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 13337c2583 ecore-drm2: Add API functions needed to port Ecore_Evas drm
This patch adds 2 new API functions which are required by Ecore_Evas
in order for it to function with drm. These API functions allow for
restricting pointer movement, and for setting the window id which will
be used when sending input events

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 3c332e1f88 ecore-drm2: Add drm2 event for session activation
This patch adds a new Ecore_Drm2_Event_Activate that can be raised to
inform Enlightenment that a session has been activated or suspended so
that rendering can be paused/resumed

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 296d233f64 ecore-drm2: Add API functions to get and set pointer position
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael d2b4176592 ecore-drm2: Add API functions to work with framebuffer objects
This patch adds support for creating, deleting, and manipulating
framebuffer objects via exposed API.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 4e38aabdc0 ecore-drm2: Add API functions to work with outputs
This patch adds support for creating, destroying, and otherwise
working with outputs via exposed API functions.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael 9c7b657287 ecore-drm2: Add API functions to work with a drm device
This commit adds new API functions to find, open, and close a drm
device, along with API functions to retrieve clock_id and cursor size.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Chris Michael a0d3b955bf ecore-drm2: Add start of Ecore_Drm2 library
This new library is going to replace the existing Ecore_Drm. This will
refactor a lot of the code, bring improvements over the existing API,
and provide additional support for missing features.

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00