summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-07-27 15:35:42 -0400
committerChris Michael <cp.michael@samsung.com>2016-07-27 15:35:42 -0400
commit4431ff01ffc40fc55c0923bee03296f67ee5ef65 (patch)
treed928c1a28e5ae2a9d7b9a63acff816f2423a0f13
parent1bbc23b08634444edee9a19603aaf3360489f483 (diff)
downloadefl-4431ff01ffc40fc55c0923bee03296f67ee5ef65.tar.gz
ecore-drm2: Fix issue of VT-Switching going blank on returns
As it turns out, when we vt-switch Back to a running Enlightenment, it ends up processing all outputs and causes Evas to create a giant canvas to cover all outputs. This new canvas causes a blank screen as the pageflipping fails (due to fb being too large). As we do not yet support output on more an one screen anyway, temporarily disable any output which is not marked as primary. Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 1eb50d692e..f44bee8d23 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -83,6 +83,8 @@ _output_event_send(Ecore_Drm2_Output *output)
{
Ecore_Drm2_Event_Output_Changed *ev;
+ if ((!output->enabled) && (!output->connected)) return;
+
ev = calloc(1, sizeof(Ecore_Drm2_Event_Output_Changed));
if (!ev) return;
@@ -594,6 +596,12 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne
if (!eina_list_count(dev->outputs))
output->primary = EINA_TRUE;
+ else
+ {
+ /* temporarily disable other outputs which are not primary */
+ output->connected = EINA_FALSE;
+ output->enabled = EINA_FALSE;
+ }
dev->alloc.crtc |= (1 << output->crtc_id);
dev->alloc.conn |= (1 << output->conn_id);
@@ -979,16 +987,29 @@ ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, Eina_Bool enabled)
{
EINA_SAFETY_ON_NULL_RETURN(output);
+ if (!output->connected) return;
if (output->enabled == enabled) return;
output->enabled = enabled;
if (output->enabled)
- ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_ON);
+ {
+ Ecore_Drm2_Fb *fb;
+
+ if (output->current) fb = output->current;
+ else if (output->next) fb = output->next;
+
+ drmModeSetCrtc(output->fd, output->crtc_id, fb->id,
+ output->x, output->y,
+ &output->conn_id, 1,
+ &output->current_mode->info);
+
+ ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_ON);
+ }
else
{
ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_OFF);
output->current = NULL;
- output->next = NULL;
+ /* output->next = NULL; */
}
_output_event_send(output);