|
34 | 34 | #include "ast_drv.h" |
35 | 35 | #include "ast_post.h" |
36 | 36 |
|
37 | | -static const u8 extreginfo[] = { 0x0f, 0x04, 0x1c, 0xff }; |
38 | | -static const u8 extreginfo_ast2300[] = { 0x0f, 0x04, 0x1f, 0xff }; |
39 | | - |
40 | | -static void ast_set_def_ext_reg(struct ast_device *ast) |
41 | | -{ |
42 | | - u8 i, index, reg; |
43 | | - const u8 *ext_reg_info; |
44 | | - |
45 | | - /* reset scratch */ |
46 | | - for (i = 0x81; i <= 0x9f; i++) |
47 | | - ast_set_index_reg(ast, AST_IO_VGACRI, i, 0x00); |
48 | | - |
49 | | - if (IS_AST_GEN4(ast) || IS_AST_GEN5(ast) || IS_AST_GEN6(ast)) |
50 | | - ext_reg_info = extreginfo_ast2300; |
51 | | - else |
52 | | - ext_reg_info = extreginfo; |
53 | | - |
54 | | - index = 0xa0; |
55 | | - while (*ext_reg_info != 0xff) { |
56 | | - ast_set_index_reg_mask(ast, AST_IO_VGACRI, index, 0x00, *ext_reg_info); |
57 | | - index++; |
58 | | - ext_reg_info++; |
59 | | - } |
60 | | - |
61 | | - /* disable standard IO/MEM decode if secondary */ |
62 | | - /* ast_set_index_reg-mask(ast, AST_IO_VGACRI, 0xa1, 0xff, 0x3); */ |
63 | | - |
64 | | - /* Set Ext. Default */ |
65 | | - ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0x8c, 0x00, 0x01); |
66 | | - ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xb7, 0x00, 0x00); |
67 | | - |
68 | | - /* Enable RAMDAC for A1 */ |
69 | | - reg = 0x04; |
70 | | - if (IS_AST_GEN4(ast) || IS_AST_GEN5(ast) || IS_AST_GEN6(ast)) |
71 | | - reg |= 0x20; |
72 | | - ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xb6, 0xff, reg); |
73 | | -} |
74 | | - |
75 | 37 | u32 __ast_mindwm(void __iomem *regs, u32 r) |
76 | 38 | { |
77 | 39 | u32 data; |
@@ -114,8 +76,6 @@ int ast_post_gpu(struct ast_device *ast) |
114 | 76 | { |
115 | 77 | int ret; |
116 | 78 |
|
117 | | - ast_set_def_ext_reg(ast); |
118 | | - |
119 | 79 | if (AST_GEN(ast) >= 7) { |
120 | 80 | ret = ast_2600_post(ast); |
121 | 81 | if (ret) |
|
0 commit comments