summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-07-04 09:41:24 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-07-04 09:41:24 +0000
commit20b1300d1626d77d2e32e988e5e7e9b50438ca23 (patch)
tree83983d6f45be3a244b0658db730918a0dc89e3b9 /sys
parentd0feda9092b697afd26edc72c0a682e51e52ab5c (diff)
Fix sdvo connector get_hw_state function
from linux 3.8.13
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/intel_sdvo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/intel_sdvo.c b/sys/dev/pci/drm/i915/intel_sdvo.c
index 7899b73be53..b1136822c35 100644
--- a/sys/dev/pci/drm/i915/intel_sdvo.c
+++ b/sys/dev/pci/drm/i915/intel_sdvo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_sdvo.c,v 1.6 2013/03/31 14:18:38 kettenis Exp $ */
+/* $OpenBSD: intel_sdvo.c,v 1.7 2013/07/04 09:41:23 jsg Exp $ */
/*
* Copyright 2006 Dave Airlie <airlied@linux.ie>
* Copyright © 2006-2007 Intel Corporation
@@ -1370,8 +1370,12 @@ intel_sdvo_connector_get_hw_state(struct intel_connector *connector)
struct intel_sdvo_connector *intel_sdvo_connector =
to_intel_sdvo_connector(&connector->base);
struct intel_sdvo *intel_sdvo = intel_attached_sdvo(&connector->base);
+ struct drm_i915_private *dev_priv = intel_sdvo->base.base.dev->dev_private;
u16 active_outputs;
+ if (!(I915_READ(intel_sdvo->sdvo_reg) & SDVO_ENABLE))
+ return false;
+
intel_sdvo_get_active_outputs(intel_sdvo, &active_outputs);
if (active_outputs & intel_sdvo_connector->output_flag)