diff --git a/src/i830_crt.c b/src/i830_crt.c index 8274c0c..47f518c 100644 --- a/src/i830_crt.c +++ b/src/i830_crt.c @@ -161,6 +161,14 @@ i830_crt_detect_hotplug(xf86OutputPtr output) uint32_t temp; const int timeout_ms = 1000; int starttime, curtime; + int tries = 1; + + /* On 4 series, CRT detect sequence might to be done twice. */ + if (IS_G4X(pI830) || IS_GM45(pI830)) + tries = 2; + +retry: + tries--; temp = INREG(PORT_HOTPLUG_EN); @@ -173,6 +181,9 @@ i830_crt_detect_hotplug(xf86OutputPtr output) break; } + if (tries > 0) + goto retry; + if ((INREG(PORT_HOTPLUG_STAT) & CRT_HOTPLUG_MONITOR_MASK) == CRT_HOTPLUG_MONITOR_COLOR) {