xf86-video-intel: Branch 'modesetting' - src/i830_randr.c

Keith Packard keithp at kemper.freedesktop.org
Fri Dec 1 09:21:46 EET 2006


 src/i830_randr.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

New commits:
diff-tree 7642da82781826cb3b45078750cc54d8f592893a (from de50ca9ed9e78c17be1badec62e35ed5e4d62b05)
Author: Keith Packard <keithp at ukulele.keithp.com>
Date:   Thu Nov 30 23:21:39 2006 -0800

    When CRTC is disable through RandR, the mode is NULL. Don't dereference it.
    
    Correctly interpret mode == NULL as CRTC disable, make sure the CRTC is
    disabled in this case.

diff --git a/src/i830_randr.c b/src/i830_randr.c
index 9ac54b5..373403f 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -550,7 +550,9 @@ xf86RandR12CrtcSet (ScreenPtr	pScreen,
     xf86CrtcPtr	save_crtcs[MAX_OUTPUTS];
     Bool		save_enabled = crtc->enabled;
 
-    if (!xf86ModesEqual (&crtc->curMode, mode))
+    if ((mode != NULL) != crtc->enabled)
+	changed = TRUE;
+    else if (mode && !xf86ModesEqual (&crtc->curMode, mode))
 	changed = TRUE;
     
     for (o = 0; o < pI830->xf86_config.num_output; o++) 



More information about the xorg-commit mailing list