aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/tridentfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tridentfb.c')
-rw-r--r--drivers/video/tridentfb.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
index e79788a778fe..9668be881fe3 100644
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -87,7 +87,17 @@ MODULE_PARM_DESC(crt, "Define if CRT is connected");
87 87
88static int is_oldclock(int id) 88static int is_oldclock(int id)
89{ 89{
90 return (id == TGUI9660); 90 return (id == TGUI9660) ||
91 (id == CYBER9320);
92}
93
94static int is_oldprotect(int id)
95{
96 return (id == TGUI9660) ||
97 (id == PROVIDIA9685) ||
98 (id == CYBER9320) ||
99 (id == CYBER9382) ||
100 (id == CYBER9385);
91} 101}
92 102
93static int is_blade(int id) 103static int is_blade(int id)
@@ -143,6 +153,7 @@ static int iscyber(int id)
143 153
144 case CYBER9320: 154 case CYBER9320:
145 case TGUI9660: 155 case TGUI9660:
156 case PROVIDIA9685:
146 case IMAGE975: 157 case IMAGE975:
147 case IMAGE985: 158 case IMAGE985:
148 case BLADE3D: 159 case BLADE3D:
@@ -905,14 +916,14 @@ static int tridentfb_set_par(struct fb_info *info)
905 hsyncend = (var->xres + var->right_margin + var->hsync_len) / 8 - 1; 916 hsyncend = (var->xres + var->right_margin + var->hsync_len) / 8 - 1;
906 htotal = (var->xres + var->left_margin + var->right_margin + 917 htotal = (var->xres + var->left_margin + var->right_margin +
907 var->hsync_len) / 8 - 5; 918 var->hsync_len) / 8 - 5;
908 hblankstart = hdispend + 2; 919 hblankstart = hdispend + 1;
909 hblankend = htotal + 3; 920 hblankend = htotal + 3;
910 921
911 vdispend = var->yres - 1; 922 vdispend = var->yres - 1;
912 vsyncstart = var->yres + var->lower_margin; 923 vsyncstart = var->yres + var->lower_margin;
913 vsyncend = vsyncstart + var->vsync_len; 924 vsyncend = vsyncstart + var->vsync_len;
914 vtotal = var->upper_margin + vsyncend - 2; 925 vtotal = var->upper_margin + vsyncend - 2;
915 vblankstart = vdispend + 2; 926 vblankstart = vdispend + 1;
916 vblankend = vtotal; 927 vblankend = vtotal;
917 928
918 crtc_unlock(par); 929 crtc_unlock(par);
@@ -1020,15 +1031,18 @@ static int tridentfb_set_par(struct fb_info *info)
1020 1031
1021 write3X4(par, PixelBusReg, tmp); 1032 write3X4(par, PixelBusReg, tmp);
1022 1033
1023 tmp = 0x10; 1034 tmp = read3X4(par, DRAMControl);
1035 if (!is_oldprotect(par->chip_id))
1036 tmp |= 0x10;
1024 if (iscyber(par->chip_id)) 1037 if (iscyber(par->chip_id))
1025 tmp |= 0x20; 1038 tmp |= 0x20;
1026 write3X4(par, DRAMControl, tmp); /* both IO, linear enable */ 1039 write3X4(par, DRAMControl, tmp); /* both IO, linear enable */
1027 1040
1028 write3X4(par, InterfaceSel, read3X4(par, InterfaceSel) | 0x40); 1041 write3X4(par, InterfaceSel, read3X4(par, InterfaceSel) | 0x40);
1029 write3X4(par, Performance, 0x92); 1042 if (!is_xp(par->chip_id))
1043 write3X4(par, Performance, read3X4(par, Performance) | 0x10);
1030 /* MMIO & PCI read and write burst enable */ 1044 /* MMIO & PCI read and write burst enable */
1031 write3X4(par, PCIReg, 0x07); 1045 write3X4(par, PCIReg, read3X4(par, PCIReg) | 0x06);
1032 1046
1033 /* convert from picoseconds to kHz */ 1047 /* convert from picoseconds to kHz */
1034 vclk = PICOS2KHZ(info->var.pixclock); 1048 vclk = PICOS2KHZ(info->var.pixclock);
@@ -1230,6 +1244,9 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
1230 revision = vga_io_rseq(RevisionID); 1244 revision = vga_io_rseq(RevisionID);
1231 1245
1232 switch (revision) { 1246 switch (revision) {
1247 case 0x21:
1248 chip_id = PROVIDIA9685;
1249 break;
1233 case 0x22: 1250 case 0x22:
1234 case 0x23: 1251 case 0x23:
1235 chip_id = CYBER9397; 1252 chip_id = CYBER9397;