Commit Graph

88 Commits

Author SHA1 Message Date
Christopher Michael ca169ec715 ecore-drm2: Add missing params for doxygen 2020-05-15 10:50:37 -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
Christopher Michael 7c1c09f3ed ecore-drm2: Add support for using page_flip_handler2
In our current Ecore_Drm2_Context structure, we are missing support
for using page_flip_handler2. This patch adds that ability. This could
prove useful when working with ecore_drm2 as it allows
page_flip_handler callbacks to setup a handler for page_flip_handler2,
which when the callback gets received, passes back the crtc_id which
the pageflip occured on.

@feature
2020-05-01 10:29:45 -04:00
Xavi Artigas e7f4bc4c2a doxygen docs: Fix all invalid @param names
There were quite a few of these...
2020-04-20 12:24:41 +02: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
Christopher Michael b462d9bc11 ecore-drm2: Fix API function parameters for background color set
Passing int as parameters here is too small for left shifting the
colors so make these parameters uint64_t
2019-04-18 09:10:49 -04:00
Christopher Michael 2aaca58de0 ecore-drm2: Add API function to set crtc background color
This patch adds a new API function we can be called in order to set
the crtc background color of a given output.

@feature
2019-04-18 07:21:39 -04:00
Christopher Michael d3a8f0f250 ecore-drm2: Add missing @ingroup for some doxy
Small patch to add missing @ingroup for doxygen comments, and correct
one that was in the wrong group

@fix
2019-04-01 10:31:08 -04:00
Christopher Michael 828984393e ecore-drm2: Add API function to return output rotation
Summary:
Small patch to add an API function which can be used to return a given
output's rotation value

ref T7690

@feature

Depends on D8113

Reviewers: raster, cedric, zmike, stefan_schmidt, bu5hm4n

Reviewed By: cedric

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8114
2019-03-22 12:41:21 -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
Chris Michael ccf064f5ae ecore-drm2: Add API function to retrieve output user data
With the rework of Ecore_Evas drm engine, we need to get the
ecore_evas itself in the pageflip callback so we have to reassign
output->user_data to the ecore_evas which we can then use to retrieve
via this function

This is needed as the pageflip callback will pass us the output on
which the pageflip completed.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-27 09:31:33 -05:00
Chris Michael fc4f66c6c2 ecore-drm2: Add API to get/set which output is relative to another
In order to know which output we should clone, we need a way to
store/retrieve the output which should be cloned. This patch adds a
small api we can use in randr config dialog to get/set that value.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-27 09:16:00 -05:00
Chris Michael a78dc2d816 ecore-drm2: Add API functions to get/set output relative mode
These API functions will be used inside Enlightenment in order to
determine the proper extended screen size based on outputs relative
position.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-13 11:44:11 -05:00
Vincent Torri 4ae6eeb2cf efl: remove _MSC_VER (Visual Studio macro) usage in source code 2018-01-04 12:59:47 -08: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 eec565cc0f ecore_drm2: Add query for pending pageflip
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.
2017-08-11 17:11:12 -05:00
Derek Foreman 9fd0ed736d ecore_drm2: Remove ecore_drm2_output_resolution_get()
No local callers.  Superseded by ecore_drm2_output_info_get()
2017-08-09 14:56:59 -05:00
Derek Foreman 5ecfe6a8b5 ecore_drm2: Remove ecore_drm2_output_crtc_size_get()
Replaced with ecore_drm2_output_info_get()
2017-08-09 14:56:59 -05:00
Derek Foreman 846db0e0e7 ecore_drm2: Remove ecore_drm2_output_geometry_get()
Replaced with ecore_drm2_output_info_get()
2017-08-09 14:56:59 -05:00
Derek Foreman 1b853dcfad ecore_drm2: Add ecore_drm2_output_info_get
We've got too many ways to query output information, so let's add more.
(this will soon replace all of them)
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 8e500c6835 ecore_drm2: Allow picking a sequence number for blanktime_get
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.
2017-07-28 10:41:11 -05:00
Derek Foreman 20def4da21 ecore_drm2: Add a query for the next vblank time
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
2017-07-13 18:07:42 -05:00
Derek Foreman 5f2d4e75ab ecore_drm2: Add callbacks for plane assign/release
E will need these to gate wayland buffer releases.
2017-06-23 08:15:41 -05:00
Derek Foreman c67da0c869 ecore_drm2: Add Fb deleted event 2017-06-23 08:15:41 -05:00
Derek Foreman 74290490ad ecore_drm2: Remove obsolete per output fb callback api
It's all beta API so I can throw this away now that there are no in-tree
users anymore.
2017-06-23 08:15:40 -05:00
Derek Foreman a3eed7865a ecore_drm2: Add ecore_drm2_fb_status_handler_set
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.
2017-06-23 08:15:40 -05:00
Mike Blumenkrantz a3d0af0069 ecore-drm2: add ecore_drm2_output_subpixel_get()
@feature
2017-06-16 12:23:08 -04:00
Chris Michael 05f770a1ab ecore-drm2: Group API functions within their doxy group
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:29:25 -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
Mike Blumenkrantz e8fe0bcc47 elput/drm: redo xkb context/keymap setting
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-26 16:27:42 -04:00
Derek Foreman edcbff59b7 ecore_drm2: refcount fbs
Removes the previous "busy" flag, as now we might have an fb attached to
multiple outputs at once, and need to be careful to destroy them only
after they've been removed from all outputs.

