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 0e3b7718b1931e0f3102f0b15bccb1438087cb9c
Author: Christopher Michael <devilho...@comcast.net>
AuthorDate: Thu Oct 10 10:47:36 2024 -0400
ecore_drm2: Add code to start applying display changes
---
src/lib/ecore_drm2/ecore_drm2_displays.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/lib/ecore_drm2/ecore_drm2_displays.c b/src/lib/ecore_drm2/ecore_drm2_displays.c
index 000ff77b47..fe3db92dc0 100644
--- a/src/lib/ecore_drm2/ecore_drm2_displays.c
+++ b/src/lib/ecore_drm2/ecore_drm2_displays.c
@@ -1113,10 +1113,12 @@ ecore_drm2_display_blanktime_get(Ecore_Drm2_Display *disp, int seq, long *sec, l
EAPI Eina_Bool
ecore_drm2_display_changes_apply(Ecore_Drm2_Display *disp)
{
- Ecore_Drm2_Display_State *pstate;
+ Ecore_Drm2_Display_State *cstate, *pstate;
EINA_SAFETY_ON_NULL_RETURN_VAL(disp, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(disp->crtc, EINA_FALSE);
+ cstate = disp->state.current;
pstate = disp->state.pending;
if (pstate->changes & ECORE_DRM2_DISPLAY_STATE_GAMMA)
@@ -1146,25 +1148,36 @@ ecore_drm2_display_changes_apply(Ecore_Drm2_Display *disp)
if (pstate->changes & ECORE_DRM2_DISPLAY_STATE_MODE)
{
+ Eina_Bool ret = EINA_FALSE;
+ ret = _ecore_drm2_crtcs_mode_set(disp->crtc, pstate->mode);
+ if (ret)
+ pstate->changes &= ~ECORE_DRM2_DISPLAY_STATE_MODE;
}
if (pstate->changes & ECORE_DRM2_DISPLAY_STATE_PRIMARY)
{
-
+ /* No-op change */
+ pstate->changes &= ~ECORE_DRM2_DISPLAY_STATE_PRIMARY;
}
if (pstate->changes & ECORE_DRM2_DISPLAY_STATE_ENABLED)
{
-
+ /* TODO: dpms on/off */
}
if (pstate->changes & ECORE_DRM2_DISPLAY_STATE_POSITION)
{
-
+ disp->x = pstate->x;
+ disp->y = pstate->y;
+ pstate->changes &= ~ECORE_DRM2_DISPLAY_STATE_POSITION;
}
- /* TODO: copy pending state to current when applying changes is successful */
+ /* copy pending state to current when applying changes is successful */
+ memcpy(cstate, pstate, sizeof(Ecore_Drm2_Display_State));
+
+ /* reset pending state */
+ memset(pstate, 0, sizeof(Ecore_Drm2_Display_State));
return EINA_TRUE;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.