From ed58056e06a7b3bd2eb6d9c329cedc90ce353f07 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 11 May 2016 09:26:52 -0400 Subject: [PATCH] ecore-drm2: Add API function to return list of output modes for a given output Signed-off-by: Chris Michael --- src/lib/ecore_drm2/Ecore_Drm2.h | 14 ++++++++++++++ src/lib/ecore_drm2/ecore_drm2_outputs.c | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index 41c1b41..7032afe 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 1c8c576..83ff1f3 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; +} -- 2.7.4