diff options
author | Chris Michael <cp.michael@samsung.com> | 2018-01-09 12:06:53 -0500 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2018-01-09 12:48:25 -0500 |
commit | 2ac84582383e07802bb21ac478dcabc68d1a06df (patch) | |
tree | d7ae4a80ed181dbd7ade6fad63d56d220c062afa /src/lib/ecore_drm2 | |
parent | 4aeca75cff45748c9ff67e007f408f15ea73709f (diff) | |
download | efl-2ac84582383e07802bb21ac478dcabc68d1a06df.tar.gz |
ecore-drm2: return supported rotations if not using hardware
If we are Not using Atomic/Hardware support for output rotations, we
should return all available rotations as these will still work in
software mode.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2')
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_outputs.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index e33cb2d233..1d1861bd89 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1473,17 +1473,24 @@ EAPI int ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output) { int ret = -1; - Eina_List *l; - Ecore_Drm2_Plane_State *pstate; EINA_SAFETY_ON_NULL_RETURN_VAL(output, -1); - EINA_LIST_FOREACH(output->plane_states, l, pstate) + if (_ecore_drm2_use_atomic) { - if (pstate->type.value != DRM_PLANE_TYPE_PRIMARY) continue; - ret = pstate->supported_rotations; - break; + Ecore_Drm2_Plane_State *pstate; + Eina_List *l; + + EINA_LIST_FOREACH(output->plane_states, l, pstate) + { + if (pstate->type.value != DRM_PLANE_TYPE_PRIMARY) continue; + ret = pstate->supported_rotations; + break; + } } + else + return (ECORE_DRM2_ROTATION_NORMAL | ECORE_DRM2_ROTATION_90 | + ECORE_DRM2_ROTATION_180 | ECORE_DRM2_ROTATION_270); return ret; } |