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 bfd04ff3a1302598d476dfc852d5801aadfed503
Author: Christopher Michael <[email protected]>
AuthorDate: Thu Sep 4 08:46:26 2025 -0500
ecore_drm2: Add API function to return crtc geometry
---
src/lib/ecore_drm2/Ecore_Drm2.h | 3 +++
src/lib/ecore_drm2/ecore_drm2_crtcs.c | 23 +++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 2dcc87dae8..1c0fbcbc2c 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -172,6 +172,9 @@ EAPI Eina_Bool ecore_drm2_display_blanktime_get(Ecore_Drm2_Display *disp, int se
EAPI Eina_Bool ecore_drm2_display_changes_apply(Ecore_Drm2_Display *disp);
EAPI void ecore_drm2_display_gamma_set(Ecore_Drm2_Display *disp, uint16_t size, uint16_t *red, uint16_t *greeen, uint16_t *blue);
+/* Crtc API functions */
+EAPI void ecore_drm2_crtc_geometry_get(Ecore_Drm2_Crtc *crtc, int *x, int *y, int *w, int *h);
+
/* Framebuffer API functions */
EAPI Ecore_Drm2_Fb *ecore_drm2_fb_create(Ecore_Drm2_Device *dev, int width, int height, int depth, int bpp, unsigned int format, void *bo);
EAPI void ecore_drm2_fb_dirty(Ecore_Drm2_Fb *fb, Eina_Rectangle *rects, unsigned int count);
diff --git a/src/lib/ecore_drm2/ecore_drm2_crtcs.c b/src/lib/ecore_drm2/ecore_drm2_crtcs.c
index 355fe65299..9d15230807 100644
--- a/src/lib/ecore_drm2/ecore_drm2_crtcs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_crtcs.c
@@ -365,3 +365,26 @@ _ecore_drm2_crtcs_changes_apply(Ecore_Drm2_Crtc *crtc)
return EINA_TRUE;
}
+
+EAPI void
+ecore_drm2_crtc_geometry_get(Ecore_Drm2_Crtc *crtc, int *x, int *y, int *w, int *h)
+{
+ drmModeCrtcPtr cptr;
+
+ if (x) *x = 0;
+ if (y) *y = 0;
+ if (w) *w = 0;
+ if (h) *h = 0;
+
+ EINA_SAFETY_ON_NULL_RETURN(crtc);
+
+ cptr = sym_drmModeGetCrtc(crtc->fd, crtc->id);
+ if (!cptr) return;
+
+ if (x) *x = cptr->x;
+ if (y) *y = cptr->y;
+ if (w) *w = cptr->width;
+ if (h) *h = cptr->height;
+
+ sym_drmModeFreeCrtc(cptr);
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.