Commit Graph

94 Commits

Author SHA1 Message Date
Christopher Michael 12a85fb5b0 ecore_drm2: Add API to set user data on a display 2024-01-17 08:57:18 -05:00
Christopher Michael db666e93e9 ecore_drm2: Add API to find a display at given coordinates
NB: This also makes a small modification for calibrating displays
which should now properly work based on display rotation
2024-01-17 08:14:01 -05:00
Christopher Michael f6b0565b2b ecore_drm2: Add event handler to listen for when devices get added 2023-11-22 07:39:26 -05:00
Christopher Michael 430dee86e4 ecore_drm2: Add APIs to support setting display relative properties 2023-11-22 06:57:20 -05:00
Christopher Michael 6478f99851 ecore_drm2: Remove unused 'supported_rotations' field from
Ecore_Drm2_Display
2023-11-21 09:33:55 -05:00
Christopher Michael 0d0e6fedbc ecore_drm2: Remove unused 'fd' field on Ecore_Drm2_Display
This is currently not used for anything, so comment it out for now. If
it's needed later, we can just uncomment
2023-11-21 09:08:48 -05:00
Christopher Michael 087665ab83 ecore_drm2: Move mode_set API out of testing 2023-11-21 06:23:38 -05:00
Christopher Michael 62f8ea49fa ecore_drm2: Add enums for state changes
This patch adds some enums so we can more easily track what has
changed in each objects state. This will allow us to selectively apply
Only what has been changed in each object
2023-03-08 10:26:01 -05:00
Christopher Michael 57caf9a1bb ecore_drm2: Move to using a current & pending state
Large patch that essentially moves all the code to use a current &
pending 'state' so that we can apply changes on vblank
2023-03-08 09:42:33 -05:00
Christopher Michael 4a8b57192a ecore_drm2: Ensure display rotation value is filled in during
display_create
2023-01-09 11:45:37 -05:00
Christopher Michael 06960f71ca ecore_drm2: Remove test API
This will get replaced with an actual API
2022-12-07 07:19:33 -05:00
Christopher Michael 92deac89ac ecore_drm2: Add symlinks for libdrm functions needed for Atomic support 2022-12-06 10:35:42 -05:00
Christopher Michael d22f3f389c ecore_drm2: Add support for plane zpos property 2022-12-03 10:12:25 -05:00
Christopher Michael 01c6609a82 ecore_drm2: Add field to store drm property flags
This will allow us to test if a property is immutable so we do not try
to set a property value on something that cannot be changed. For
example, some drivers have an immutable zpos on planes so we cannot
change those.
2022-12-03 08:02:58 -05:00
Christopher Michael 3cd26bcdc2 ecore_drm2: Remove ECORE_DRM2_THREAD_CODE_COMMIT op code
As a portion of the upcoming API will require sending return values
from called functions, we will not use threading for doing atomic
commits so there is no need for this op code.
2022-12-03 06:16:44 -05:00
Christopher Michael cd5afa6128 ecore_drm2: Reorder defines for messages 2022-12-03 06:16:28 -05:00
Christopher Michael 3ab68831da ecore_drm2: Switch threading code to use an 'op code'
This should make it easier in the future to add more thread
operations. Also, this fixes up the issue that the eina_thread_queue
was never freed
2022-11-08 07:33:22 -05:00
Christopher Michael b2535043dc ecore_drm2: Add start of explicit threading for crtc state
NB: Pushing this so that the code is up there, but it is certainly
going to change shortly
2022-10-18 10:34:18 -04:00
Christopher Michael ef070b7816 ecore_drm2: Add code to fill Display Modes 2022-09-23 09:16:42 -04:00
Christopher Michael eb4940d94e ecore_drm2: Rename some variables in the structures to avoid confusion
While I hate CamelCase, using drmCrtc, drmConn, etc makes it easier
when reading the code to distinguish what we are operating on/with.
2022-09-22 11:50:52 -04:00
Christopher Michael 1e2517cf07 ecore_drm2: Start on code to add Display Modes 2022-09-20 12:26:45 -04:00
Christopher Michael aa64d0f37c ecore_drm2: Add opaque structure for Ecore_Drm2_Display_Mode 2022-09-20 12:15:09 -04:00
Christopher Michael 2958c10c93 ecore_drm2: Add public structures for Crtc, Connector, Display, Plane
This commit adds opaque API structures for Crtc, Connector, Display,
and Plane. It also adds missing sym_drm functions that we will need
later
2022-09-20 08:42:55 -04:00
Christopher Michael 94cdf5d9f2 ecore_drm2: Add API function to retrieve cursor size 2022-09-20 08:42:55 -04:00
Christopher Michael 45ef76a41f ecore-drm2: Add code to free Atomic State on device close 2022-09-20 08:42:55 -04:00
Christopher Michael e90eab4940 ecore-drm2: Add structures for Atomic Modesetting support 2022-09-20 08:42:55 -04:00
Christopher Michael 226d306454 ecore-drm2: Add start of Ecore_Drm2_Output structure 2022-09-20 08:42:55 -04:00
Christopher Michael b69bf1a6ac ecore_drm2: Add check for Atomic Modesetting support 2022-09-20 08:42:55 -04:00
Christopher Michael ee17764a5f ecore_drm2: Add code to open & close a drm device 2022-09-20 08:42:55 -04:00
Christopher Michael 1e6df64525 ecore_drm2: Start rework of Ecore_Drm2 library
This removes all old code and starts fresh with just simple
ecore_drm2_init & ecore_drm2_shutdown functions
2022-09-20 08:42:55 -04:00
Christopher Michael d09664e20e ecore-drm2: Add background_color to crtc atomic properties
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-04-18 07:21:39 -04:00
Christopher Michael 8e0c4d83ed ecore-drm2: Make atomic property values support uint64_t
Some Atomic property values are actually uint64_t, so fix the
structure to reflect that.

