xserver: Branch 'server-1.5-branch'

Dave Airlie airlied at kemper.freedesktop.org
Thu Jul 3 02:08:31 PDT 2008


 hw/xfree86/modes/xf86Crtc.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 793ff6754e9ff16714a2dd9fa5ae83d7189d316e
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Jul 3 18:57:09 2008 +1000

    modes: check the crtc is valid before using its desired modes.
    
    this fixes a crash I was getting on radeon rotate when gnome is running.
    I'm sure g-s-d was doing something bad, but really not crashing ftw.
    (cherry picked from commit 1771edcb44b564f83f509748b4e4cd5b7586e2a8)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 17cf745..ea452df 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1705,9 +1705,11 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
     /* Set scrn->modes to the mode list for the 'compat' output */
     scrn->modes = xf86DuplicateModes(scrn, output->probed_modes);
 
-    for (mode = scrn->modes; mode; mode = mode->next)
-	if (xf86ModesEqual (mode, &crtc->desiredMode))
-	    break;
+    if (crtc) {
+	for (mode = scrn->modes; mode; mode = mode->next)
+	    if (xf86ModesEqual (mode, &crtc->desiredMode))
+		break;
+    }
 
     if (scrn->modes != NULL) {
 	/* For some reason, scrn->modes is circular, unlike the other mode


More information about the xorg-commit mailing list