summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm_output.c
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-06-10 14:12:59 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2020-06-10 17:38:55 +0200
commit2e6323b3d4c6c5c3d1a1fb1165f64111ea49c0e8 (patch)
treef1a821eceb9d65e709ddf8b3f7f19831a9a2ca15 /src/lib/ecore_drm/ecore_drm_output.c
parent9e99fc2e3f10a5af900c50f0bab230683080bbe6 (diff)
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
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index 526e0113cd..5fbc809053 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -716,9 +716,14 @@ _ecore_drm_output_free(Ecore_Drm_Output *output)
716 716
717 /* restore crtc state */ 717 /* restore crtc state */
718 if (output->crtc) 718 if (output->crtc)
719 drmModeSetCrtc(output->dev->drm.fd, output->crtc->crtc_id, 719 {
720 output->crtc->buffer_id, output->crtc->x, output->crtc->y, 720 if (drmModeSetCrtc(output->dev->drm.fd, output->crtc->crtc_id,
721 &output->conn_id, 1, &output->crtc->mode); 721 output->crtc->buffer_id, output->crtc->x, output->crtc->y,
722 &output->conn_id, 1, &output->crtc->mode))
723 {
724 ERR("Failed to restore Crtc state for output %s: %m", output->name);
725 }
726 }
722 727
723 /* free modes */ 728 /* free modes */
724 EINA_LIST_FREE(output->modes, mode) 729 EINA_LIST_FREE(output->modes, mode)