提交 434ed097 编写于 作者: J Jesse Barnes 提交者: Chris Wilson

drm/i915: set dither bits on eDP panels too

We really need a macro to test whether a given connector has a panel
attached rather than sprinkling HAS_PCH_SPLIT/IS_eDP/has_edp_encoder
etc all over. In the meantime, fix the bug...
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
[ickle: tidy up the duplicity in the conditionals]
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
上级 4f0d1aff
...@@ -3909,11 +3909,6 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3909,11 +3909,6 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
udelay(150); udelay(150);
} }
if (HAS_PCH_SPLIT(dev)) {
pipeconf &= ~PIPECONF_DITHER_EN;
pipeconf &= ~PIPECONF_DITHER_TYPE_MASK;
}
/* The LVDS pin pair needs to be on before the DPLLs are enabled. /* The LVDS pin pair needs to be on before the DPLLs are enabled.
* This is an exception to the general rule that mode_set doesn't turn * This is an exception to the general rule that mode_set doesn't turn
* things on. * things on.
...@@ -3951,23 +3946,27 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3951,23 +3946,27 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
* appropriately here, but we need to look more thoroughly into how * appropriately here, but we need to look more thoroughly into how
* panels behave in the two modes. * panels behave in the two modes.
*/ */
/* set the dithering flag */ /* set the dithering flag on non-PCH LVDS as needed */
if (IS_I965G(dev)) { if (IS_I965G(dev) && !HAS_PCH_SPLIT(dev)) {
if (dev_priv->lvds_dither) { if (dev_priv->lvds_dither)
if (HAS_PCH_SPLIT(dev)) { lvds |= LVDS_ENABLE_DITHER;
pipeconf |= PIPECONF_DITHER_EN; else
pipeconf |= PIPECONF_DITHER_TYPE_ST1; lvds &= ~LVDS_ENABLE_DITHER;
} else
lvds |= LVDS_ENABLE_DITHER;
} else {
if (!HAS_PCH_SPLIT(dev)) {
lvds &= ~LVDS_ENABLE_DITHER;
}
}
} }
I915_WRITE(lvds_reg, lvds); I915_WRITE(lvds_reg, lvds);
I915_READ(lvds_reg); I915_READ(lvds_reg);
} }
/* set the dithering flag and clear for anything other than a panel. */
if (HAS_PCH_SPLIT(dev)) {
pipeconf &= ~PIPECONF_DITHER_EN;
pipeconf &= ~PIPECONF_DITHER_TYPE_MASK;
if (dev_priv->lvds_dither && (is_lvds || has_edp_encoder)) {
pipeconf |= PIPECONF_DITHER_EN;
pipeconf |= PIPECONF_DITHER_TYPE_ST1;
}
}
if (is_dp) if (is_dp)
intel_dp_set_m_n(crtc, mode, adjusted_mode); intel_dp_set_m_n(crtc, mode, adjusted_mode);
else if (HAS_PCH_SPLIT(dev)) { else if (HAS_PCH_SPLIT(dev)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册