aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/hw.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-09-22 19:47:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:53 -0400
commit0306ab11c396f93056009152464ff104e4721817 (patch)
treeb4b2586011d0b2669a2c02897795aacdb74d31d8 /drivers/video/via/hw.c
parent5ff32f69e75deca5ee1a2f421ca8a3e43cfaa339 (diff)
viafb: add support for the VX855 chipset
Add support for a new VIA integrated graphics chipset, the VX855. Signed-off-by: HaraldWelte <HaraldWelte@viatech.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Scott Fang <ScottFang@viatech.com.cn> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/via/hw.c')
-rw-r--r--drivers/video/via/hw.c208
1 files changed, 140 insertions, 68 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index 4910561a9d34..95faf8be47aa 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -33,106 +33,147 @@ static const struct pci_device_id_info pciidlist[] = {
33 {PCI_VIA_VENDOR_ID, UNICHROME_P4M900_DID, UNICHROME_P4M900}, 33 {PCI_VIA_VENDOR_ID, UNICHROME_P4M900_DID, UNICHROME_P4M900},
34 {PCI_VIA_VENDOR_ID, UNICHROME_CN750_DID, UNICHROME_CN750}, 34 {PCI_VIA_VENDOR_ID, UNICHROME_CN750_DID, UNICHROME_CN750},
35 {PCI_VIA_VENDOR_ID, UNICHROME_VX800_DID, UNICHROME_VX800}, 35 {PCI_VIA_VENDOR_ID, UNICHROME_VX800_DID, UNICHROME_VX800},
36 {PCI_VIA_VENDOR_ID, UNICHROME_VX855_DID, UNICHROME_VX855},
36 {0, 0, 0} 37 {0, 0, 0}
37}; 38};
38 39
39static struct pll_map pll_value[] = { 40static struct pll_map pll_value[] = {
40 {CLK_25_175M, CLE266_PLL_25_175M, K800_PLL_25_175M, CX700_25_175M}, 41 {CLK_25_175M, CLE266_PLL_25_175M, K800_PLL_25_175M,
41 {CLK_29_581M, CLE266_PLL_29_581M, K800_PLL_29_581M, CX700_29_581M}, 42 CX700_25_175M, VX855_25_175M},
42 {CLK_26_880M, CLE266_PLL_26_880M, K800_PLL_26_880M, CX700_26_880M}, 43 {CLK_29_581M, CLE266_PLL_29_581M, K800_PLL_29_581M,
43 {CLK_31_490M, CLE266_PLL_31_490M, K800_PLL_31_490M, CX700_31_490M}, 44 CX700_29_581M, VX855_29_581M},
44 {CLK_31_500M, CLE266_PLL_31_500M, K800_PLL_31_500M, CX700_31_500M}, 45 {CLK_26_880M, CLE266_PLL_26_880M, K800_PLL_26_880M,
45 {CLK_31_728M, CLE266_PLL_31_728M, K800_PLL_31_728M, CX700_31_728M}, 46 CX700_26_880M, VX855_26_880M},
46 {CLK_32_668M, CLE266_PLL_32_668M, K800_PLL_32_668M, CX700_32_668M}, 47 {CLK_31_490M, CLE266_PLL_31_490M, K800_PLL_31_490M,
47 {CLK_36_000M, CLE266_PLL_36_000M, K800_PLL_36_000M, CX700_36_000M}, 48 CX700_31_490M, VX855_31_490M},
48 {CLK_40_000M, CLE266_PLL_40_000M, K800_PLL_40_000M, CX700_40_000M}, 49 {CLK_31_500M, CLE266_PLL_31_500M, K800_PLL_31_500M,
49 {CLK_41_291M, CLE266_PLL_41_291M, K800_PLL_41_291M, CX700_41_291M}, 50 CX700_31_500M, VX855_31_500M},
50 {CLK_43_163M, CLE266_PLL_43_163M, K800_PLL_43_163M, CX700_43_163M}, 51 {CLK_31_728M, CLE266_PLL_31_728M, K800_PLL_31_728M,
51 {CLK_45_250M, CLE266_PLL_45_250M, K800_PLL_45_250M, CX700_45_250M}, 52 CX700_31_728M, VX855_31_728M},
52 {CLK_46_000M, CLE266_PLL_46_000M, K800_PLL_46_000M, CX700_46_000M}, 53 {CLK_32_668M, CLE266_PLL_32_668M, K800_PLL_32_668M,
53 {CLK_46_996M, CLE266_PLL_46_996M, K800_PLL_46_996M, CX700_46_996M}, 54 CX700_32_668M, VX855_32_668M},
54 {CLK_48_000M, CLE266_PLL_48_000M, K800_PLL_48_000M, CX700_48_000M}, 55 {CLK_36_000M, CLE266_PLL_36_000M, K800_PLL_36_000M,
55 {CLK_48_875M, CLE266_PLL_48_875M, K800_PLL_48_875M, CX700_48_875M}, 56 CX700_36_000M, VX855_36_000M},
56 {CLK_49_500M, CLE266_PLL_49_500M, K800_PLL_49_500M, CX700_49_500M}, 57 {CLK_40_000M, CLE266_PLL_40_000M, K800_PLL_40_000M,
57 {CLK_52_406M, CLE266_PLL_52_406M, K800_PLL_52_406M, CX700_52_406M}, 58 CX700_40_000M, VX855_40_000M},
58 {CLK_52_977M, CLE266_PLL_52_977M, K800_PLL_52_977M, CX700_52_977M}, 59 {CLK_41_291M, CLE266_PLL_41_291M, K800_PLL_41_291M,
59 {CLK_56_250M, CLE266_PLL_56_250M, K800_PLL_56_250M, CX700_56_250M}, 60 CX700_41_291M, VX855_41_291M},
60 {CLK_60_466M, CLE266_PLL_60_466M, K800_PLL_60_466M, CX700_60_466M}, 61 {CLK_43_163M, CLE266_PLL_43_163M, K800_PLL_43_163M,
61 {CLK_61_500M, CLE266_PLL_61_500M, K800_PLL_61_500M, CX700_61_500M}, 62 CX700_43_163M, VX855_43_163M},
62 {CLK_65_000M, CLE266_PLL_65_000M, K800_PLL_65_000M, CX700_65_000M}, 63 {CLK_45_250M, CLE266_PLL_45_250M, K800_PLL_45_250M,
63 {CLK_65_178M, CLE266_PLL_65_178M, K800_PLL_65_178M, CX700_65_178M}, 64 CX700_45_250M, VX855_45_250M},
64 {CLK_66_750M, CLE266_PLL_66_750M, K800_PLL_66_750M, CX700_66_750M}, 65 {CLK_46_000M, CLE266_PLL_46_000M, K800_PLL_46_000M,
65 {CLK_68_179M, CLE266_PLL_68_179M, K800_PLL_68_179M, CX700_68_179M}, 66 CX700_46_000M, VX855_46_000M},
66 {CLK_69_924M, CLE266_PLL_69_924M, K800_PLL_69_924M, CX700_69_924M}, 67 {CLK_46_996M, CLE266_PLL_46_996M, K800_PLL_46_996M,
67 {CLK_70_159M, CLE266_PLL_70_159M, K800_PLL_70_159M, CX700_70_159M}, 68 CX700_46_996M, VX855_46_996M},
68 {CLK_72_000M, CLE266_PLL_72_000M, K800_PLL_72_000M, CX700_72_000M}, 69 {CLK_48_000M, CLE266_PLL_48_000M, K800_PLL_48_000M,
69 {CLK_78_750M, CLE266_PLL_78_750M, K800_PLL_78_750M, CX700_78_750M}, 70 CX700_48_000M, VX855_48_000M},
70 {CLK_80_136M, CLE266_PLL_80_136M, K800_PLL_80_136M, CX700_80_136M}, 71 {CLK_48_875M, CLE266_PLL_48_875M, K800_PLL_48_875M,
71 {CLK_83_375M, CLE266_PLL_83_375M, K800_PLL_83_375M, CX700_83_375M}, 72 CX700_48_875M, VX855_48_875M},
72 {CLK_83_950M, CLE266_PLL_83_950M, K800_PLL_83_950M, CX700_83_950M}, 73 {CLK_49_500M, CLE266_PLL_49_500M, K800_PLL_49_500M,
73 {CLK_84_750M, CLE266_PLL_84_750M, K800_PLL_84_750M, CX700_84_750M}, 74 CX700_49_500M, VX855_49_500M},
74 {CLK_85_860M, CLE266_PLL_85_860M, K800_PLL_85_860M, CX700_85_860M}, 75 {CLK_52_406M, CLE266_PLL_52_406M, K800_PLL_52_406M,
75 {CLK_88_750M, CLE266_PLL_88_750M, K800_PLL_88_750M, CX700_88_750M}, 76 CX700_52_406M, VX855_52_406M},
76 {CLK_94_500M, CLE266_PLL_94_500M, K800_PLL_94_500M, CX700_94_500M}, 77 {CLK_52_977M, CLE266_PLL_52_977M, K800_PLL_52_977M,
77 {CLK_97_750M, CLE266_PLL_97_750M, K800_PLL_97_750M, CX700_97_750M}, 78 CX700_52_977M, VX855_52_977M},
79 {CLK_56_250M, CLE266_PLL_56_250M, K800_PLL_56_250M,
80 CX700_56_250M, VX855_56_250M},
81 {CLK_60_466M, CLE266_PLL_60_466M, K800_PLL_60_466M,
82 CX700_60_466M, VX855_60_466M},
83 {CLK_61_500M, CLE266_PLL_61_500M, K800_PLL_61_500M,
84 CX700_61_500M, VX855_61_500M},
85 {CLK_65_000M, CLE266_PLL_65_000M, K800_PLL_65_000M,
86 CX700_65_000M, VX855_65_000M},
87 {CLK_65_178M, CLE266_PLL_65_178M, K800_PLL_65_178M,
88 CX700_65_178M, VX855_65_178M},
89 {CLK_66_750M, CLE266_PLL_66_750M, K800_PLL_66_750M,
90 CX700_66_750M, VX855_66_750M},
91 {CLK_68_179M, CLE266_PLL_68_179M, K800_PLL_68_179M,
92 CX700_68_179M, VX855_68_179M},
93 {CLK_69_924M, CLE266_PLL_69_924M, K800_PLL_69_924M,
94 CX700_69_924M, VX855_69_924M},
95 {CLK_70_159M, CLE266_PLL_70_159M, K800_PLL_70_159M,
96 CX700_70_159M, VX855_70_159M},
97 {CLK_72_000M, CLE266_PLL_72_000M, K800_PLL_72_000M,
98 CX700_72_000M, VX855_72_000M},
99 {CLK_78_750M, CLE266_PLL_78_750M, K800_PLL_78_750M,
100 CX700_78_750M, VX855_78_750M},
101 {CLK_80_136M, CLE266_PLL_80_136M, K800_PLL_80_136M,
102 CX700_80_136M, VX855_80_136M},
103 {CLK_83_375M, CLE266_PLL_83_375M, K800_PLL_83_375M,
104 CX700_83_375M, VX855_83_375M},
105 {CLK_83_950M, CLE266_PLL_83_950M, K800_PLL_83_950M,
106 CX700_83_950M, VX855_83_950M},
107 {CLK_84_750M, CLE266_PLL_84_750M, K800_PLL_84_750M,
108 CX700_84_750M, VX855_84_750M},
109 {CLK_85_860M, CLE266_PLL_85_860M, K800_PLL_85_860M,
110 CX700_85_860M, VX855_85_860M},
111 {CLK_88_750M, CLE266_PLL_88_750M, K800_PLL_88_750M,
112 CX700_88_750M, VX855_88_750M},
113 {CLK_94_500M, CLE266_PLL_94_500M, K800_PLL_94_500M,
114 CX700_94_500M, VX855_94_500M},
115 {CLK_97_750M, CLE266_PLL_97_750M, K800_PLL_97_750M,
116 CX700_97_750M, VX855_97_750M},
78 {CLK_101_000M, CLE266_PLL_101_000M, K800_PLL_101_000M, 117 {CLK_101_000M, CLE266_PLL_101_000M, K800_PLL_101_000M,
79 CX700_101_000M}, 118 CX700_101_000M, VX855_101_000M},
80 {CLK_106_500M, CLE266_PLL_106_500M, K800_PLL_106_500M, 119 {CLK_106_500M, CLE266_PLL_106_500M, K800_PLL_106_500M,
81 CX700_106_500M}, 120 CX700_106_500M, VX855_106_500M},
82 {CLK_108_000M, CLE266_PLL_108_000M, K800_PLL_108_000M, 121 {CLK_108_000M, CLE266_PLL_108_000M, K800_PLL_108_000M,
83 CX700_108_000M}, 122 CX700_108_000M, VX855_108_000M},
84 {CLK_113_309M, CLE266_PLL_113_309M, K800_PLL_113_309M, 123 {CLK_113_309M, CLE266_PLL_113_309M, K800_PLL_113_309M,
85 CX700_113_309M}, 124 CX700_113_309M, VX855_113_309M},
86 {CLK_118_840M, CLE266_PLL_118_840M, K800_PLL_118_840M, 125 {CLK_118_840M, CLE266_PLL_118_840M, K800_PLL_118_840M,
87 CX700_118_840M}, 126 CX700_118_840M, VX855_118_840M},
88 {CLK_119_000M, CLE266_PLL_119_000M, K800_PLL_119_000M, 127 {CLK_119_000M, CLE266_PLL_119_000M, K800_PLL_119_000M,
89 CX700_119_000M}, 128 CX700_119_000M, VX855_119_000M},
90 {CLK_121_750M, CLE266_PLL_121_750M, K800_PLL_121_750M, 129 {CLK_121_750M, CLE266_PLL_121_750M, K800_PLL_121_750M,
91 CX700_121_750M}, 130 CX700_121_750M, 0},
92 {CLK_125_104M, CLE266_PLL_125_104M, K800_PLL_125_104M, 131 {CLK_125_104M, CLE266_PLL_125_104M, K800_PLL_125_104M,
93 CX700_125_104M}, 132 CX700_125_104M, 0},
94 {CLK_133_308M, CLE266_PLL_133_308M, K800_PLL_133_308M, 133 {CLK_133_308M, CLE266_PLL_133_308M, K800_PLL_133_308M,
95 CX700_133_308M}, 134 CX700_133_308M, 0},
96 {CLK_135_000M, CLE266_PLL_135_000M, K800_PLL_135_000M, 135 {CLK_135_000M, CLE266_PLL_135_000M, K800_PLL_135_000M,
97 CX700_135_000M}, 136 CX700_135_000M, VX855_135_000M},
98 {CLK_136_700M, CLE266_PLL_136_700M, K800_PLL_136_700M, 137 {CLK_136_700M, CLE266_PLL_136_700M, K800_PLL_136_700M,
99 CX700_136_700M}, 138 CX700_136_700M, VX855_136_700M},
100 {CLK_138_400M, CLE266_PLL_138_400M, K800_PLL_138_400M, 139 {CLK_138_400M, CLE266_PLL_138_400M, K800_PLL_138_400M,
101 CX700_138_400M}, 140 CX700_138_400M, VX855_138_400M},
102 {CLK_146_760M, CLE266_PLL_146_760M, K800_PLL_146_760M, 141 {CLK_146_760M, CLE266_PLL_146_760M, K800_PLL_146_760M,
103 CX700_146_760M}, 142 CX700_146_760M, VX855_146_760M},
104 {CLK_153_920M, CLE266_PLL_153_920M, K800_PLL_153_920M, 143 {CLK_153_920M, CLE266_PLL_153_920M, K800_PLL_153_920M,
105 CX700_153_920M}, 144 CX700_153_920M, VX855_153_920M},
106 {CLK_156_000M, CLE266_PLL_156_000M, K800_PLL_156_000M, 145 {CLK_156_000M, CLE266_PLL_156_000M, K800_PLL_156_000M,
107 CX700_156_000M}, 146 CX700_156_000M, VX855_156_000M},
108 {CLK_157_500M, CLE266_PLL_157_500M, K800_PLL_157_500M, 147 {CLK_157_500M, CLE266_PLL_157_500M, K800_PLL_157_500M,
109 CX700_157_500M}, 148 CX700_157_500M, VX855_157_500M},
110 {CLK_162_000M, CLE266_PLL_162_000M, K800_PLL_162_000M, 149 {CLK_162_000M, CLE266_PLL_162_000M, K800_PLL_162_000M,
111 CX700_162_000M}, 150 CX700_162_000M, VX855_162_000M},
112 {CLK_187_000M, CLE266_PLL_187_000M, K800_PLL_187_000M, 151 {CLK_187_000M, CLE266_PLL_187_000M, K800_PLL_187_000M,
113 CX700_187_000M}, 152 CX700_187_000M, VX855_187_000M},
114 {CLK_193_295M, CLE266_PLL_193_295M, K800_PLL_193_295M, 153 {CLK_193_295M, CLE266_PLL_193_295M, K800_PLL_193_295M,
115 CX700_193_295M}, 154 CX700_193_295M, VX855_193_295M},
116 {CLK_202_500M, CLE266_PLL_202_500M, K800_PLL_202_500M, 155 {CLK_202_500M, CLE266_PLL_202_500M, K800_PLL_202_500M,
117 CX700_202_500M}, 156 CX700_202_500M, VX855_202_500M},
118 {CLK_204_000M, CLE266_PLL_204_000M, K800_PLL_204_000M, 157 {CLK_204_000M, CLE266_PLL_204_000M, K800_PLL_204_000M,
119 CX700_204_000M}, 158 CX700_204_000M, VX855_204_000M},
120 {CLK_218_500M, CLE266_PLL_218_500M, K800_PLL_218_500M, 159 {CLK_218_500M, CLE266_PLL_218_500M, K800_PLL_218_500M,
121 CX700_218_500M}, 160 CX700_218_500M, VX855_218_500M},
122 {CLK_234_000M, CLE266_PLL_234_000M, K800_PLL_234_000M, 161 {CLK_234_000M, CLE266_PLL_234_000M, K800_PLL_234_000M,
123 CX700_234_000M}, 162 CX700_234_000M, VX855_234_000M},
124 {CLK_267_250M, CLE266_PLL_267_250M, K800_PLL_267_250M, 163 {CLK_267_250M, CLE266_PLL_267_250M, K800_PLL_267_250M,
125 CX700_267_250M}, 164 CX700_267_250M, VX855_267_250M},
126 {CLK_297_500M, CLE266_PLL_297_500M, K800_PLL_297_500M, 165 {CLK_297_500M, CLE266_PLL_297_500M, K800_PLL_297_500M,
127 CX700_297_500M}, 166 CX700_297_500M, VX855_297_500M},
128 {CLK_74_481M, CLE266_PLL_74_481M, K800_PLL_74_481M, CX700_74_481M}, 167 {CLK_74_481M, CLE266_PLL_74_481M, K800_PLL_74_481M,
168 CX700_74_481M, VX855_74_481M},
129 {CLK_172_798M, CLE266_PLL_172_798M, K800_PLL_172_798M, 169 {CLK_172_798M, CLE266_PLL_172_798M, K800_PLL_172_798M,
130 CX700_172_798M}, 170 CX700_172_798M, VX855_172_798M},
131 {CLK_122_614M, CLE266_PLL_122_614M, K800_PLL_122_614M, 171 {CLK_122_614M, CLE266_PLL_122_614M, K800_PLL_122_614M,
132 CX700_122_614M}, 172 CX700_122_614M, VX855_122_614M},
133 {CLK_74_270M, CLE266_PLL_74_270M, K800_PLL_74_270M, CX700_74_270M}, 173 {CLK_74_270M, CLE266_PLL_74_270M, K800_PLL_74_270M,
174 CX700_74_270M, 0},
134 {CLK_148_500M, CLE266_PLL_148_500M, K800_PLL_148_500M, 175 {CLK_148_500M, CLE266_PLL_148_500M, K800_PLL_148_500M,
135 CX700_148_500M} 176 CX700_148_500M, VX855_148_500M}
136}; 177};
137 178
138static struct fifo_depth_select display_fifo_depth_reg = { 179static struct fifo_depth_select display_fifo_depth_reg = {
@@ -1219,6 +1260,15 @@ void viafb_load_FIFO_reg(int set_iga, int hor_active, int ver_active)
1219 VX800_IGA1_DISPLAY_QUEUE_EXPIRE_NUM; 1260 VX800_IGA1_DISPLAY_QUEUE_EXPIRE_NUM;
1220 } 1261 }
1221 1262
1263 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_VX855) {
1264 iga1_fifo_max_depth = VX855_IGA1_FIFO_MAX_DEPTH;
1265 iga1_fifo_threshold = VX855_IGA1_FIFO_THRESHOLD;
1266 iga1_fifo_high_threshold =
1267 VX855_IGA1_FIFO_HIGH_THRESHOLD;
1268 iga1_display_queue_expire_num =
1269 VX855_IGA1_DISPLAY_QUEUE_EXPIRE_NUM;
1270 }
1271
1222 /* Set Display FIFO Depath Select */ 1272 /* Set Display FIFO Depath Select */
1223 reg_value = IGA1_FIFO_DEPTH_SELECT_FORMULA(iga1_fifo_max_depth); 1273 reg_value = IGA1_FIFO_DEPTH_SELECT_FORMULA(iga1_fifo_max_depth);
1224 viafb_load_reg_num = 1274 viafb_load_reg_num =
@@ -1350,6 +1400,15 @@ void viafb_load_FIFO_reg(int set_iga, int hor_active, int ver_active)
1350 VX800_IGA2_DISPLAY_QUEUE_EXPIRE_NUM; 1400 VX800_IGA2_DISPLAY_QUEUE_EXPIRE_NUM;
1351 } 1401 }
1352 1402
1403 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_VX855) {
1404 iga2_fifo_max_depth = VX855_IGA2_FIFO_MAX_DEPTH;
1405 iga2_fifo_threshold = VX855_IGA2_FIFO_THRESHOLD;
1406 iga2_fifo_high_threshold =
1407 VX855_IGA2_FIFO_HIGH_THRESHOLD;
1408 iga2_display_queue_expire_num =
1409 VX855_IGA2_DISPLAY_QUEUE_EXPIRE_NUM;
1410 }
1411
1353 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_K800) { 1412 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_K800) {
1354 /* Set Display FIFO Depath Select */ 1413 /* Set Display FIFO Depath Select */
1355 reg_value = 1414 reg_value =
@@ -1438,6 +1497,8 @@ u32 viafb_get_clk_value(int clk)
1438 case UNICHROME_P4M900: 1497 case UNICHROME_P4M900:
1439 case UNICHROME_VX800: 1498 case UNICHROME_VX800:
1440 return pll_value[i].cx700_pll; 1499 return pll_value[i].cx700_pll;
1500 case UNICHROME_VX855:
1501 return pll_value[i].vx855_pll;
1441 } 1502 }
1442 } 1503 }
1443 } 1504 }
@@ -1471,6 +1532,7 @@ void viafb_set_vclock(u32 CLK, int set_iga)
1471 case UNICHROME_P4M890: 1532 case UNICHROME_P4M890:
1472 case UNICHROME_P4M900: 1533 case UNICHROME_P4M900:
1473 case UNICHROME_VX800: 1534 case UNICHROME_VX800:
1535 case UNICHROME_VX855:
1474 viafb_write_reg(SR44, VIASR, CLK / 0x10000); 1536 viafb_write_reg(SR44, VIASR, CLK / 0x10000);
1475 DEBUG_MSG(KERN_INFO "\nSR44=%x", CLK / 0x10000); 1537 DEBUG_MSG(KERN_INFO "\nSR44=%x", CLK / 0x10000);
1476 viafb_write_reg(SR45, VIASR, (CLK & 0xFFFF) / 0x100); 1538 viafb_write_reg(SR45, VIASR, (CLK & 0xFFFF) / 0x100);
@@ -1499,6 +1561,7 @@ void viafb_set_vclock(u32 CLK, int set_iga)
1499 case UNICHROME_P4M890: 1561 case UNICHROME_P4M890:
1500 case UNICHROME_P4M900: 1562 case UNICHROME_P4M900:
1501 case UNICHROME_VX800: 1563 case UNICHROME_VX800:
1564 case UNICHROME_VX855:
1502 viafb_write_reg(SR4A, VIASR, CLK / 0x10000); 1565 viafb_write_reg(SR4A, VIASR, CLK / 0x10000);
1503 viafb_write_reg(SR4B, VIASR, (CLK & 0xFFFF) / 0x100); 1566 viafb_write_reg(SR4B, VIASR, (CLK & 0xFFFF) / 0x100);
1504 viafb_write_reg(SR4C, VIASR, CLK % 0x100); 1567 viafb_write_reg(SR4C, VIASR, CLK % 0x100);
@@ -2215,6 +2278,10 @@ int viafb_setmode(int vmode_index, int hor_res, int ver_res, int video_bpp,
2215 case UNICHROME_VX800: 2278 case UNICHROME_VX800:
2216 viafb_write_regx(CX700_ModeXregs, NUM_TOTAL_CX700_ModeXregs); 2279 viafb_write_regx(CX700_ModeXregs, NUM_TOTAL_CX700_ModeXregs);
2217 break; 2280 break;
2281
2282 case UNICHROME_VX855:
2283 viafb_write_regx(VX855_ModeXregs, NUM_TOTAL_VX855_ModeXregs);
2284 break;
2218 } 2285 }
2219 2286
2220 device_off(); 2287 device_off();
@@ -2597,6 +2664,7 @@ static int get_fb_size_from_pci(void)
2597 case P4M890_FUNCTION3: 2664 case P4M890_FUNCTION3:
2598 case P4M900_FUNCTION3: 2665 case P4M900_FUNCTION3:
2599 case VX800_FUNCTION3: 2666 case VX800_FUNCTION3:
2667 case VX855_FUNCTION3:
2600 /*case CN750_FUNCTION3: */ 2668 /*case CN750_FUNCTION3: */
2601 outl(configid + 0xA0, (unsigned long)0xCF8); 2669 outl(configid + 0xA0, (unsigned long)0xCF8);
2602 FBSize = inl((unsigned long)0xCFC); 2670 FBSize = inl((unsigned long)0xCFC);
@@ -2660,6 +2728,10 @@ static int get_fb_size_from_pci(void)
2660 VideoMemSize = (256 << 20); /*256M */ 2728 VideoMemSize = (256 << 20); /*256M */
2661 break; 2729 break;
2662 2730
2731 case 0x00007000: /* Only on VX855/875 */
2732 VideoMemSize = (512 << 20); /*512M */
2733 break;
2734
2663 default: 2735 default:
2664 VideoMemSize = (32 << 20); /*32M */ 2736 VideoMemSize = (32 << 20); /*32M */
2665 break; 2737 break;