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>
This commit is contained in:
Chris Michael 2015-01-19 12:37:12 -05:00
parent d38462f2eb
commit 21b34d4d84
1 changed files with 11 additions and 0 deletions

View File

@ -406,6 +406,15 @@ _ecore_drm_output_free(Ecore_Drm_Output *output)
if (output->backlight)
_ecore_drm_output_backlight_shutdown(output->backlight);
/* turn off hardware cursor */
drmModeSetCursor(output->drm_fd, output->crtc_id, 0, 0, 0);
/* restore crtc state */
if (output->crtc)
drmModeSetCrtc(output->drm_fd, output->crtc->crtc_id,
output->crtc->buffer_id, output->crtc->x, output->crtc->y,
&output->conn_id, 1, &output->crtc->mode);
/* free modes */
EINA_LIST_FREE(output->modes, mode)
free(mode);
@ -810,6 +819,8 @@ ecore_drm_output_repaint(Ecore_Drm_Output *output)
if (ret) goto err;
}
/* TODO: set dpms to on */
if (drmModePageFlip(output->dev->drm.fd, output->crtc_id, output->next->id,
DRM_MODE_PAGE_FLIP_EVENT, output) < 0)
{