Skip to content

Commit

Permalink
drm/mgag200: Add missing write to index before accessing data register
Browse files Browse the repository at this point in the history
This is a bug fix for some versions of g200se cards while doing
mode-setting.

Signed-off-by: Christopher Harvey <charvey@matrox.com>
Tested-by: Julia Lemire <jlemire@matrox.com>
Acked-by: Julia Lemire <jlemire@matrox.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@gmail.com>
  • Loading branch information
Christopher Harvey authored and Dave Airlie committed Jun 3, 2013
1 parent b06f6a9 commit 91f8f10
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/gpu/drm/mgag200/mgag200_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,13 +1034,14 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
else
hi_pri_lvl = 5;

WREG8(0x1fde, 0x06);
WREG8(0x1fdf, hi_pri_lvl);
WREG8(MGAREG_CRTCEXT_INDEX, 0x06);
WREG8(MGAREG_CRTCEXT_DATA, hi_pri_lvl);
} else {
WREG8(MGAREG_CRTCEXT_INDEX, 0x06);
if (mdev->reg_1e24 >= 0x01)
WREG8(0x1fdf, 0x03);
WREG8(MGAREG_CRTCEXT_DATA, 0x03);
else
WREG8(0x1fdf, 0x04);
WREG8(MGAREG_CRTCEXT_DATA, 0x04);
}
}
return 0;
Expand Down

0 comments on commit 91f8f10

Please sign in to comment.