aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dvo.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-06-05 12:15:52 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-06-13 09:17:37 -0400
commitf417c11b8987245826aa8b2b606ce2f9d5edbd67 (patch)
tree05e8a16766e3404c1755c0d4d8b1581cb74acf71 /drivers/gpu/drm/i915/intel_dvo.c
parente0f0273eb9a61a99fed3e49c1e673bb73a45d8c7 (diff)
drm/i915: Don't get hw state from DVO chip unless DVO is enabled
Certain DVO chips (ns2501 for example) don't like to be accessed unless the PLL is running. Simply skip the DVO get_hw_state if the DVO port is disabled. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dvo.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dvo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index a3631c0a5c28..5d7d97522bdc 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -112,7 +112,15 @@ static struct intel_dvo *intel_attached_dvo(struct drm_connector *connector)
112 112
113static bool intel_dvo_connector_get_hw_state(struct intel_connector *connector) 113static bool intel_dvo_connector_get_hw_state(struct intel_connector *connector)
114{ 114{
115 struct drm_device *dev = connector->base.dev;
116 struct drm_i915_private *dev_priv = dev->dev_private;
115 struct intel_dvo *intel_dvo = intel_attached_dvo(&connector->base); 117 struct intel_dvo *intel_dvo = intel_attached_dvo(&connector->base);
118 u32 tmp;
119
120 tmp = I915_READ(intel_dvo->dev.dvo_reg);
121
122 if (!(tmp & DVO_ENABLE))
123 return false;
116 124
117 return intel_dvo->dev.dev_ops->get_hw_state(&intel_dvo->dev); 125 return intel_dvo->dev.dev_ops->get_hw_state(&intel_dvo->dev);
118} 126}