Compare commits
4 Commits
master
...
devs/devil
Author | SHA1 | Date |
---|---|---|
Christopher Michael | 9717994d06 | |
Chris Michael | 0525154d25 | |
Chris Michael | 9b83f001a3 | |
Chris Michael | 7769a2240b |
|
@ -435,6 +435,8 @@ _drm2_randr_create(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("DRM2 RRR: drm output rotation=%i\n", s->config.rotation);
|
printf("DRM2 RRR: drm output rotation=%i\n", s->config.rotation);
|
||||||
|
/* TODO: get current output rotation and store in
|
||||||
|
* s->config.rotation */
|
||||||
|
|
||||||
s->info.can_rot_0 = EINA_FALSE;
|
s->info.can_rot_0 = EINA_FALSE;
|
||||||
s->info.can_rot_90 = EINA_FALSE;
|
s->info.can_rot_90 = EINA_FALSE;
|
||||||
|
@ -551,12 +553,14 @@ _drm2_rotation_exists(Ecore_Drm2_Output *output, int rot)
|
||||||
int rots;
|
int rots;
|
||||||
|
|
||||||
rots = ecore_drm2_output_supported_rotations_get(output);
|
rots = ecore_drm2_output_supported_rotations_get(output);
|
||||||
|
|
||||||
printf("RRR: DRM2 ..... rots for %p rots=%x input=%x\n", output, rots, rot);
|
printf("RRR: DRM2 ..... rots for %p rots=%x input=%x\n", output, rots, rot);
|
||||||
// hack for ... broken drivers that don't say anything about rotations
|
// hack for ... broken drivers that don't say anything about rotations
|
||||||
if (!(rots &
|
if (!(rots &
|
||||||
(ECORE_DRM2_ROTATION_NORMAL | ECORE_DRM2_ROTATION_90 |
|
(ECORE_DRM2_ROTATION_NORMAL | ECORE_DRM2_ROTATION_90 |
|
||||||
ECORE_DRM2_ROTATION_180 | ECORE_DRM2_ROTATION_270)))
|
ECORE_DRM2_ROTATION_180 | ECORE_DRM2_ROTATION_270)))
|
||||||
rots |= ECORE_DRM2_ROTATION_NORMAL;
|
rots |= ECORE_DRM2_ROTATION_NORMAL;
|
||||||
|
|
||||||
if (rots >= 0)
|
if (rots >= 0)
|
||||||
{
|
{
|
||||||
if ((rot == 0) && (rots & ECORE_DRM2_ROTATION_NORMAL))
|
if ((rot == 0) && (rots & ECORE_DRM2_ROTATION_NORMAL))
|
||||||
|
@ -580,7 +584,6 @@ _drm2_randr_apply(void)
|
||||||
Ecore_Drm2_Output **outconf, *out;
|
Ecore_Drm2_Output **outconf, *out;
|
||||||
int nw = 0, nh = 0;
|
int nw = 0, nh = 0;
|
||||||
int minw, minh, maxw, maxh;
|
int minw, minh, maxw, maxh;
|
||||||
int rot;
|
|
||||||
unsigned int *crtcs = NULL;
|
unsigned int *crtcs = NULL;
|
||||||
int num_crtcs = 0, numout = 0;
|
int num_crtcs = 0, numout = 0;
|
||||||
const Eina_List *outputs = NULL;
|
const Eina_List *outputs = NULL;
|
||||||
|
@ -616,12 +619,8 @@ _drm2_randr_apply(void)
|
||||||
{
|
{
|
||||||
printf("RRR: find output for '%s'\n", s->info.name);
|
printf("RRR: find output for '%s'\n", s->info.name);
|
||||||
|
|
||||||
if (!s->config.configured)
|
if (s->config.configured)
|
||||||
{
|
{
|
||||||
printf("RRR: unconfigured screen: %s\n", s->info.name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
out = _drm2_output_find(outputs, s->info.name);
|
out = _drm2_output_find(outputs, s->info.name);
|
||||||
if (out)
|
if (out)
|
||||||
{
|
{
|
||||||
|
@ -638,7 +637,6 @@ _drm2_randr_apply(void)
|
||||||
printf("RRR: crtc slot empty: %i\n", i);
|
printf("RRR: crtc slot empty: %i\n", i);
|
||||||
if (ecore_drm2_output_possible_crtc_get(out, crtcs[i]))
|
if (ecore_drm2_output_possible_crtc_get(out, crtcs[i]))
|
||||||
{
|
{
|
||||||
printf("RRR: output is possible...\n");
|
|
||||||
if (_drm2_rotation_exists(out, s->config.rotation))
|
if (_drm2_rotation_exists(out, s->config.rotation))
|
||||||
{
|
{
|
||||||
printf("RRR: assign slot out: %p\n", out);
|
printf("RRR: assign slot out: %p\n", out);
|
||||||
|
@ -652,6 +650,7 @@ _drm2_randr_apply(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
numout = 0;
|
numout = 0;
|
||||||
for (i = 0; i < num_crtcs; i++)
|
for (i = 0; i < num_crtcs; i++)
|
||||||
|
@ -702,16 +701,30 @@ _drm2_randr_apply(void)
|
||||||
ecore_drm2_output_enabled_set(outconf[i],
|
ecore_drm2_output_enabled_set(outconf[i],
|
||||||
screenconf[i]->config.enabled);
|
screenconf[i]->config.enabled);
|
||||||
|
|
||||||
e_drm2_output_rotation_set(outconf[i], orient);
|
|
||||||
|
|
||||||
ecore_evas_rotation_with_resize_set(e_comp->ee,
|
ecore_evas_rotation_with_resize_set(e_comp->ee,
|
||||||
screenconf[i]->config.rotation);
|
screenconf[i]->config.rotation);
|
||||||
|
|
||||||
|
if ((screenconf[i]->config.relative.to) &&
|
||||||
|
(screenconf[i]->config.relative.mode ==
|
||||||
|
E_RANDR2_RELATIVE_CLONE))
|
||||||
|
{
|
||||||
|
Ecore_Drm2_Output *clone;
|
||||||
|
|
||||||
|
clone =
|
||||||
|
_drm2_output_find(outputs,
|
||||||
|
screenconf[i]->config.relative.to);
|
||||||
|
fprintf(stderr, "WL_DRM: SET OUTPUT CLONED !!\n");
|
||||||
|
ecore_evas_output_clone_set(e_comp->ee, outconf[i], clone);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf(stderr, "WL_DRM: SET OUTPUT NOT CLONED !!\n");
|
||||||
|
ecore_evas_output_clone_set(e_comp->ee, outconf[i], NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("RRR: crtc off: %i\n", i);
|
printf("RRR: crtc off: %i\n", i);
|
||||||
/* FIXME: Need new drm2 API to disable crtc...
|
|
||||||
* one which Does Not Take an Output as param */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -724,17 +737,9 @@ _drm2_randr_apply(void)
|
||||||
if (nh > maxh) nh = maxh;
|
if (nh > maxh) nh = maxh;
|
||||||
if (nw < minw) nw = minw;
|
if (nw < minw) nw = minw;
|
||||||
if (nh < minh) nh = minh;
|
if (nh < minh) nh = minh;
|
||||||
printf("RRR: set vsize: %ix%i, rot=%i\n", nw, nh, ecore_evas_rotation_get(e_comp->ee));
|
printf("RRR: set vsize: %ix%i\n", nw, nh);
|
||||||
ecore_drm2_device_calibrate(dev, nw, nh);
|
ecore_drm2_device_calibrate(dev, nw, nh);
|
||||||
rot = ecore_evas_rotation_get(e_comp->ee);
|
|
||||||
if ((rot == 90) || (rot == 270))
|
|
||||||
ecore_drm2_device_pointer_max_set(dev, nh, nw);
|
|
||||||
else
|
|
||||||
ecore_drm2_device_pointer_max_set(dev, nw, nh);
|
ecore_drm2_device_pointer_max_set(dev, nw, nh);
|
||||||
ecore_drm2_device_pointer_rotation_set(dev, rot);
|
|
||||||
|
|
||||||
if (!e_randr2_cfg->ignore_hotplug_events)
|
|
||||||
e_randr2_screen_refresh_queue(EINA_FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue