diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-09-26 09:53:03 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-09-26 09:53:03 +0800 |
commit | d6b2696f9ac14a81598e0147698209ad428fd45d (patch) | |
tree | f507dd21878085fe63b6ef21e76a78f1784da629 | |
parent | d8a007b056e3d6c3e132ecac06368b21d2ac4123 (diff) |
Do force CRT detect sequence twice on 4 series chipset
-rw-r--r-- | src/i830_crt.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/i830_crt.c b/src/i830_crt.c index 5812e2b7..2e70eb8d 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 need to be done twice for safe. */ + if (IS_G4X(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) { |