stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2e6323b3d4c6c5c3d1a1fb1165f64111ea49c0e8

commit 2e6323b3d4c6c5c3d1a1fb1165f64111ea49c0e8
Author: Stefan Schmidt <[email protected]>
Date:   Wed Jun 10 14:12:59 2020 +0200

    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 <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D11965
---
 src/lib/ecore_drm/ecore_drm_output.c | 11 ++++++++---
 1 file 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)
 
    /* 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)

-- 


Reply via email to