devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f3b767255154454fe43c5d40f3d9b3b7a97b96c0

commit f3b767255154454fe43c5d40f3d9b3b7a97b96c0
Author: Chris Michael <[email protected]>
Date:   Wed May 11 09:41:21 2016 -0400

    ecore-drm2: Add API function to return available crtcs
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_drm2/Ecore_Drm2.h        | 13 +++++++++++++
 src/lib/ecore_drm2/ecore_drm2_device.c |  9 +++++++++
 2 files changed, 22 insertions(+)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index f06fa40..3d3c7d0 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -229,6 +229,19 @@ EAPI void ecore_drm2_device_window_set(Ecore_Drm2_Device 
*device, unsigned int w
 EAPI void ecore_drm2_device_pointer_max_set(Ecore_Drm2_Device *device, int w, 
int h);
 
 /**
+ * Get the crtcs of a given device
+ *
+ * @param device
+ * @param num
+ *
+ * @return The crtcs of this given device or NULL on failure
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.18
+ */
+EAPI unsigned int *ecore_drm2_device_crtcs_get(Ecore_Drm2_Device *device, int 
*num);
+
+/**
  * @defgroup Ecore_Drm2_Output_Group Drm output functions
  *
  * Functions that deal with setup of outputs
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c 
b/src/lib/ecore_drm2/ecore_drm2_device.c
index 4b3afea..550d6e3 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -259,3 +259,12 @@ ecore_drm2_device_pointer_max_set(Ecore_Drm2_Device 
*device, int w, int h)
 
    elput_input_pointer_max_set(device->em, w, h);
 }
+
+EAPI unsigned int *
+ecore_drm2_device_crtcs_get(Ecore_Drm2_Device *device, int *num)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(device, NULL);
+
+   if (num) *num = device->num_crtcs;
+   return device->crtcs;
+}

-- 


Reply via email to