summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-11 09:26:52 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commited58056e06a7b3bd2eb6d9c329cedc90ce353f07 (patch)
tree3f38a7eaffe81fdd3b3328f6e0fedda486fd911c
parentad58670c5632b6ce5dcb9d8afc7f04e1f8d7c0e3 (diff)
downloadefl-ed58056e06a7b3bd2eb6d9c329cedc90ce353f07.tar.gz
ecore-drm2: Add API function to return list of output modes for a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h14
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c7
2 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 41c1b41323..7032afedbe 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -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
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 1c8c576fc6..83ff1f3587 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -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;
+}