aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-09-19 13:08:36 -0400
committerChris Michael <cp.michael@samsung.com>2017-10-26 14:39:06 -0400
commit91a912ffeb78fe33b8fa70cba487d2ec98cec111 (patch)
tree4ea31f84a9a300ef2105a0b95d9dc08e4690f99a
parentptr grab/ungrab for blank/unblank - log stages and work done for debug (diff)
downloadenlightenment-devs/devilhorns/rotation.tar.gz
wl-drm: Enable all degrees of screen rotationdevs/devilhorns/rotation
This patch enables all degrees of rotation to be selectable in the Screen Setup dialog. It then applies the rotation based on hardware or software ... that is, if the hardware can do the selected rotation, then we use hardware otherwise we will use ecore_evas_rotation functions (software). ref https://phab.enlightenment.org/T5999 Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/wl_drm/e_mod_main.c47
1 files changed, 14 insertions, 33 deletions
diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c
index f533f1907..7ce41ee94 100644
--- a/src/modules/wl_drm/e_mod_main.c
+++ b/src/modules/wl_drm/e_mod_main.c
@@ -410,24 +410,10 @@ _drm2_randr_create(void)
s->config.geom.w, s->config.geom.h);
}
- 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;
-
- int rotations;
-
- rotations =
- ecore_drm2_output_supported_rotations_get(output);
-
- 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;
+ s->info.can_rot_0 = EINA_TRUE;
+ s->info.can_rot_90 = EINA_TRUE;
+ s->info.can_rot_180 = EINA_TRUE;
+ s->info.can_rot_270 = EINA_TRUE;
if (cs)
{
@@ -582,25 +568,12 @@ _drm2_randr_apply(void)
ecore_drm2_output_mode_set(output, mode, 0, 0);
- /* TODO: cannot support rotations until we support planes
- * and we cannot support planes until Atomic support is in */
- int orient = 0;
-
- 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);
+ ecore_drm2_output_enabled_set(output, s->config.enabled);
if (s->config.priority == top_priority)
_drm2_output_primary_set(outputs, output);
- ecore_drm2_output_enabled_set(output, s->config.enabled);
+ if (!s->config.enabled) continue;
printf("\tDRM2 RRR: Mode\n");
printf("\t\tDRM2 RRR: Geom: %d %d %dx%d\n",
@@ -612,7 +585,15 @@ _drm2_randr_apply(void)
printf("\tDRM2 RRR: Relative Mode: %d\n", s->config.relative.mode);
printf("\tDRM2 RRR: Relative To: %s\n", s->config.relative.to);
printf("\tDRM2 RRR: Align: %f\n", s->config.relative.align);
+
+ ecore_evas_rotation_with_resize_set(e_comp->ee, s->config.rotation);
+
+ /* TODO: rotate e_comp pointer to match screen ?? */
+ /* ecore_drm2_device_pointer_rotation_set(dev, s->config.rotation); */
}
+
+ ecore_drm2_device_calibrate(dev, vw, vh);
+ ecore_drm2_device_pointer_max_set(dev, vw, vh);
}
static void