Comment 33 for bug 135093

Revision history for this message
In , Hong-liu (hong-liu) wrote :

Would you please try the following patch to see if the problem is fixed?

Thanks,
Hong

diff --git a/src/i830_crt.c b/src/i830_crt.c
index d7762a0..7def610 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -162,9 +162,12 @@ i830_crt_detect_hotplug(xf86OutputPtr output)
     const int timeout_ms = 1000;
     int starttime, curtime;

- temp = INREG(PORT_HOTPLUG_EN);
+ /* clear the CRT hotplug status bits first */
+ OUTREG(PORT_HOTPLUG_STAT, CRT_HOTPLUG_MONITOR_MASK);

- OUTREG(PORT_HOTPLUG_EN, temp | CRT_HOTPLUG_FORCE_DETECT | (1 << 5));
+ temp = INREG(PORT_HOTPLUG_EN);
+ OUTREG(PORT_HOTPLUG_EN,
+ temp | CRT_HOTPLUG_FORCE_DETECT | (1 << 5) | CRT_HOTPLUG_INT_EN);

     for (curtime = starttime = GetTimeInMillis();
         (curtime - starttime) < timeout_ms; curtime = GetTimeInMillis())