aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/via/hw.c')
-rw-r--r--drivers/video/via/hw.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index b0b02783b6ee..6cb3b5626f0d 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -360,6 +360,24 @@ static struct pll_map pll_value[] = {
360 {208, 5, 2} } 360 {208, 5, 2} }
361}; 361};
362 362
363/* according to VIA Technologies these values are based on experiment */
364static struct io_reg scaling_parameters[] = {
365 {VIACR, CR7A, 0xFF, 0x01}, /* LCD Scaling Parameter 1 */
366 {VIACR, CR7B, 0xFF, 0x02}, /* LCD Scaling Parameter 2 */
367 {VIACR, CR7C, 0xFF, 0x03}, /* LCD Scaling Parameter 3 */
368 {VIACR, CR7D, 0xFF, 0x04}, /* LCD Scaling Parameter 4 */
369 {VIACR, CR7E, 0xFF, 0x07}, /* LCD Scaling Parameter 5 */
370 {VIACR, CR7F, 0xFF, 0x0A}, /* LCD Scaling Parameter 6 */
371 {VIACR, CR80, 0xFF, 0x0D}, /* LCD Scaling Parameter 7 */
372 {VIACR, CR81, 0xFF, 0x13}, /* LCD Scaling Parameter 8 */
373 {VIACR, CR82, 0xFF, 0x16}, /* LCD Scaling Parameter 9 */
374 {VIACR, CR83, 0xFF, 0x19}, /* LCD Scaling Parameter 10 */
375 {VIACR, CR84, 0xFF, 0x1C}, /* LCD Scaling Parameter 11 */
376 {VIACR, CR85, 0xFF, 0x1D}, /* LCD Scaling Parameter 12 */
377 {VIACR, CR86, 0xFF, 0x1E}, /* LCD Scaling Parameter 13 */
378 {VIACR, CR87, 0xFF, 0x1F}, /* LCD Scaling Parameter 14 */
379};
380
363static struct fifo_depth_select display_fifo_depth_reg = { 381static struct fifo_depth_select display_fifo_depth_reg = {
364 /* IGA1 FIFO Depth_Select */ 382 /* IGA1 FIFO Depth_Select */
365 {IGA1_FIFO_DEPTH_SELECT_REG_NUM, {{SR17, 0, 7} } }, 383 {IGA1_FIFO_DEPTH_SELECT_REG_NUM, {{SR17, 0, 7} } },
@@ -2419,6 +2437,7 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
2419 break; 2437 break;
2420 } 2438 }
2421 2439
2440 viafb_write_regx(scaling_parameters, ARRAY_SIZE(scaling_parameters));
2422 device_off(); 2441 device_off();
2423 via_set_state(devices, VIA_STATE_OFF); 2442 via_set_state(devices, VIA_STATE_OFF);
2424 2443