提交 bb66c512 编写于 作者: Z Zhao Yakui 提交者: Eric Anholt

drm/i915: Write zero to DPLL_MD Reg for non-SDVO output

When the output device is LVDS, maybe the pixel clock of adjusted_mode will be
less than that in mode. In such case it will set the incorrect multipler factor
in DPLL_MD register.
So the dpll_md_reg will be reset when the output type is non-SDVO

https://bugs.freedesktop.org/show_bug.cgi?id=22761Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
Reviewd-by: NEric Anholt <eric@anholt.net>
Signed-off-by: NEric Anholt <eric@anholt.net>
上级 e270846f
...@@ -2652,9 +2652,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -2652,9 +2652,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
udelay(150); udelay(150);
if (IS_I965G(dev) && !IS_IGDNG(dev)) { if (IS_I965G(dev) && !IS_IGDNG(dev)) {
sdvo_pixel_multiply = adjusted_mode->clock / mode->clock; if (is_sdvo) {
I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) | sdvo_pixel_multiply = adjusted_mode->clock / mode->clock;
I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) |
((sdvo_pixel_multiply - 1) << DPLL_MD_UDI_MULTIPLIER_SHIFT)); ((sdvo_pixel_multiply - 1) << DPLL_MD_UDI_MULTIPLIER_SHIFT));
} else
I915_WRITE(dpll_md_reg, 0);
} else { } else {
/* write it again -- the BIOS does, after all */ /* write it again -- the BIOS does, after all */
I915_WRITE(dpll_reg, dpll); I915_WRITE(dpll_reg, dpll);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册