ecore-drm2: Add API function to return list of output modes for a given output
authorChris Michael <cpmichael@osg.samsung.com>
Wed, 11 May 2016 13:26:52 +0000 (09:26 -0400)
committerChris Michael <cpmichael@osg.samsung.com>
Fri, 27 May 2016 15:57:53 +0000 (11:57 -0400)
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
src/lib/ecore_drm2/Ecore_Drm2.h
src/lib/ecore_drm2/ecore_drm2_outputs.c

index 41c1b41..7032afe 100644 (file)
@@ -452,6 +452,20 @@ EAPI void ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, Eina_Bool ena
 EAPI void ecore_drm2_output_physical_size_get(Ecore_Drm2_Output *output, int *w, int *h);
 
 /**
+ * Get a list of the modes supported on a given output
+ *
+ * @param output
+ *
+ * @return An Eina_List of the modes supported for this output
+ *
+ * @note The returned list should not be freed
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI const Eina_List *ecore_drm2_output_modes_get(Ecore_Drm2_Output *output);
+
+/**
  * @defgroup Ecore_Drm2_Fb_Group Drm framebuffer functions
  *
  * Functions that deal with setup of framebuffers
index 1c8c576..83ff1f3 100644 (file)
@@ -966,3 +966,10 @@ ecore_drm2_output_physical_size_get(Ecore_Drm2_Output *output, int *w, int *h)
    if (w) *w = output->pw;
    if (h) *h = output->ph;
 }
+
+EAPI const Eina_List *
+ecore_drm2_output_modes_get(Ecore_Drm2_Output *output)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
+   return output->modes;
+}