summaryrefslogtreecommitdiff
path: root/src/i830_crt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_crt.c')
-rw-r--r--src/i830_crt.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/i830_crt.c b/src/i830_crt.c
index 82a774aa..4c192271 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -353,11 +353,9 @@ i830_crt_detect(xf86OutputPtr output)
Bool connected;
crtc = i830GetLoadDetectPipe (output, NULL, &dpms_mode);
- if (!crtc)
- return XF86OutputStatusUnknown;
- if (IS_I945G(pI830) || IS_I945GM(pI830) || IS_I965G(pI830) ||
- IS_G33CLASS(pI830)) {
+ if (crtc && (IS_I945G(pI830) || IS_I945GM(pI830) || IS_I965G(pI830) ||
+ IS_G33CLASS(pI830))) {
if (i830_crt_detect_hotplug(output))
status = XF86OutputStatusConnected;
else
@@ -371,6 +369,9 @@ i830_crt_detect(xf86OutputPtr output)
goto out;
}
+ if (!crtc)
+ return XF86OutputStatusUnknown;
+
/* Use the load-detect method if we have no other way of telling. */
connected = i830_crt_detect_load (crtc, output);
if (connected)
@@ -379,7 +380,8 @@ i830_crt_detect(xf86OutputPtr output)
status = XF86OutputStatusDisconnected;
out:
- i830ReleaseLoadDetectPipe (output, dpms_mode);
+ if (crtc)
+ i830ReleaseLoadDetectPipe (output, dpms_mode);
return status;
}