drm/mgag200: Index 24 in extended CRTC registers is 24 in hex, not decimal.
This change properly enables the "requester" in G200ER cards that is responsible for getting pixels out of memory and clocking them out to the screen. Signed-off-by: Christopher Harvey <charvey@matrox.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
c9cdee1765
commit
1812a3db08
|
@ -751,8 +751,6 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
|
||||||
int i;
|
int i;
|
||||||
unsigned char misc = 0;
|
unsigned char misc = 0;
|
||||||
unsigned char ext_vga[6];
|
unsigned char ext_vga[6];
|
||||||
unsigned char ext_vga_index24;
|
|
||||||
unsigned char dac_index90 = 0;
|
|
||||||
u8 bppshift;
|
u8 bppshift;
|
||||||
|
|
||||||
static unsigned char dacvalue[] = {
|
static unsigned char dacvalue[] = {
|
||||||
|
@ -803,7 +801,6 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
|
||||||
option2 = 0x0000b000;
|
option2 = 0x0000b000;
|
||||||
break;
|
break;
|
||||||
case G200_ER:
|
case G200_ER:
|
||||||
dac_index90 = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -852,10 +849,8 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
|
||||||
WREG_DAC(i, dacvalue[i]);
|
WREG_DAC(i, dacvalue[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mdev->type == G200_ER) {
|
if (mdev->type == G200_ER)
|
||||||
WREG_DAC(0x90, dac_index90);
|
WREG_DAC(0x90, 0);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (option)
|
if (option)
|
||||||
pci_write_config_dword(dev->pdev, PCI_MGA_OPTION, option);
|
pci_write_config_dword(dev->pdev, PCI_MGA_OPTION, option);
|
||||||
|
@ -952,8 +947,6 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
|
||||||
if (mdev->type == G200_WB)
|
if (mdev->type == G200_WB)
|
||||||
ext_vga[1] |= 0x88;
|
ext_vga[1] |= 0x88;
|
||||||
|
|
||||||
ext_vga_index24 = 0x05;
|
|
||||||
|
|
||||||
/* Set pixel clocks */
|
/* Set pixel clocks */
|
||||||
misc = 0x2d;
|
misc = 0x2d;
|
||||||
WREG8(MGA_MISC_OUT, misc);
|
WREG8(MGA_MISC_OUT, misc);
|
||||||
|
@ -965,7 +958,7 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mdev->type == G200_ER)
|
if (mdev->type == G200_ER)
|
||||||
WREG_ECRT(24, ext_vga_index24);
|
WREG_ECRT(0x24, 0x5);
|
||||||
|
|
||||||
if (mdev->type == G200_EV) {
|
if (mdev->type == G200_EV) {
|
||||||
WREG_ECRT(6, 0);
|
WREG_ECRT(6, 0);
|
||||||
|
|
Loading…
Reference in New Issue