summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-01-19 12:37:12 -0500
committerChris Michael <cp.michael@samsung.com>2015-01-19 12:48:41 -0500
commit21b34d4d8488b8bf62eb6bf2deaed9df4291821b (patch)
tree6690c7c0aa1b34654bdc74f8d13f6b815ba964f9 /src/lib/ecore_drm
parentd38462f2ebdcbb928fb459fc0ac9db0a07bce31a (diff)
ecore-drm: Reset output cursor and crtc mode on shutdown
Summary: When we shutdown outputs, we should reset the hardware cursor state and the saved crtc mode in order to reset things back to normal. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index 590a1d345a..cf726946e7 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -406,6 +406,15 @@ _ecore_drm_output_free(Ecore_Drm_Output *output)
406 if (output->backlight) 406 if (output->backlight)
407 _ecore_drm_output_backlight_shutdown(output->backlight); 407 _ecore_drm_output_backlight_shutdown(output->backlight);
408 408
409 /* turn off hardware cursor */
410 drmModeSetCursor(output->drm_fd, output->crtc_id, 0, 0, 0);
411
412 /* restore crtc state */
413 if (output->crtc)
414 drmModeSetCrtc(output->drm_fd, output->crtc->crtc_id,
415 output->crtc->buffer_id, output->crtc->x, output->crtc->y,
416 &output->conn_id, 1, &output->crtc->mode);
417
409 /* free modes */ 418 /* free modes */
410 EINA_LIST_FREE(output->modes, mode) 419 EINA_LIST_FREE(output->modes, mode)
411 free(mode); 420 free(mode);
@@ -810,6 +819,8 @@ ecore_drm_output_repaint(Ecore_Drm_Output *output)
810 if (ret) goto err; 819 if (ret) goto err;
811 } 820 }
812 821
822 /* TODO: set dpms to on */
823
813 if (drmModePageFlip(output->dev->drm.fd, output->crtc_id, output->next->id, 824 if (drmModePageFlip(output->dev->drm.fd, output->crtc_id, output->next->id,
814 DRM_MODE_PAGE_FLIP_EVENT, output) < 0) 825 DRM_MODE_PAGE_FLIP_EVENT, output) < 0)
815 { 826 {