Commit fe43d3f5 authored by Paulo Zanoni's avatar Paulo Zanoni Committed by Daniel Vetter

drm/i915: add DP support to intel_ddi_get_hw_state

Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 0bdee30e
...@@ -987,11 +987,11 @@ bool intel_ddi_get_hw_state(struct intel_encoder *encoder, ...@@ -987,11 +987,11 @@ bool intel_ddi_get_hw_state(struct intel_encoder *encoder,
{ {
struct drm_device *dev = encoder->base.dev; struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); enum port port = intel_ddi_get_encoder_port(encoder);
u32 tmp; u32 tmp;
int i; int i;
tmp = I915_READ(DDI_BUF_CTL(intel_hdmi->ddi_port)); tmp = I915_READ(DDI_BUF_CTL(port));
if (!(tmp & DDI_BUF_CTL_ENABLE)) if (!(tmp & DDI_BUF_CTL_ENABLE))
return false; return false;
...@@ -1000,13 +1000,13 @@ bool intel_ddi_get_hw_state(struct intel_encoder *encoder, ...@@ -1000,13 +1000,13 @@ bool intel_ddi_get_hw_state(struct intel_encoder *encoder,
tmp = I915_READ(DDI_FUNC_CTL(i)); tmp = I915_READ(DDI_FUNC_CTL(i));
if ((tmp & PIPE_DDI_PORT_MASK) if ((tmp & PIPE_DDI_PORT_MASK)
== PIPE_DDI_SELECT_PORT(intel_hdmi->ddi_port)) { == PIPE_DDI_SELECT_PORT(port)) {
*pipe = i; *pipe = i;
return true; return true;
} }
} }
DRM_DEBUG_KMS("No pipe for ddi port %i found\n", intel_hdmi->ddi_port); DRM_DEBUG_KMS("No pipe for ddi port %i found\n", port);
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment