提交 91f8f105 编写于 作者: C Christopher Harvey 提交者: Dave Airlie

drm/mgag200: Add missing write to index before accessing data register

This is a bug fix for some versions of g200se cards while doing
mode-setting.
Signed-off-by: NChristopher Harvey <charvey@matrox.com>
Tested-by: NJulia Lemire <jlemire@matrox.com>
Acked-by: NJulia Lemire <jlemire@matrox.com>
Cc: stable@vger.kernel.org
Signed-off-by: NDave Airlie <airlied@gmail.com>
上级 b06f6a9d
...@@ -1034,13 +1034,14 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc, ...@@ -1034,13 +1034,14 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
else else
hi_pri_lvl = 5; hi_pri_lvl = 5;
WREG8(0x1fde, 0x06); WREG8(MGAREG_CRTCEXT_INDEX, 0x06);
WREG8(0x1fdf, hi_pri_lvl); WREG8(MGAREG_CRTCEXT_DATA, hi_pri_lvl);
} else { } else {
WREG8(MGAREG_CRTCEXT_INDEX, 0x06);
if (mdev->reg_1e24 >= 0x01) if (mdev->reg_1e24 >= 0x01)
WREG8(0x1fdf, 0x03); WREG8(MGAREG_CRTCEXT_DATA, 0x03);
else else
WREG8(0x1fdf, 0x04); WREG8(MGAREG_CRTCEXT_DATA, 0x04);
} }
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册