xf86-video-ati: Branch 'master'

Michel Dänzer daenzer at kemper.freedesktop.org
Mon Oct 26 02:38:38 PDT 2015


 src/drmmode_display.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 7186a8713ba004de4991f21c1a9fc4abc62aeff4
Author: Stephen Chandler Paul <cpaul at redhat.com>
Date:   Fri Oct 23 09:59:36 2015 -0400

    Handle failures in setting a CRTC to a DRM mode properly
    
    This fixes a bug where running the card out of PPLL's when hotplugging
    another monitor would result in all of the displays going blank and
    failing to work properly until X was restarted or the user switched to
    another VT.
    
    [Michel Dänzer: Pass errno instead of -ret to strerror()]
    
    Signed-off-by: Stephen Chandler Paul <cpaul at redhat.com>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 64e79d4..3a3f407 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -760,12 +760,15 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 				radeon_bo_wait(drmmode_crtc->scanout[0].bo);
 			}
 		}
-		ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
-				     fb_id, x, y, output_ids, output_count, &kmode);
-		if (ret)
+		if (drmModeSetCrtc(drmmode->fd,
+				   drmmode_crtc->mode_crtc->crtc_id,
+				   fb_id, x, y, output_ids,
+				   output_count, &kmode) != 0) {
 			xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
-				   "failed to set mode: %s", strerror(-ret));
-		else
+				   "failed to set mode: %s", strerror(errno));
+			ret = FALSE;
+			goto done;
+		} else
 			ret = TRUE;
 
 		if (crtc->scrn->pScreen)


More information about the xorg-commit mailing list