Removed the old "busy_set" API which nothing used, and renames fb_destroy
to fb_discard to make it more clear that it's not immediately destroyed.

It's all beta api, so I can do this.
2017-05-12 17:51:34 -05:00
Derek Foreman 699ed066ea ecore_drm2: Require x and y value in plane assign
Saves us a flip test, and gaurantees that we're always testing with a
reasonable x, y and not something leftover from a previous assignment.
2017-05-05 12:53:25 -05:00
Derek Foreman ab8ec5ed5f ecore_drm2: Add API to update the fb for a plane 2017-05-05 12:53:23 -05:00
Derek Foreman ba2275b7ec ecore_drm2: Add ecore_drm2_plane_release to release planes
Opposite of plane assign.
2017-05-05 12:53:22 -05:00
Chris Michael 03cb02fa74 ecore-drm2: Remove newly added atomic API functions
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 <cp.michael@samsung.com>
2017-05-05 12:53:20 -05:00
Chris Michael 345fefd3ef ecore-drm2: Add API functions for atomic commit test and commit
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 <cp.michael@samsung.com>
2017-04-18 07:55:10 -04:00
Chris Michael 9e07d37320 ecore-drm2: Add API function to set plane destination
When we do an atomic commit, we need to know where to place a given
plane (in the case of overlays) in relation to the CRTC, so provide an
API function that can be used for that purpose.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-04-18 07:55:10 -04:00
Chris Michael 19da4706f3 ecore-drm2: Add hardware plane functions
This patch adds a new file where we can store any additional functions
we may need to work with hardware planes. Currently the file contains
a public function that can be used to assign a given Ecore_Drm2_Fb to
a hardware plane

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-04-18 07:55:10 -04:00
Chris Michael 43104a7268 ecore-drm2: Add opaque structure to represent a hardware plane
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-04-18 07:55:10 -04:00
Derek Foreman 61f40d58f7 ecore_drm2: Add ecore_drm2_fb_dmabuf_import
Imports a set of dmabuf buffers as a single Ecore_Drm2_Fb
2017-04-18 07:55:10 -04:00
Chris Michael c126ce2e70 ecore-drm2: Add API function to set output rotation
This patch adds a new API function that can be called from
Enlightenment wl_drm module to enable output rotation.

NB: Only works if Atomic support is enabled as it rotates the hardware
plane directly...and we don't support planes without Atomic enabled.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-18 11:29:14 -05:00
Chris Michael ca194584d5 ecore-drm2: Add API function to return supported rotations of an output
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 <cp.michael@samsung.com>
2017-01-18 10:38:01 -05:00
Chris Michael f32268ad1b ecore-drm2: Expose Ecore_Drm2_Rotation enum
As we will need these values when doing rotation checks inside wl_drm
module (for randr rotation support), let's move them out of the
private header and expose them in Ecore_Drm2.h

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-18 10:06:20 -05:00
Chris Michael 639ad420aa ecore-drm2: Add API to determine if a device prefers shadow buffers
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 <cp.michael@samsung.com>
2017-01-18 09:48:01 -05:00
Derek Foreman 515362efe2 ecore_drm2: Make ecore_drm2_fb_release return status
We need to use this to free up gbm buffers on a surface release, so it
has to report when it successfully frees a buffer.
2016-12-07 11:30:03 -06:00
Chris Michael 6b350fc696 ecore-drm2: Add API function to allow setting gamma of a given output
Small patch to add an API function which will allow setting the gamma
level of a given output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-29 09:15:07 -05:00