@fix
2019-04-18 07:21:39 -04:00
Christopher Michael 9c08fe29d4 ecore-drm2: Set output rotation value
Summary:
When we call ecore_drm2_output_rotation_set we need to store that
value in the Output structure so that it can be checked later when
needed.

ref T7690

Depends on D8112

Reviewers: raster, cedric, zmike

Reviewed By: cedric

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8113
2019-03-22 12:41:17 -04:00
Carsten Haitzler 39f224b3a6 ecore drm2 - work around kms/drm bug seemingly when no flip event comes
so we request a flip so we can do vsync events. the flip event never
comes. i am not sure why it never comes, but we ask and nothing
arrives, and this basically halts all rendering in wayland compositor
mode as we are syncing rendering to vsync (of course). put in a
timeout of 0.05s (50ms) to try ask again if the event never comes and
log the error. this is a pretty useful workaround becauswe having your
entire display freeze is a ... bad thing.

@fix
2019-02-21 09:52:31 +00: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
Derek Foreman 9b9d704292 ecore_drm2: Remove connector bitfield
This is unreliable - there's no reason to expect these connector ids
will be low enough to sensibly store in a bit field.
2017-08-09 14:56:58 -05:00
Derek Foreman 2f9cb33f0b ecore_drm2: remove unused crtc bitfield
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.
2017-08-09 14:56:58 -05:00
Derek Foreman 0584fc81a2 ecore_drm2: Add a fallback method for vblank waiting
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.
2017-07-28 15:35:03 -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 69181cc9e8 ecore_drm2: Track number of times an fb is on scanout
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.
2017-06-23 08:15:41 -05:00
Derek Foreman bc8b11bd78 ecore_drm2: Track whether an Ecore_Drm2_Plane has ever been on scanout 2017-06-23 08:15:41 -05:00
Derek Foreman a8c7b89cb7 ecore_drm2: Move fb from plane state struct to plane struct
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.
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
Chris Michael bbd18510d6 ecore-drm2: Remove #ifdef HAVE_ATOMIC_DRM
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>
2017-06-09 14:20:05 -04:00
Chris Michael 6e37d13a1c ecore-drm2: Use static libdrm to build ecore-drm2
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>
2017-06-09 13:48:55 -04:00
Chris Michael 0dc439abbc ecore-drm2: Fix output backlight value type definitions
When we go to set output backlight level we use doubles, so lets just
store these values as doubles in the structure.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-06 10:44:55 -04:00
Derek Foreman df0595ebc0 ecore_drm2: Rename _release_buffer and make it private instead of static
Other files in ecore_drm2 need to release buffers too.
2017-06-02 15:50:08 -05:00
Mike Blumenkrantz ed4e54ebe2 wayland/drm: create evas_devices and add device pointer to input events
this is still semi-broken if a seat has many pointer-ish type devices since
pointer devices in ecore-evas were never correctly implemented to be 1:1 with
seat:cursor relationships

@feature
2017-05-26 16:27:43 -04:00