Commit 6547fef8 authored by Paulo Zanoni's avatar Paulo Zanoni Committed by Daniel Vetter

drm/i915: add DP support to intel_enable_ddi

We should only write the DDI_BUF_CTL at this point for HDMI/DVI. For
DP we need to do this earlier, and the values written to the register
are also different.
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 fe43d3f5
...@@ -1122,18 +1122,21 @@ void intel_ddi_post_disable(struct intel_encoder *intel_encoder) ...@@ -1122,18 +1122,21 @@ void intel_ddi_post_disable(struct intel_encoder *intel_encoder)
I915_WRITE(PORT_CLK_SEL(port), PORT_CLK_SEL_NONE); I915_WRITE(PORT_CLK_SEL(port), PORT_CLK_SEL_NONE);
} }
void intel_enable_ddi(struct intel_encoder *encoder) void intel_enable_ddi(struct intel_encoder *intel_encoder)
{ {
struct drm_device *dev = encoder->base.dev; struct drm_encoder *encoder = &intel_encoder->base;
struct drm_device *dev = encoder->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(intel_encoder);
int port = intel_hdmi->ddi_port; int type = intel_encoder->type;
/* Enable DDI_BUF_CTL. In HDMI/DVI mode, the port width, if (type == INTEL_OUTPUT_HDMI) {
* and swing/emphasis values are ignored so nothing special needs /* In HDMI/DVI mode, the port width, and swing/emphasis values
* to be done besides enabling the port. * are ignored so nothing special needs to be done besides
*/ * enabling the port.
I915_WRITE(DDI_BUF_CTL(port), DDI_BUF_CTL_ENABLE); */
I915_WRITE(DDI_BUF_CTL(port), DDI_BUF_CTL_ENABLE);
}
} }
void intel_disable_ddi(struct intel_encoder *encoder) void intel_disable_ddi(struct intel_encoder *encoder)
......
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