summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-02-04 08:56:32 -0500
committerChris Michael <cpmichael@osg.samsung.com>2016-02-04 09:27:38 -0500
commitbb774a538e0f3a74cf9737f69a7ccba7b6909e61 (patch)
tree990e8d064c0a78e8aba8304950e3d889b2ba7d57 /src/lib/ecore_drm
parentbabd202d05094df18c448b66efb96fcd8f0d0e10 (diff)
ecore-drm: Add API function to get supported rotations from an output
This patch adds an API function so that we can get the supported rotations from an output. This is needed so that the Screen Setup dialog in Enlightenment can list the rotations supported for the user to choose from while running using drm @feature Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/Ecore_Drm.h4
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c19
2 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h
index 66ac7fe..2942eeb 100644
--- a/src/lib/ecore_drm/Ecore_Drm.h
+++ b/src/lib/ecore_drm/Ecore_Drm.h
@@ -1002,6 +1002,10 @@ EAPI Eina_Bool ecore_drm_output_possible_crtc_get(Ecore_Drm_Output *output, unsi
1002 */ 1002 */
1003EAPI Eina_Bool ecore_drm_output_mode_set(Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode, int x, int y); 1003EAPI Eina_Bool ecore_drm_output_mode_set(Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode, int x, int y);
1004 1004
1005/* TODO: doxy */
1006/* @since 1.18 */
1007EAPI unsigned int ecore_drm_output_supported_rotations_get(Ecore_Drm_Output *output, Ecore_Drm_Plane_Type type);
1008
1005/** 1009/**
1006 * Enable key remap functionality on a Ecore_Drm_Evdev 1010 * Enable key remap functionality on a Ecore_Drm_Evdev
1007 * 1011 *
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index c5fed37..9dd4fd3 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -1481,3 +1481,22 @@ ecore_drm_output_mode_set(Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode,
1481 1481
1482 return ret; 1482 return ret;
1483} 1483}
1484
1485EAPI unsigned int
1486ecore_drm_output_supported_rotations_get(Ecore_Drm_Output *output, Ecore_Drm_Plane_Type type)
1487{
1488 Ecore_Drm_Plane *plane;
1489 Eina_List *l;
1490 unsigned int rot = -1;
1491
1492 EINA_SAFETY_ON_NULL_RETURN_VAL(output, rot);
1493
1494 EINA_LIST_FOREACH(output->planes, l, plane)
1495 {
1496 if (plane->type != type) continue;
1497 rot = plane->supported_rotations;
1498 break;
1499 }
1500
1501 return rot;
1502}