discomfitor pushed a commit to branch enlightenment-0.21. http://git.enlightenment.org/core/enlightenment.git/commit/?id=54ecd5e56bfd93ae5c1ab20737c1843f5ba8ab2c
commit 54ecd5e56bfd93ae5c1ab20737c1843f5ba8ab2c Author: Chris Michael <[email protected]> Date: Wed Jan 18 11:30:30 2017 -0500 re-enable getting and setting output rotations in wl_drm Small patch to re-enable the ability to query and set the rotation of an output. Signed-off-by: Chris Michael <[email protected]> --- src/modules/wl_drm/e_mod_main.c | 44 +++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index 5f50f2d..5562cd8 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -502,30 +502,26 @@ _drm2_randr_create(void) s->config.geom.w, s->config.geom.h); } - /* TODO: cannot support rotations until we support planes - * and we cannot support planes until Atomic support is in */ - s->info.can_rot_0 = EINA_FALSE; s->info.can_rot_90 = EINA_FALSE; s->info.can_rot_180 = EINA_FALSE; s->info.can_rot_270 = EINA_FALSE; -/* # if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 18) */ -/* unsigned int rotations; */ +# if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 18) + int rotations; -/* rotations = */ -/* ecore_drm_output_supported_rotations_get(output, */ -/* ECORE_DRM_PLANE_TYPE_PRIMARY); */ + rotations = + ecore_drm2_output_supported_rotations_get(output); -/* if (rotations & ECORE_DRM_PLANE_ROTATION_NORMAL) */ -/* s->info.can_rot_0 = EINA_TRUE; */ -/* if (rotations & ECORE_DRM_PLANE_ROTATION_90) */ -/* s->info.can_rot_90 = EINA_TRUE; */ -/* if (rotations & ECORE_DRM_PLANE_ROTATION_180) */ -/* s->info.can_rot_180 = EINA_TRUE; */ -/* if (rotations & ECORE_DRM_PLANE_ROTATION_270) */ -/* s->info.can_rot_270 = EINA_TRUE; */ -/* # endif */ + if (rotations & ECORE_DRM2_ROTATION_NORMAL) + s->info.can_rot_0 = EINA_TRUE; + if (rotations & ECORE_DRM2_ROTATION_90) + s->info.can_rot_90 = EINA_TRUE; + if (rotations & ECORE_DRM2_ROTATION_180) + s->info.can_rot_180 = EINA_TRUE; + if (rotations & ECORE_DRM2_ROTATION_270) + s->info.can_rot_270 = EINA_TRUE; +# endif if (cs) { @@ -683,6 +679,20 @@ _drm2_randr_apply(void) /* TODO: cannot support rotations until we support planes * and we cannot support planes until Atomic support is in */ +# if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 18) + int orient; + + if (s->config.rotation == 0) + orient = ECORE_DRM2_ROTATION_NORMAL; + else if (s->config.rotation == 90) + orient = ECORE_DRM2_ROTATION_90; + else if (s->config.rotation == 180) + orient = ECORE_DRM2_ROTATION_180; + else if (s->config.rotation == 270) + orient = ECORE_DRM2_ROTATION_270; + + ecore_drm2_output_rotation_set(output, orient); +# endif if (s->config.priority == top_priority) _drm2_output_primary_set(outputs, output); --
