summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2018-01-09 12:06:53 -0500
committerChris Michael <cp.michael@samsung.com>2018-01-09 12:48:25 -0500
commit2ac84582383e07802bb21ac478dcabc68d1a06df (patch)
treed7ae4a80ed181dbd7ade6fad63d56d220c062afa /src/lib/ecore_drm2
parent4aeca75cff45748c9ff67e007f408f15ea73709f (diff)
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.c19
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
1473ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output) 1473ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output)
1474{ 1474{
1475 int ret = -1; 1475 int ret = -1;
1476 Eina_List *l;
1477 Ecore_Drm2_Plane_State *pstate;
1478 1476
1479 EINA_SAFETY_ON_NULL_RETURN_VAL(output, -1); 1477 EINA_SAFETY_ON_NULL_RETURN_VAL(output, -1);
1480 1478
1481 EINA_LIST_FOREACH(output->plane_states, l, pstate) 1479 if (_ecore_drm2_use_atomic)
1482 { 1480 {
1483 if (pstate->type.value != DRM_PLANE_TYPE_PRIMARY) continue; 1481 Ecore_Drm2_Plane_State *pstate;
1484 ret = pstate->supported_rotations; 1482 Eina_List *l;
1485 break; 1483
1484 EINA_LIST_FOREACH(output->plane_states, l, pstate)
1485 {
1486 if (pstate->type.value != DRM_PLANE_TYPE_PRIMARY) continue;
1487 ret = pstate->supported_rotations;
1488 break;
1489 }
1486 } 1490 }
1491 else
1492 return (ECORE_DRM2_ROTATION_NORMAL | ECORE_DRM2_ROTATION_90 |
1493 ECORE_DRM2_ROTATION_180 | ECORE_DRM2_ROTATION_270);
1487 1494
1488 return ret; 1495 return ret;
1489} 1496}