summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-18 11:30:30 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-18 11:30:30 -0500
commitba7e910f9c2e0111dfa06fe0cc83af22da4bef20 (patch)
treedf2feedf69ef5ed64782bc2aa093d1c1689539de
parent307072fc43de92c6ead13c12df58659d5f4ea963 (diff)
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 <cp.michael@samsung.com>
-rw-r--r--src/modules/wl_drm/e_mod_main.c44
1 files 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 6d9cb6263..1d962ea4e 100644
--- a/src/modules/wl_drm/e_mod_main.c
+++ b/src/modules/wl_drm/e_mod_main.c
@@ -444,30 +444,26 @@ _drm2_randr_create(void)
444 s->config.geom.w, s->config.geom.h); 444 s->config.geom.w, s->config.geom.h);
445 } 445 }
446 446
447 /* TODO: cannot support rotations until we support planes
448 * and we cannot support planes until Atomic support is in */
449
450 s->info.can_rot_0 = EINA_FALSE; 447 s->info.can_rot_0 = EINA_FALSE;
451 s->info.can_rot_90 = EINA_FALSE; 448 s->info.can_rot_90 = EINA_FALSE;
452 s->info.can_rot_180 = EINA_FALSE; 449 s->info.can_rot_180 = EINA_FALSE;
453 s->info.can_rot_270 = EINA_FALSE; 450 s->info.can_rot_270 = EINA_FALSE;
454 451
455/* # if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 18) */ 452# if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 18)
456/* unsigned int rotations; */ 453 int rotations;
457 454
458/* rotations = */ 455 rotations =
459/* ecore_drm_output_supported_rotations_get(output, */ 456 ecore_drm2_output_supported_rotations_get(output);
460/* ECORE_DRM_PLANE_TYPE_PRIMARY); */
461 457
462/* if (rotations & ECORE_DRM_PLANE_ROTATION_NORMAL) */ 458 if (rotations & ECORE_DRM2_ROTATION_NORMAL)
463/* s->info.can_rot_0 = EINA_TRUE; */ 459 s->info.can_rot_0 = EINA_TRUE;
464/* if (rotations & ECORE_DRM_PLANE_ROTATION_90) */ 460 if (rotations & ECORE_DRM2_ROTATION_90)
465/* s->info.can_rot_90 = EINA_TRUE; */ 461 s->info.can_rot_90 = EINA_TRUE;
466/* if (rotations & ECORE_DRM_PLANE_ROTATION_180) */ 462 if (rotations & ECORE_DRM2_ROTATION_180)
467/* s->info.can_rot_180 = EINA_TRUE; */ 463 s->info.can_rot_180 = EINA_TRUE;
468/* if (rotations & ECORE_DRM_PLANE_ROTATION_270) */ 464 if (rotations & ECORE_DRM2_ROTATION_270)
469/* s->info.can_rot_270 = EINA_TRUE; */ 465 s->info.can_rot_270 = EINA_TRUE;
470/* # endif */ 466# endif
471 467
472 if (cs) 468 if (cs)
473 { 469 {
@@ -625,6 +621,20 @@ _drm2_randr_apply(void)
625 621
626 /* TODO: cannot support rotations until we support planes 622 /* TODO: cannot support rotations until we support planes
627 * and we cannot support planes until Atomic support is in */ 623 * and we cannot support planes until Atomic support is in */
624# if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 18)
625 int orient;
626
627 if (s->config.rotation == 0)
628 orient = ECORE_DRM2_ROTATION_NORMAL;
629 else if (s->config.rotation == 90)
630 orient = ECORE_DRM2_ROTATION_90;
631 else if (s->config.rotation == 180)
632 orient = ECORE_DRM2_ROTATION_180;
633 else if (s->config.rotation == 270)
634 orient = ECORE_DRM2_ROTATION_270;
635
636 ecore_drm2_output_rotation_set(output, orient);
637# endif
628 638
629 if (s->config.priority == top_priority) 639 if (s->config.priority == top_priority)
630 _drm2_output_primary_set(outputs, output); 640 _drm2_output_primary_set(outputs, output);