This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch devs/devilhorns/apos
in repository efl.
View the commit online.
commit 087665ab8384bcd29ac78bab953f2631494a2061
Author: Christopher Michael <devilho...@comcast.net>
AuthorDate: Mon Mar 20 11:30:56 2023 -0400
ecore_drm2: Move mode_set API out of testing
---
src/lib/ecore_drm2/Ecore_Drm2.h | 2 --
src/lib/ecore_drm2/ecore_drm2_displays.c | 21 ++++++++++++++++++++-
src/lib/ecore_drm2/ecore_drm2_private.h | 4 ++++
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index ce940f2544..fa2cd3ef18 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -79,8 +79,6 @@ EAPI const Eina_List *ecore_drm2_displays_get(Ecore_Drm2_Device *dev);
EAPI void ecore_drm2_display_info_get(Ecore_Drm2_Display *disp, int *x, int *y, int *w, int *h, unsigned int *refresh);
EAPI int ecore_drm2_display_rotation_get(Ecore_Drm2_Display *disp);
EAPI void ecore_drm2_display_rotation_set(Ecore_Drm2_Display *disp, uint64_t rotation);
-
-/* XXX: These are 'test' APIs */
EAPI void ecore_drm2_display_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Display_Mode *mode, int x, int y);
# endif
diff --git a/src/lib/ecore_drm2/ecore_drm2_displays.c b/src/lib/ecore_drm2/ecore_drm2_displays.c
index 90cb06f442..0507848d8e 100644
--- a/src/lib/ecore_drm2/ecore_drm2_displays.c
+++ b/src/lib/ecore_drm2/ecore_drm2_displays.c
@@ -612,13 +612,32 @@ ecore_drm2_display_model_get(Ecore_Drm2_Display *disp)
}
EAPI void
-ecore_drm2_display_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Display_Mode *mode, int x EINA_UNUSED, int y EINA_UNUSED)
+ecore_drm2_display_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Display_Mode *mode, int x, int y)
{
+ Ecore_Drm2_Crtc_State *cstate;
+
EINA_SAFETY_ON_NULL_RETURN(disp);
EINA_SAFETY_ON_NULL_RETURN(mode);
EINA_SAFETY_ON_NULL_RETURN(disp->crtc);
/* TODO, FIXME */
+ if ((disp->state.current->x != x) ||
+ (disp->state.current->y != y))
+ {
+ disp->state.pending->x = x;
+ disp->state.pending->y = y;
+ disp->state.pending->changes |= ECORE_DRM2_DISPLAY_STATE_POSITION;
+ }
+
+ cstate = disp->crtc->state.current;
+ if (cstate->mode != mode)
+ {
+ Ecore_Drm2_Crtc_State *pstate;
+
+ pstate = disp->crtc->state.pending;
+ pstate->mode = mode;
+ pstate->changes |= ECORE_DRM2_CRTC_STATE_MODE;
+ }
}
EAPI Eina_Bool
diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h
index 78d645b35a..62392d9ece 100644
--- a/src/lib/ecore_drm2/ecore_drm2_private.h
+++ b/src/lib/ecore_drm2/ecore_drm2_private.h
@@ -104,6 +104,7 @@ typedef enum _Ecore_Drm2_Display_State_Changes
ECORE_DRM2_DISPLAY_STATE_MODE = (1 << 3),
ECORE_DRM2_DISPLAY_STATE_PRIMARY = (1 << 4),
ECORE_DRM2_DISPLAY_STATE_ENABLED = (1 << 5),
+ ECORE_DRM2_DISPLAY_STATE_POSITION = (1 << 6),
} Ecore_Drm2_Display_State_Changes;
typedef struct _Ecore_Drm2_Atomic_Blob
@@ -198,6 +199,9 @@ typedef struct _Ecore_Drm2_Plane_State
typedef struct _Ecore_Drm2_Display_State
{
uint32_t changes;
+
+ int x, y;
+
uint16_t gamma;
uint64_t rotation;
double backlight;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.