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 b87fde4248e235579f844c36244f38e362abf07c
Author: Christopher Michael <devilho...@comcast.net>
AuthorDate: Tue Aug 23 09:17:15 2022 -0400

    ecore_drm2: Add API function to get preferred depth
---
 src/lib/ecore_drm2/Ecore_Drm2.h        |  1 +
 src/lib/ecore_drm2/ecore_drm2_device.c | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 5b5dea6a7c..4a860883e0 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -40,6 +40,7 @@ EAPI int ecore_drm2_shutdown(void);
 EAPI Ecore_Drm2_Device *ecore_drm2_device_open(const char *seat, unsigned int tty);
 EAPI void ecore_drm2_device_close(Ecore_Drm2_Device *dev);
 EAPI void ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device *dev, int *width, int *height);
+EAPI void ecore_drm2_device_preferred_depth_get(Ecore_Drm2_Device *dev, int *depth, int *bpp);
 
 # endif
 
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c
index 0143db17b5..ec280cbf7e 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -233,3 +233,19 @@ ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device *dev, int *width, int *heigh
         if (ret == 0) *height = caps;
      }
 }
+
+EAPI void
+ecore_drm2_device_preferred_depth_get(Ecore_Drm2_Device *dev, int *depth, int *bpp)
+{
+   uint64_t caps;
+   int ret = -1;
+
+   EINA_SAFETY_ON_NULL_RETURN(dev);
+
+   ret = sym_drmGetCap(dev->fd, DRM_CAP_DUMB_PREFERRED_DEPTH, &caps);
+   if (ret == 0)
+     {
+        if (depth) *depth = caps;
+        if (bpp) *bpp = caps;
+     }
+}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to