ecore_drm: check return of drmModeSetCrtc()

Report if we fail to reset the Crtc during output free. Only print an
error and keep going with the rest of the output free.

CID: 1402668

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11965
This commit is contained in:
Stefan Schmidt 2020-06-10 14:12:59 +02:00
parent 9e99fc2e3f
commit 2e6323b3d4
1 changed files with 8 additions and 3 deletions

View File

@ -716,9 +716,14 @@ _ecore_drm_output_free(Ecore_Drm_Output *output)
/* restore crtc state */
if (output->crtc)
drmModeSetCrtc(output->dev->drm.fd, output->crtc->crtc_id,
output->crtc->buffer_id, output->crtc->x, output->crtc->y,
&output->conn_id, 1, &output->crtc->mode);
{
if (drmModeSetCrtc(output->dev->drm.fd, output->crtc->crtc_id,
output->crtc->buffer_id, output->crtc->x, output->crtc->y,
&output->conn_id, 1, &output->crtc->mode))
{
ERR("Failed to restore Crtc state for output %s: %m", output->name);
}
}
/* free modes */
EINA_LIST_FREE(output->modes, mode)