diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-12-10 23:01:13 -0500 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-03-09 13:58:26 -0500 |
commit | dbf85f2326dbb070256ff153853b00f70c27717a (patch) | |
tree | 2a5efe52b54ed151bbe8bd0ce39ee8c1a41ec6ec | |
parent | 23e5abd5555b86fd56af6383e7a832b0cf2a2d95 (diff) |
viafb: kill lcd_panel_id
This patch removes all internal uses of another mostly artificial
value. It does duplicate the information of the maximum resolution and
it is not flexible as only a few resolutions exist. Hence it is better
to remove it and clean the mess up.
No runtime change expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
-rw-r--r-- | drivers/video/via/chip.h | 2 | ||||
-rw-r--r-- | drivers/video/via/lcd.c | 50 | ||||
-rw-r--r-- | drivers/video/via/tblDPASetting.c | 23 | ||||
-rw-r--r-- | drivers/video/via/tblDPASetting.h | 2 | ||||
-rw-r--r-- | drivers/video/via/vt1636.c | 43 |
5 files changed, 13 insertions, 107 deletions
diff --git a/drivers/video/via/chip.h b/drivers/video/via/chip.h index 48f1342897bd..a2f62002c3a3 100644 --- a/drivers/video/via/chip.h +++ b/drivers/video/via/chip.h | |||
@@ -163,7 +163,6 @@ struct lvds_setting_information { | |||
163 | int v_active; | 163 | int v_active; |
164 | int bpp; | 164 | int bpp; |
165 | int refresh_rate; | 165 | int refresh_rate; |
166 | int lcd_panel_id; | ||
167 | int lcd_panel_hres; | 166 | int lcd_panel_hres; |
168 | int lcd_panel_vres; | 167 | int lcd_panel_vres; |
169 | int display_method; | 168 | int display_method; |
@@ -188,7 +187,6 @@ struct GFX_DPA_SETTING { | |||
188 | }; | 187 | }; |
189 | 188 | ||
190 | struct VT1636_DPA_SETTING { | 189 | struct VT1636_DPA_SETTING { |
191 | int PanelSizeID; | ||
192 | u8 CLK_SEL_ST1; | 190 | u8 CLK_SEL_ST1; |
193 | u8 CLK_SEL_ST2; | 191 | u8 CLK_SEL_ST2; |
194 | }; | 192 | }; |
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c index 2ca3bb8abbfe..d75e3f8e9061 100644 --- a/drivers/video/via/lcd.c +++ b/drivers/video/via/lcd.c | |||
@@ -97,8 +97,6 @@ void __devinit viafb_init_lcd_size(void) | |||
97 | DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); | 97 | DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); |
98 | 98 | ||
99 | fp_id_to_vindex(viafb_lcd_panel_id); | 99 | fp_id_to_vindex(viafb_lcd_panel_id); |
100 | viaparinfo->lvds_setting_info2->lcd_panel_id = | ||
101 | viaparinfo->lvds_setting_info->lcd_panel_id; | ||
102 | viaparinfo->lvds_setting_info2->lcd_panel_hres = | 100 | viaparinfo->lvds_setting_info2->lcd_panel_hres = |
103 | viaparinfo->lvds_setting_info->lcd_panel_hres; | 101 | viaparinfo->lvds_setting_info->lcd_panel_hres; |
104 | viaparinfo->lvds_setting_info2->lcd_panel_vres = | 102 | viaparinfo->lvds_setting_info2->lcd_panel_vres = |
@@ -205,176 +203,132 @@ static void __devinit fp_id_to_vindex(int panel_id) | |||
205 | case 0x0: | 203 | case 0x0: |
206 | viaparinfo->lvds_setting_info->lcd_panel_hres = 640; | 204 | viaparinfo->lvds_setting_info->lcd_panel_hres = 640; |
207 | viaparinfo->lvds_setting_info->lcd_panel_vres = 480; | 205 | viaparinfo->lvds_setting_info->lcd_panel_vres = 480; |
208 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
209 | LCD_PANEL_ID0_640X480; | ||
210 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 206 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
211 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 207 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
212 | break; | 208 | break; |
213 | case 0x1: | 209 | case 0x1: |
214 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; | 210 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; |
215 | viaparinfo->lvds_setting_info->lcd_panel_vres = 600; | 211 | viaparinfo->lvds_setting_info->lcd_panel_vres = 600; |
216 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
217 | LCD_PANEL_ID1_800X600; | ||
218 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 212 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
219 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 213 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
220 | break; | 214 | break; |
221 | case 0x2: | 215 | case 0x2: |
222 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 216 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
223 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 217 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
224 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
225 | LCD_PANEL_ID2_1024X768; | ||
226 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 218 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
227 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 219 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
228 | break; | 220 | break; |
229 | case 0x3: | 221 | case 0x3: |
230 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 222 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
231 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 223 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
232 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
233 | LCD_PANEL_ID3_1280X768; | ||
234 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 224 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
235 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 225 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
236 | break; | 226 | break; |
237 | case 0x4: | 227 | case 0x4: |
238 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 228 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
239 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1024; | 229 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1024; |
240 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
241 | LCD_PANEL_ID4_1280X1024; | ||
242 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 230 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
243 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 231 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
244 | break; | 232 | break; |
245 | case 0x5: | 233 | case 0x5: |
246 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1400; | 234 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1400; |
247 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1050; | 235 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1050; |
248 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
249 | LCD_PANEL_ID5_1400X1050; | ||
250 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 236 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
251 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 237 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
252 | break; | 238 | break; |
253 | case 0x6: | 239 | case 0x6: |
254 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1600; | 240 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1600; |
255 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1200; | 241 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1200; |
256 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
257 | LCD_PANEL_ID6_1600X1200; | ||
258 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 242 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
259 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 243 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
260 | break; | 244 | break; |
261 | case 0x8: | 245 | case 0x8: |
262 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; | 246 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; |
263 | viaparinfo->lvds_setting_info->lcd_panel_vres = 480; | 247 | viaparinfo->lvds_setting_info->lcd_panel_vres = 480; |
264 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
265 | LCD_PANEL_IDA_800X480; | ||
266 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 248 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
267 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 249 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
268 | break; | 250 | break; |
269 | case 0x9: | 251 | case 0x9: |
270 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 252 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
271 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 253 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
272 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
273 | LCD_PANEL_ID2_1024X768; | ||
274 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 254 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
275 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 255 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
276 | break; | 256 | break; |
277 | case 0xA: | 257 | case 0xA: |
278 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 258 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
279 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 259 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
280 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
281 | LCD_PANEL_ID2_1024X768; | ||
282 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 260 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
283 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 261 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
284 | break; | 262 | break; |
285 | case 0xB: | 263 | case 0xB: |
286 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 264 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
287 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 265 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
288 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
289 | LCD_PANEL_ID2_1024X768; | ||
290 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 266 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
291 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 267 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
292 | break; | 268 | break; |
293 | case 0xC: | 269 | case 0xC: |
294 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 270 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
295 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 271 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
296 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
297 | LCD_PANEL_ID3_1280X768; | ||
298 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 272 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
299 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 273 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
300 | break; | 274 | break; |
301 | case 0xD: | 275 | case 0xD: |
302 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 276 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
303 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1024; | 277 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1024; |
304 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
305 | LCD_PANEL_ID4_1280X1024; | ||
306 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 278 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
307 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 279 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
308 | break; | 280 | break; |
309 | case 0xE: | 281 | case 0xE: |
310 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1400; | 282 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1400; |
311 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1050; | 283 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1050; |
312 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
313 | LCD_PANEL_ID5_1400X1050; | ||
314 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 284 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
315 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 285 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
316 | break; | 286 | break; |
317 | case 0xF: | 287 | case 0xF: |
318 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1600; | 288 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1600; |
319 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1200; | 289 | viaparinfo->lvds_setting_info->lcd_panel_vres = 1200; |
320 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
321 | LCD_PANEL_ID6_1600X1200; | ||
322 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 290 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
323 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 291 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
324 | break; | 292 | break; |
325 | case 0x10: | 293 | case 0x10: |
326 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1366; | 294 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1366; |
327 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 295 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
328 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
329 | LCD_PANEL_ID7_1366X768; | ||
330 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 296 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
331 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 297 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
332 | break; | 298 | break; |
333 | case 0x11: | 299 | case 0x11: |
334 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 300 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
335 | viaparinfo->lvds_setting_info->lcd_panel_vres = 600; | 301 | viaparinfo->lvds_setting_info->lcd_panel_vres = 600; |
336 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
337 | LCD_PANEL_ID8_1024X600; | ||
338 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 302 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
339 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 303 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
340 | break; | 304 | break; |
341 | case 0x12: | 305 | case 0x12: |
342 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 306 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
343 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 307 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
344 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
345 | LCD_PANEL_ID3_1280X768; | ||
346 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 308 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
347 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 309 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
348 | break; | 310 | break; |
349 | case 0x13: | 311 | case 0x13: |
350 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 312 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
351 | viaparinfo->lvds_setting_info->lcd_panel_vres = 800; | 313 | viaparinfo->lvds_setting_info->lcd_panel_vres = 800; |
352 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
353 | LCD_PANEL_ID9_1280X800; | ||
354 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 314 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
355 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 315 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
356 | break; | 316 | break; |
357 | case 0x14: | 317 | case 0x14: |
358 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1360; | 318 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1360; |
359 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 319 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
360 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
361 | LCD_PANEL_IDB_1360X768; | ||
362 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 320 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
363 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 321 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
364 | break; | 322 | break; |
365 | case 0x15: | 323 | case 0x15: |
366 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 324 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
367 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; | 325 | viaparinfo->lvds_setting_info->lcd_panel_vres = 768; |
368 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
369 | LCD_PANEL_ID3_1280X768; | ||
370 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 326 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
371 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 327 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
372 | break; | 328 | break; |
373 | case 0x16: | 329 | case 0x16: |
374 | viaparinfo->lvds_setting_info->lcd_panel_hres = 480; | 330 | viaparinfo->lvds_setting_info->lcd_panel_hres = 480; |
375 | viaparinfo->lvds_setting_info->lcd_panel_vres = 640; | 331 | viaparinfo->lvds_setting_info->lcd_panel_vres = 640; |
376 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
377 | LCD_PANEL_IDC_480X640; | ||
378 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 332 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
379 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 333 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
380 | break; | 334 | break; |
@@ -382,16 +336,12 @@ static void __devinit fp_id_to_vindex(int panel_id) | |||
382 | /* OLPC XO-1.5 panel */ | 336 | /* OLPC XO-1.5 panel */ |
383 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1200; | 337 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1200; |
384 | viaparinfo->lvds_setting_info->lcd_panel_vres = 900; | 338 | viaparinfo->lvds_setting_info->lcd_panel_vres = 900; |
385 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
386 | LCD_PANEL_IDD_1200X900; | ||
387 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 339 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
388 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 340 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
389 | break; | 341 | break; |
390 | default: | 342 | default: |
391 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; | 343 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; |
392 | viaparinfo->lvds_setting_info->lcd_panel_vres = 600; | 344 | viaparinfo->lvds_setting_info->lcd_panel_vres = 600; |
393 | viaparinfo->lvds_setting_info->lcd_panel_id = | ||
394 | LCD_PANEL_ID1_800X600; | ||
395 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 345 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
396 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 346 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
397 | } | 347 | } |
diff --git a/drivers/video/via/tblDPASetting.c b/drivers/video/via/tblDPASetting.c index 0c4c8cc712f4..73bb554e7c1e 100644 --- a/drivers/video/via/tblDPASetting.c +++ b/drivers/video/via/tblDPASetting.c | |||
@@ -20,17 +20,6 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include "global.h" | 22 | #include "global.h" |
23 | /* For VT3324: */ | ||
24 | struct VT1636_DPA_SETTING VT1636_DPA_SETTING_TBL_VT3324[] = { | ||
25 | /* Panel ID, CLK_SEL_ST1[09], CLK_SEL_ST2[08] */ | ||
26 | {LCD_PANEL_ID0_640X480, 0x00, 0x00}, /* For 640x480 */ | ||
27 | {LCD_PANEL_ID1_800X600, 0x00, 0x00}, /* For 800x600 */ | ||
28 | {LCD_PANEL_ID2_1024X768, 0x00, 0x00}, /* For 1024x768 */ | ||
29 | {LCD_PANEL_ID3_1280X768, 0x00, 0x00}, /* For 1280x768 */ | ||
30 | {LCD_PANEL_ID4_1280X1024, 0x00, 0x00}, /* For 1280x1024 */ | ||
31 | {LCD_PANEL_ID5_1400X1050, 0x00, 0x00}, /* For 1400x1050 */ | ||
32 | {LCD_PANEL_ID6_1600X1200, 0x0B, 0x03} /* For 1600x1200 */ | ||
33 | }; | ||
34 | 23 | ||
35 | struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3324[] = { | 24 | struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3324[] = { |
36 | /* ClkRange, DVP0, DVP0DataDriving, DVP0ClockDriving, DVP1, | 25 | /* ClkRange, DVP0, DVP0DataDriving, DVP0ClockDriving, DVP1, |
@@ -57,18 +46,6 @@ struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3324[] = { | |||
57 | 0x00}, | 46 | 0x00}, |
58 | }; | 47 | }; |
59 | 48 | ||
60 | /* For VT3327: */ | ||
61 | struct VT1636_DPA_SETTING VT1636_DPA_SETTING_TBL_VT3327[] = { | ||
62 | /* Panel ID, CLK_SEL_ST1[09], CLK_SEL_ST2[08] */ | ||
63 | {LCD_PANEL_ID0_640X480, 0x00, 0x00}, /* For 640x480 */ | ||
64 | {LCD_PANEL_ID1_800X600, 0x00, 0x00}, /* For 800x600 */ | ||
65 | {LCD_PANEL_ID2_1024X768, 0x00, 0x00}, /* For 1024x768 */ | ||
66 | {LCD_PANEL_ID3_1280X768, 0x00, 0x00}, /* For 1280x768 */ | ||
67 | {LCD_PANEL_ID4_1280X1024, 0x00, 0x00}, /* For 1280x1024 */ | ||
68 | {LCD_PANEL_ID5_1400X1050, 0x00, 0x00}, /* For 1400x1050 */ | ||
69 | {LCD_PANEL_ID6_1600X1200, 0x00, 0x00} /* For 1600x1200 */ | ||
70 | }; | ||
71 | |||
72 | struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3327[] = { | 49 | struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3327[] = { |
73 | /* ClkRange,DVP0, DVP0DataDriving, DVP0ClockDriving, DVP1, | 50 | /* ClkRange,DVP0, DVP0DataDriving, DVP0ClockDriving, DVP1, |
74 | DVP1Driving, DFPHigh, DFPLow */ | 51 | DVP1Driving, DFPHigh, DFPLow */ |
diff --git a/drivers/video/via/tblDPASetting.h b/drivers/video/via/tblDPASetting.h index b065a83481d3..6db61519cb5d 100644 --- a/drivers/video/via/tblDPASetting.h +++ b/drivers/video/via/tblDPASetting.h | |||
@@ -38,9 +38,7 @@ enum DPA_RANGE { | |||
38 | DPA_CLK_RANGE_150M | 38 | DPA_CLK_RANGE_150M |
39 | }; | 39 | }; |
40 | 40 | ||
41 | extern struct VT1636_DPA_SETTING VT1636_DPA_SETTING_TBL_VT3324[7]; | ||
42 | extern struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3324[6]; | 41 | extern struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3324[6]; |
43 | extern struct VT1636_DPA_SETTING VT1636_DPA_SETTING_TBL_VT3327[7]; | ||
44 | extern struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3327[]; | 42 | extern struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3327[]; |
45 | extern struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3364[6]; | 43 | extern struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3364[6]; |
46 | 44 | ||
diff --git a/drivers/video/via/vt1636.c b/drivers/video/via/vt1636.c index 60e4192c2b34..ee2903b472cf 100644 --- a/drivers/video/via/vt1636.c +++ b/drivers/video/via/vt1636.c | |||
@@ -167,22 +167,6 @@ static int get_clk_range_index(u32 Clk) | |||
167 | return DPA_CLK_RANGE_150M; | 167 | return DPA_CLK_RANGE_150M; |
168 | } | 168 | } |
169 | 169 | ||
170 | static int get_lvds_dpa_setting_index(int panel_size_id, | ||
171 | struct VT1636_DPA_SETTING *p_vt1636_dpasetting_tbl, | ||
172 | int tbl_size) | ||
173 | { | ||
174 | int i; | ||
175 | |||
176 | for (i = 0; i < tbl_size; i++) { | ||
177 | if (panel_size_id == p_vt1636_dpasetting_tbl->PanelSizeID) | ||
178 | return i; | ||
179 | |||
180 | p_vt1636_dpasetting_tbl++; | ||
181 | } | ||
182 | |||
183 | return 0; | ||
184 | } | ||
185 | |||
186 | static void set_dpa_vt1636(struct lvds_setting_information | 170 | static void set_dpa_vt1636(struct lvds_setting_information |
187 | *plvds_setting_info, struct lvds_chip_information *plvds_chip_info, | 171 | *plvds_setting_info, struct lvds_chip_information *plvds_chip_info, |
188 | struct VT1636_DPA_SETTING *p_vt1636_dpa_setting) | 172 | struct VT1636_DPA_SETTING *p_vt1636_dpa_setting) |
@@ -206,7 +190,9 @@ void viafb_vt1636_patch_skew_on_vt3324( | |||
206 | struct lvds_setting_information *plvds_setting_info, | 190 | struct lvds_setting_information *plvds_setting_info, |
207 | struct lvds_chip_information *plvds_chip_info) | 191 | struct lvds_chip_information *plvds_chip_info) |
208 | { | 192 | { |
209 | int index, size; | 193 | struct VT1636_DPA_SETTING dpa = {0x00, 0x00}, dpa_16x12 = {0x0B, 0x03}, |
194 | *pdpa; | ||
195 | int index; | ||
210 | 196 | ||
211 | DEBUG_MSG(KERN_INFO "viafb_vt1636_patch_skew_on_vt3324.\n"); | 197 | DEBUG_MSG(KERN_INFO "viafb_vt1636_patch_skew_on_vt3324.\n"); |
212 | 198 | ||
@@ -216,19 +202,21 @@ void viafb_vt1636_patch_skew_on_vt3324( | |||
216 | &GFX_DPA_SETTING_TBL_VT3324[index]); | 202 | &GFX_DPA_SETTING_TBL_VT3324[index]); |
217 | 203 | ||
218 | /* LVDS Transmitter DPA settings: */ | 204 | /* LVDS Transmitter DPA settings: */ |
219 | size = ARRAY_SIZE(VT1636_DPA_SETTING_TBL_VT3324); | 205 | if (plvds_setting_info->lcd_panel_hres == 1600 && |
220 | index = | 206 | plvds_setting_info->lcd_panel_vres == 1200) |
221 | get_lvds_dpa_setting_index(plvds_setting_info->lcd_panel_id, | 207 | pdpa = &dpa_16x12; |
222 | VT1636_DPA_SETTING_TBL_VT3324, size); | 208 | else |
223 | set_dpa_vt1636(plvds_setting_info, plvds_chip_info, | 209 | pdpa = &dpa; |
224 | &VT1636_DPA_SETTING_TBL_VT3324[index]); | 210 | |
211 | set_dpa_vt1636(plvds_setting_info, plvds_chip_info, pdpa); | ||
225 | } | 212 | } |
226 | 213 | ||
227 | void viafb_vt1636_patch_skew_on_vt3327( | 214 | void viafb_vt1636_patch_skew_on_vt3327( |
228 | struct lvds_setting_information *plvds_setting_info, | 215 | struct lvds_setting_information *plvds_setting_info, |
229 | struct lvds_chip_information *plvds_chip_info) | 216 | struct lvds_chip_information *plvds_chip_info) |
230 | { | 217 | { |
231 | int index, size; | 218 | struct VT1636_DPA_SETTING dpa = {0x00, 0x00}; |
219 | int index; | ||
232 | 220 | ||
233 | DEBUG_MSG(KERN_INFO "viafb_vt1636_patch_skew_on_vt3327.\n"); | 221 | DEBUG_MSG(KERN_INFO "viafb_vt1636_patch_skew_on_vt3327.\n"); |
234 | 222 | ||
@@ -238,12 +226,7 @@ void viafb_vt1636_patch_skew_on_vt3327( | |||
238 | &GFX_DPA_SETTING_TBL_VT3327[index]); | 226 | &GFX_DPA_SETTING_TBL_VT3327[index]); |
239 | 227 | ||
240 | /* LVDS Transmitter DPA settings: */ | 228 | /* LVDS Transmitter DPA settings: */ |
241 | size = ARRAY_SIZE(VT1636_DPA_SETTING_TBL_VT3327); | 229 | set_dpa_vt1636(plvds_setting_info, plvds_chip_info, &dpa); |
242 | index = | ||
243 | get_lvds_dpa_setting_index(plvds_setting_info->lcd_panel_id, | ||
244 | VT1636_DPA_SETTING_TBL_VT3327, size); | ||
245 | set_dpa_vt1636(plvds_setting_info, plvds_chip_info, | ||
246 | &VT1636_DPA_SETTING_TBL_VT3327[index]); | ||
247 | } | 230 | } |
248 | 231 | ||
249 | void viafb_vt1636_patch_skew_on_vt3364( | 232 | void viafb_vt1636_patch_skew_on_vt3364( |