summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2008-08-20 14:40:29 -0700
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-09-11 15:45:33 +0800
commit95fe53b9fa5f44a1adb909909d609463d68578c2 (patch)
treeb60d1d9185c28279116b6baf8b04d2789862180d
parent2f6466a234dd696e1206085579d92807dbd3d3ef (diff)
Don't allocate a pipe for hotplug detection
It shouldn't be needed... (cherry picked from commit 7b6f4d22211d71480caf6335a3eacaacff369371)
-rw-r--r--src/i830_crt.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/i830_crt.c b/src/i830_crt.c
index 2a99f9c7..8274c0cc 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -352,10 +352,9 @@ i830_crt_detect(xf86OutputPtr output)
xf86OutputStatus status;
Bool connected;
- crtc = i830GetLoadDetectPipe (output, NULL, &dpms_mode);
- if (!crtc)
- return XF86OutputStatusUnknown;
-
+ /*
+ * Try hotplug detection where supported
+ */
if (IS_I945G(pI830) || IS_I945GM(pI830) || IS_I965G(pI830) ||
IS_G33CLASS(pI830)) {
if (i830_crt_detect_hotplug(output))
@@ -363,12 +362,19 @@ i830_crt_detect(xf86OutputPtr output)
else
status = XF86OutputStatusDisconnected;
- goto out;
+ goto done;
}
+ /*
+ * DDC is next best, no flicker
+ */
+ crtc = i830GetLoadDetectPipe (output, NULL, &dpms_mode);
+ if (!crtc)
+ return XF86OutputStatusUnknown;
+
if (i830_crt_detect_ddc(output)) {
status = XF86OutputStatusConnected;
- goto out;
+ goto out_release_pipe;
}
/* Use the load-detect method if we have no other way of telling. */
@@ -378,9 +384,10 @@ i830_crt_detect(xf86OutputPtr output)
else
status = XF86OutputStatusDisconnected;
-out:
+out_release_pipe:
i830ReleaseLoadDetectPipe (output, dpms_mode);
+done:
return status;
}