summaryrefslogtreecommitdiff
path: root/linux-core/intel_crt.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-03-11 20:29:37 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2008-03-11 20:30:25 +0000
commit903d9231d6f998657cc80ee6f20ded4df68e691b (patch)
tree594b3c4465fb938e4baf145930662eff2a13cf83 /linux-core/intel_crt.c
parent5a7f4b3074d5cda909fc7329bc91da11d89181e1 (diff)
Add support for monitor hotplug signals/waits
Also adjust i915 irq handling as it follows the 16bit'ism's of the i8xx series.
Diffstat (limited to 'linux-core/intel_crt.c')
-rw-r--r--linux-core/intel_crt.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/linux-core/intel_crt.c b/linux-core/intel_crt.c
index a9fb50a3..915e430d 100644
--- a/linux-core/intel_crt.c
+++ b/linux-core/intel_crt.c
@@ -132,7 +132,7 @@ static void intel_crt_mode_set(struct drm_output *output,
/**
* Uses CRT_HOTPLUG_EN and CRT_HOTPLUG_STAT to detect CRT presence.
*
- * Only for I945G/GM.
+ * Not for i915G/i915GM
*
* \return TRUE if CRT is connected.
* \return FALSE if CRT is disconnected.
@@ -142,7 +142,7 @@ static bool intel_crt_detect_hotplug(struct drm_output *output)
struct drm_device *dev = output->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
u32 temp;
-#if 1
+
unsigned long timeout = jiffies + msecs_to_jiffies(1000);
temp = I915_READ(PORT_HOTPLUG_EN);
@@ -161,15 +161,6 @@ static bool intel_crt_detect_hotplug(struct drm_output *output)
return true;
return false;
-#else
- temp = I915_READ(PORT_HOTPLUG_STAT);
- DRM_DEBUG("HST 0x%08x\n", temp);
-
- if (temp & (1 << 8) && temp & (1 << 9))
- return true;
-
- return false;
-#endif
}
static bool intel_crt_detect_ddc(struct drm_output *output)
@@ -187,7 +178,7 @@ static enum drm_output_status intel_crt_detect(struct drm_output *output)
{
struct drm_device *dev = output->dev;
- if (IS_I945G(dev) || IS_I945GM(dev) || IS_I965G(dev)) {
+ if (IS_I9XX(dev) && !IS_I915G(dev) && !IS_I915GM(dev)) {
if (intel_crt_detect_hotplug(output))
return output_status_connected;
else