xserver: Branch 'master' - 3 commits

Dave Airlie airlied at kemper.freedesktop.org
Sun Mar 18 07:27:12 EET 2007


 hw/xfree86/ddc/xf86DDC.c |    7 ++++++-
 randr/rrcrtc.c           |    2 ++
 randr/rroutput.c         |   10 ++++++++++
 3 files changed, 18 insertions(+), 1 deletion(-)

New commits:
diff-tree 5a7a5fe6fa53196c424031256d4624df0f9d9432 (from c5df5c34ff7d1d14c38a601dc7ef3e17c1202291)
Author: Keith Packard <keithp at neko.keithp.com>
Date:   Sat Mar 17 20:14:05 2007 -0700

    Slow down DDC I2C bus using a RiseFallTime of 20us for old monitors.
    
    This time value makes the bus run slowly enough for even the least reliable
    of monitors. Thanks to Pavel Troller for finding the necessary change.

diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index 0f24c52..8080c8d 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -337,6 +337,12 @@ DDCRead_DDC2(int scrnIndex, I2CBusPtr pB
     unsigned char *R_Buffer;
     int i;
     
+    /*
+     * Slow down the bus so that older monitors don't 
+     * miss things.
+     */
+    pBus->RiseFallTime = 20;
+    
     if (!(dev = xf86I2CFindDev(pBus, 0x00A0))) {
 	dev = xf86CreateI2CDevRec();
 	dev->DevName = "ddc2";
diff-tree c5df5c34ff7d1d14c38a601dc7ef3e17c1202291 (from 49bf6e0715a39be179fd826e6e951d473a5facdd)
Author: Keith Packard <keithp at neko.keithp.com>
Date:   Sat Mar 17 17:26:11 2007 -0700

    Remove extra (and wrong) I2C ByteTimeout setting in DDC code.
    
    The DDC code sets the I2C timeouts to VESA standards, except that it had an
    extra setting of the ByteTimeout value which was wrong (off by a factor of
    50). Removing this should help DDC work on many more monitors. Note that the
    Intel driver duplicated these settings, along with the error. Yay for cult
    and paste coding.

diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index 4ce585c..0f24c52 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -344,7 +344,6 @@ DDCRead_DDC2(int scrnIndex, I2CBusPtr pB
 	dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */
 	dev->StartTimeout = 550;
 	dev->BitTimeout = 40;
-	dev->ByteTimeout = 40;
 	dev->AcknTimeout = 40;
 
 	dev->pI2CBus = pBus;
diff-tree 49bf6e0715a39be179fd826e6e951d473a5facdd (from 3bffb281260476d2f74f0bf451d85d2f7cacd6c4)
Author: Dave Airlie <airlied at linux.ie>
Date:   Sun Mar 18 16:26:21 2007 +1100

    Correct ref counting of RRMode structures
    
    RRModes are referenced by the resource db, RROutput and RRCrtc structures.
    Ensure that the mode reference count is decremented each time a reference is
    lost from one of these sources. The missing destroys were in
    RRCrtcDestroyResource and RROutputDestroyResource, which only happen at
    server reset time, so modes would be unavailable in subsequent server
    generations.
    
    Conflicts:
    
    	randr/rroutput.c

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index db506f4..f5ecc7d 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -361,6 +361,8 @@ RRCrtcDestroyResource (pointer value, XI
     }
     if (crtc->gammaRed)
 	xfree (crtc->gammaRed);
+    if (crtc->mode)
+	RRModeDestroy (crtc->mode);
     xfree (crtc);
     return 1;
 }
diff --git a/randr/rroutput.c b/randr/rroutput.c
index df1741f..88606c9 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -336,7 +336,17 @@ RROutputDestroyResource (pointer value, 
 	}
     }
     if (output->modes)
+    {
+	for (m = 0; m < output->numModes; m++)
+	    RRModeDestroy (output->modes[m]);
 	xfree (output->modes);
+    }
+    
+    for (m = 0; m < output->numUserModes; m++)
+	RRModeDestroy (output->userModes[m]);
+    if (output->userModes)
+	xfree (output->userModes);
+
     if (output->crtcs)
 	xfree (output->crtcs);
     if (output->clones)



More information about the xorg-commit mailing list