diff options
author | Thomas Winischhofer <thomas@winischhofer.net> | 2005-09-09 16:04:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 16:58:01 -0400 |
commit | 544393fe584d333480659a4bed30f5295355df11 (patch) | |
tree | 873b30c67cdbb5cb93e6fd816692db312ed6ddd6 /drivers/video/sis/init301.h | |
parent | 5c06e2aa6339112befdc87b350b8bf712890d7a7 (diff) |
[PATCH] sisfb update
This lifts sisfb from version 1.7.17 to version 1.8.9. Changes include:
- Added support for XGI V3XT, V5, V8, Z7 chipsets, including POSTing of
all of these chipsets.
- Added support for latest SiS chipsets (761).
- Added support for SiS76x memory "hybrid" mode.
- Added support for new LCD resolutions (eg 1280x854, 856x480).
- Fixed support for 320x240 STN panels (for embedded devices).
- Fixed many HDTV modes (525p, 750p, 1080i).
- Fixed PCI config register reading/writing to use proper kernel
functions for this purpose.
- Fixed PCI ROM handling to use the kernel's proper functions.
- Removed lots of "typedef"s.
- Removed lots of code which was for X.org/XFree86 only.
- Fixed coding style in many places.
- Removed lots of 2.4 cruft.
- Reduced stack size by unifying two previously separate structs into
one.
- Added new hooks for memory allocation (for DRM). Now the driver can
truly handle multiple cards, including memory management.
- Fixed numerous minor bugs.
Signed-off-by: Thomas Winischhofer <thomas@winischhofer.net>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/sis/init301.h')
-rw-r--r-- | drivers/video/sis/init301.h | 351 |
1 files changed, 225 insertions, 126 deletions
diff --git a/drivers/video/sis/init301.h b/drivers/video/sis/init301.h index f84eb54164a5..f475b21a85cf 100644 --- a/drivers/video/sis/init301.h +++ b/drivers/video/sis/init301.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * Data and prototypes for init301.c | 4 | * Data and prototypes for init301.c |
5 | * | 5 | * |
6 | * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria | 6 | * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria |
7 | * | 7 | * |
8 | * If distributed as part of the Linux kernel, the following license terms | 8 | * If distributed as part of the Linux kernel, the following license terms |
9 | * apply: | 9 | * apply: |
@@ -50,18 +50,18 @@ | |||
50 | * | 50 | * |
51 | */ | 51 | */ |
52 | 52 | ||
53 | #ifndef _INIT301_ | 53 | #ifndef _INIT301_H_ |
54 | #define _INIT301_ | 54 | #define _INIT301_H_ |
55 | 55 | ||
56 | #include "osdef.h" | 56 | #include "osdef.h" |
57 | #include "initdef.h" | 57 | #include "initdef.h" |
58 | 58 | ||
59 | #ifdef LINUX_XF86 | 59 | #ifdef SIS_XORG_XF86 |
60 | #include "sis.h" | 60 | #include "sis.h" |
61 | #include "sis_regs.h" | 61 | #include "sis_regs.h" |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #ifdef LINUX_KERNEL | 64 | #ifdef SIS_LINUX_KERNEL |
65 | #include "vgatypes.h" | 65 | #include "vgatypes.h" |
66 | #include "vstruct.h" | 66 | #include "vstruct.h" |
67 | #ifdef SIS_CP | 67 | #ifdef SIS_CP |
@@ -69,8 +69,13 @@ | |||
69 | #endif | 69 | #endif |
70 | #include <linux/config.h> | 70 | #include <linux/config.h> |
71 | #include <linux/version.h> | 71 | #include <linux/version.h> |
72 | #include <asm/io.h> | ||
73 | #include <linux/types.h> | 72 | #include <linux/types.h> |
73 | #include <asm/io.h> | ||
74 | #include <linux/fb.h> | ||
75 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) | ||
76 | #include <video/fbcon.h> | ||
77 | #endif | ||
78 | #include "sis.h" | ||
74 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) | 79 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) |
75 | #include <linux/sisfb.h> | 80 | #include <linux/sisfb.h> |
76 | #else | 81 | #else |
@@ -78,7 +83,7 @@ | |||
78 | #endif | 83 | #endif |
79 | #endif | 84 | #endif |
80 | 85 | ||
81 | static const UCHAR SiS_YPbPrTable[3][64] = { | 86 | static const unsigned char SiS_YPbPrTable[3][64] = { |
82 | { | 87 | { |
83 | 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c, | 88 | 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c, |
84 | 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a, | 89 | 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a, |
@@ -90,17 +95,17 @@ static const UCHAR SiS_YPbPrTable[3][64] = { | |||
90 | 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00 | 95 | 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00 |
91 | }, | 96 | }, |
92 | { | 97 | { |
93 | 0x1d,0x11,0x06,0x09,0x0b,0x0c,0x0c,0x0c, | 98 | 0x33,0x06,0x06,0x09,0x0b,0x0c,0x0c,0x0c, |
94 | 0x98,0x0a,0x01,0x0d,0x06,0x0d,0x04,0x0a, | 99 | 0x98,0x0a,0x01,0x0d,0x06,0x0d,0x04,0x0a, |
95 | 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, | 100 | 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, |
96 | 0x0c,0x50,0xb2,0x9f,0x16,0x59,0x4c /*0x4f*/,0x13, | 101 | 0x0c,0x50,0xb2,0x9f,0x16,0x59,0x4f,0x13, |
97 | 0xad,0x11,0xad,0x1d,0x40,0x8a,0x3d,0xb8, | 102 | 0xad,0x11,0xad,0x1d,0x40,0x8a,0x3d,0xb8, |
98 | 0x51,0x5e,0x60,0x57 /*0x49*/,0x7b /*0x7d*/,0x92,0x0f,0x40, | 103 | 0x51,0x5e,0x60,0x49,0x7d,0x92,0x0f,0x40, |
99 | 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x4b, | 104 | 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x4e, |
100 | 0x43,0x41,0x11,0x00,0xfc,0xff,0x32,0x00 | 105 | 0x43,0x41,0x11,0x00,0xfc,0xff,0x32,0x00 |
101 | }, | 106 | }, |
102 | { | 107 | { |
103 | #if 1 | 108 | #if 0 /* OK, but sticks to left edge */ |
104 | 0x13,0x1d,0xe8,0x09,0x09,0xed,0x0c,0x0c, | 109 | 0x13,0x1d,0xe8,0x09,0x09,0xed,0x0c,0x0c, |
105 | 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a, | 110 | 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a, |
106 | 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, | 111 | 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, |
@@ -110,20 +115,42 @@ static const UCHAR SiS_YPbPrTable[3][64] = { | |||
110 | 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x27, | 115 | 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x27, |
111 | 0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00 | 116 | 0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00 |
112 | #endif | 117 | #endif |
113 | #if 0 | 118 | #if 1 /* Perfect */ |
114 | 0x2a,0x14,0xe8,0x09,0x09,0xed,0x0c,0x0c, /* TEST (0.93) - BAD */ | 119 | 0x23,0x2d,0xe8,0x09,0x09,0xed,0x0c,0x0c, |
115 | 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a, | 120 | 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a, |
116 | 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, | 121 | 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, |
117 | 0xed,0x50,0x70,0x9e,0x16,0x57,0x6c,0x13, | 122 | 0xed,0x50,0x70,0x9f,0x16,0x59,0x60,0x13, |
118 | 0x27,0x0b,0x27,0xfb,0x30,0x27,0x15,0xb0, | 123 | 0x27,0x0b,0x27,0xfc,0x30,0x27,0x1c,0xb0, |
119 | 0x3b,0xdb,0x61,0x24,0x78,0x92,0x0f,0xff, | 124 | 0x4b,0x4b,0x6f,0x2f,0x63,0x92,0x0f,0x40, |
120 | 0xff,0xff,0xff,0xff,0xff,0xff,0x14,0x6f, | 125 | 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x73, |
121 | 0x00,0x52,0xbb,0x00,0xd5,0xf7,0xa2,0x00 | 126 | 0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00 |
122 | #endif | 127 | #endif |
123 | } | 128 | } |
124 | }; | 129 | }; |
125 | 130 | ||
126 | static const UCHAR SiS_HiTVGroup3_1[] = { | 131 | static const unsigned char SiS_TVPhase[] = |
132 | { | ||
133 | 0x21,0xED,0xBA,0x08, /* 0x00 SiS_NTSCPhase */ | ||
134 | 0x2A,0x05,0xE3,0x00, /* 0x01 SiS_PALPhase */ | ||
135 | 0x21,0xE4,0x2E,0x9B, /* 0x02 SiS_PALMPhase */ | ||
136 | 0x21,0xF4,0x3E,0xBA, /* 0x03 SiS_PALNPhase */ | ||
137 | 0x1E,0x8B,0xA2,0xA7, | ||
138 | 0x1E,0x83,0x0A,0xE0, /* 0x05 SiS_SpecialPhaseM */ | ||
139 | 0x00,0x00,0x00,0x00, | ||
140 | 0x00,0x00,0x00,0x00, | ||
141 | 0x21,0xF0,0x7B,0xD6, /* 0x08 SiS_NTSCPhase2 */ | ||
142 | 0x2A,0x09,0x86,0xE9, /* 0x09 SiS_PALPhase2 */ | ||
143 | 0x21,0xE6,0xEF,0xA4, /* 0x0a SiS_PALMPhase2 */ | ||
144 | 0x21,0xF6,0x94,0x46, /* 0x0b SiS_PALNPhase2 */ | ||
145 | 0x1E,0x8B,0xA2,0xA7, | ||
146 | 0x1E,0x83,0x0A,0xE0, /* 0x0d SiS_SpecialPhaseM */ | ||
147 | 0x00,0x00,0x00,0x00, | ||
148 | 0x00,0x00,0x00,0x00, | ||
149 | 0x1e,0x8c,0x5c,0x7a, /* 0x10 SiS_SpecialPhase */ | ||
150 | 0x25,0xd4,0xfd,0x5e /* 0x11 SiS_SpecialPhaseJ */ | ||
151 | }; | ||
152 | |||
153 | static const unsigned char SiS_HiTVGroup3_1[] = { | ||
127 | 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x13, | 154 | 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x13, |
128 | 0xb1, 0x41, 0x62, 0x62, 0xff, 0xf4, 0x45, 0xa6, | 155 | 0xb1, 0x41, 0x62, 0x62, 0xff, 0xf4, 0x45, 0xa6, |
129 | 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20, | 156 | 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20, |
@@ -134,7 +161,7 @@ static const UCHAR SiS_HiTVGroup3_1[] = { | |||
134 | 0x1a, 0x1f, 0x25, 0x2a, 0x4c, 0xaa, 0x01 | 161 | 0x1a, 0x1f, 0x25, 0x2a, 0x4c, 0xaa, 0x01 |
135 | }; | 162 | }; |
136 | 163 | ||
137 | static const UCHAR SiS_HiTVGroup3_2[] = { | 164 | static const unsigned char SiS_HiTVGroup3_2[] = { |
138 | 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x7a, | 165 | 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x7a, |
139 | 0x54, 0x41, 0xe7, 0xe7, 0xff, 0xf4, 0x45, 0xa6, | 166 | 0x54, 0x41, 0xe7, 0xe7, 0xff, 0xf4, 0x45, 0xa6, |
140 | 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20, | 167 | 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20, |
@@ -147,7 +174,7 @@ static const UCHAR SiS_HiTVGroup3_2[] = { | |||
147 | 174 | ||
148 | /* 301C / 302ELV extended Part2 TV registers (4 tap scaler) */ | 175 | /* 301C / 302ELV extended Part2 TV registers (4 tap scaler) */ |
149 | 176 | ||
150 | static const UCHAR SiS_Part2CLVX_1[] = { | 177 | static const unsigned char SiS_Part2CLVX_1[] = { |
151 | 0x00,0x00, | 178 | 0x00,0x00, |
152 | 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, | 179 | 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, |
153 | 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, | 180 | 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, |
@@ -155,7 +182,7 @@ static const UCHAR SiS_Part2CLVX_1[] = { | |||
155 | 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E | 182 | 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E |
156 | }; | 183 | }; |
157 | 184 | ||
158 | static const UCHAR SiS_Part2CLVX_2[] = { | 185 | static const unsigned char SiS_Part2CLVX_2[] = { |
159 | 0x00,0x00, | 186 | 0x00,0x00, |
160 | 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, | 187 | 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, |
161 | 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, | 188 | 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, |
@@ -163,7 +190,7 @@ static const UCHAR SiS_Part2CLVX_2[] = { | |||
163 | 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E | 190 | 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E |
164 | }; | 191 | }; |
165 | 192 | ||
166 | static const UCHAR SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */ | 193 | static const unsigned char SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */ |
167 | 0xE0,0x01, | 194 | 0xE0,0x01, |
168 | 0x04,0x1A,0x04,0x7E,0x03,0x1A,0x06,0x7D,0x01,0x1A,0x08,0x7D,0x00,0x19,0x0A,0x7D, | 195 | 0x04,0x1A,0x04,0x7E,0x03,0x1A,0x06,0x7D,0x01,0x1A,0x08,0x7D,0x00,0x19,0x0A,0x7D, |
169 | 0x7F,0x19,0x0C,0x7C,0x7E,0x18,0x0E,0x7C,0x7E,0x17,0x10,0x7B,0x7D,0x15,0x12,0x7C, | 196 | 0x7F,0x19,0x0C,0x7C,0x7E,0x18,0x0E,0x7C,0x7E,0x17,0x10,0x7B,0x7D,0x15,0x12,0x7C, |
@@ -182,7 +209,7 @@ static const UCHAR SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */ | |||
182 | 0xFF,0xFF | 209 | 0xFF,0xFF |
183 | }; | 210 | }; |
184 | 211 | ||
185 | static const UCHAR SiS_Part2CLVX_4[] = { /* PAL */ | 212 | static const unsigned char SiS_Part2CLVX_4[] = { /* PAL */ |
186 | 0x58,0x02, | 213 | 0x58,0x02, |
187 | 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, | 214 | 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, |
188 | 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, | 215 | 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, |
@@ -201,7 +228,7 @@ static const UCHAR SiS_Part2CLVX_4[] = { /* PAL */ | |||
201 | 0xFF,0xFF | 228 | 0xFF,0xFF |
202 | }; | 229 | }; |
203 | 230 | ||
204 | static const UCHAR SiS_Part2CLVX_5[] = { /* 750p */ | 231 | static const unsigned char SiS_Part2CLVX_5[] = { /* 750p */ |
205 | 0x00,0x03, | 232 | 0x00,0x03, |
206 | 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, | 233 | 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, |
207 | 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, | 234 | 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, |
@@ -210,7 +237,7 @@ static const UCHAR SiS_Part2CLVX_5[] = { /* 750p */ | |||
210 | 0xFF,0xFF | 237 | 0xFF,0xFF |
211 | }; | 238 | }; |
212 | 239 | ||
213 | static const UCHAR SiS_Part2CLVX_6[] = { /* 1080i */ | 240 | static const unsigned char SiS_Part2CLVX_6[] = { /* 1080i */ |
214 | 0x00,0x04, | 241 | 0x00,0x04, |
215 | 0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E,0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D, | 242 | 0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E,0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D, |
216 | 0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D,0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C, | 243 | 0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D,0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C, |
@@ -221,7 +248,7 @@ static const UCHAR SiS_Part2CLVX_6[] = { /* 1080i */ | |||
221 | 248 | ||
222 | #ifdef SIS315H | 249 | #ifdef SIS315H |
223 | /* 661 et al LCD data structure (2.03.00) */ | 250 | /* 661 et al LCD data structure (2.03.00) */ |
224 | static const UCHAR SiS_LCDStruct661[] = { | 251 | static const unsigned char SiS_LCDStruct661[] = { |
225 | /* 1024x768 */ | 252 | /* 1024x768 */ |
226 | /* type|CR37| HDE | VDE | HT | VT | hss | hse */ | 253 | /* type|CR37| HDE | VDE | HT | VT | hss | hse */ |
227 | 0x02,0xC0,0x00,0x04,0x00,0x03,0x40,0x05,0x26,0x03,0x10,0x00,0x88, | 254 | 0x02,0xC0,0x00,0x04,0x00,0x03,0x40,0x05,0x26,0x03,0x10,0x00,0x88, |
@@ -249,11 +276,20 @@ static const UCHAR SiS_LCDStruct661[] = { | |||
249 | /* 1680x1050 */ | 276 | /* 1680x1050 */ |
250 | 0x0D,0xE0,0x90,0x06,0x1A,0x04,0x6C,0x07,0x2A,0x04,0x1A,0x00,0x4C, | 277 | 0x0D,0xE0,0x90,0x06,0x1A,0x04,0x6C,0x07,0x2A,0x04,0x1A,0x00,0x4C, |
251 | 0x00,0x03,0x00,0x06,0x00,0x79,0xBE,0x44,0x00,0x00,0x00,0x00,0x06, | 278 | 0x00,0x03,0x00,0x06,0x00,0x79,0xBE,0x44,0x00,0x00,0x00,0x00,0x06, |
279 | /* 1280x800_3 */ | ||
280 | 0x0C,0xE0,0x00,0x05,0x20,0x03,0xAA,0x05,0x2E,0x03,0x30,0x00,0x50, | ||
281 | 0x00,0x04,0x00,0x03,0x00,0x47,0xA9,0x10,0x00,0x00,0x00,0x00,0x07, | ||
282 | /* 800x600 */ | ||
283 | 0x01,0xC0,0x20,0x03,0x58,0x02,0x20,0x04,0x74,0x02,0x2A,0x00,0x80, | ||
284 | 0x00,0x06,0x00,0x04,0x00,0x28,0x63,0x4B,0x00,0x00,0x00,0x00,0x00, | ||
285 | /* 1280x854 */ | ||
286 | 0x08,0xE0,0x00,0x05,0x56,0x03,0x80,0x06,0x5d,0x03,0x10,0x00,0x70, | ||
287 | 0x00,0x01,0x00,0x03,0x00,0x54,0x75,0x13,0x00,0x00,0x00,0x00,0x08 | ||
252 | }; | 288 | }; |
253 | #endif | 289 | #endif |
254 | 290 | ||
255 | #ifdef SIS300 | 291 | #ifdef SIS300 |
256 | static UCHAR SiS300_TrumpionData[7][80] = { | 292 | static unsigned char SiS300_TrumpionData[14][80] = { |
257 | { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02, | 293 | { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02, |
258 | 0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23, | 294 | 0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23, |
259 | 0x00,0x00,0x03,0x28,0x03,0x10,0x05,0x08,0x40,0x10,0x00,0x10,0x04,0x23,0x00,0x23, | 295 | 0x00,0x00,0x03,0x28,0x03,0x10,0x05,0x08,0x40,0x10,0x00,0x10,0x04,0x23,0x00,0x23, |
@@ -288,119 +324,182 @@ static UCHAR SiS300_TrumpionData[7][80] = { | |||
288 | 0x40,0x05,0x13,0x00,0x00,0x03,0x26,0x03,0x88,0x0C,0x30,0x90,0x00,0x00,0x04,0x23, | 324 | 0x40,0x05,0x13,0x00,0x00,0x03,0x26,0x03,0x88,0x0C,0x30,0x90,0x00,0x00,0x04,0x23, |
289 | 0x00,0x01,0x03,0x24,0x03,0x28,0x06,0x08,0x40,0x90,0x00,0x90,0x04,0x23,0x00,0x23, | 325 | 0x00,0x01,0x03,0x24,0x03,0x28,0x06,0x08,0x40,0x90,0x00,0x90,0x04,0x23,0x00,0x23, |
290 | 0x03,0x11,0x60,0x40,0x05,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x08,0x01,0x00,0x08,0x01, | 326 | 0x03,0x11,0x60,0x40,0x05,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x08,0x01,0x00,0x08,0x01, |
291 | 0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5B,0x01,0xBE,0x01,0x00 } | 327 | 0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5B,0x01,0xBE,0x01,0x00 }, |
328 | /* variant 2 */ | ||
329 | { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02, | ||
330 | 0x20,0x03,0x15,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x18,0x00,0x00,0x04,0x23, | ||
331 | 0x00,0x01,0x03,0x44,0x03,0x28,0x06,0x08,0x40,0x18,0x00,0x18,0x04,0x23,0x00,0x23, | ||
332 | 0x03,0x11,0x60,0xA6,0x01,0xFF,0x03,0xFF,0x19,0x01,0x00,0x05,0x13,0x04,0x04,0x05, | ||
333 | 0x04,0x0C,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 }, | ||
334 | { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02, | ||
335 | 0x20,0x03,0x15,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x18,0x00,0x00,0x04,0x23, | ||
336 | 0x00,0x01,0x03,0x44,0x03,0x28,0x06,0x08,0x40,0x18,0x00,0x18,0x04,0x23,0x00,0x23, | ||
337 | 0x03,0x11,0x60,0xA6,0x01,0xFF,0x03,0xFF,0x19,0x01,0x00,0x05,0x13,0x04,0x04,0x05, | ||
338 | 0x04,0x0C,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 }, | ||
339 | { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x8A,0x00,0xD8,0x02, | ||
340 | 0x84,0x03,0x16,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x1C,0x00,0x20,0x04,0x23, | ||
341 | 0x00,0x01,0x03,0x53,0x03,0x28,0x06,0x08,0x40,0x1C,0x00,0x16,0x04,0x23,0x00,0x23, | ||
342 | 0x03,0x11,0x60,0xDA,0x01,0xFF,0x0F,0xF4,0x18,0x07,0x05,0x05,0x13,0x04,0x04,0x05, | ||
343 | 0x01,0x0B,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 }, | ||
344 | { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x72,0x00,0xD8,0x02, | ||
345 | 0x84,0x03,0x16,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x1C,0x00,0x20,0x04,0x23, | ||
346 | 0x00,0x01,0x03,0x53,0x03,0x28,0x06,0x08,0x40,0x1C,0x00,0x16,0x04,0x23,0x00,0x23, | ||
347 | 0x03,0x11,0x60,0xDA,0x01,0xFF,0x0F,0xF4,0x18,0x07,0x05,0x05,0x13,0x04,0x04,0x05, | ||
348 | 0x01,0x0B,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 }, | ||
349 | { 0x02,0x0A,0x02,0x00,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02, | ||
350 | 0x20,0x03,0x16,0x00,0xE0,0x01,0x0D,0x02,0x60,0x0C,0x30,0x98,0x00,0x00,0x04,0x23, | ||
351 | 0x00,0x01,0x03,0x45,0x03,0x48,0x06,0x08,0x40,0x98,0x00,0x98,0x04,0x23,0x00,0x23, | ||
352 | 0x03,0x11,0x60,0xF4,0x01,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x05,0x01,0x00,0x05,0x05, | ||
353 | 0x04,0x0C,0x08,0x05,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEA,0x58,0x01,0xBE,0x01,0x00 }, | ||
354 | { 0x02,0x0A,0x02,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0xBF,0x00,0x20,0x03, | ||
355 | 0x20,0x04,0x0D,0x00,0x58,0x02,0x71,0x02,0x80,0x0C,0x30,0x9A,0x00,0xFA,0x03,0x1D, | ||
356 | 0x00,0x01,0x03,0x22,0x03,0x28,0x06,0x08,0x40,0x98,0x00,0x98,0x04,0x1D,0x00,0x1D, | ||
357 | 0x03,0x11,0x60,0x39,0x03,0x40,0x05,0xF4,0x18,0x07,0x02,0x06,0x04,0x01,0x06,0x0B, | ||
358 | 0x02,0x0A,0x20,0x19,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEA,0x58,0x01,0xBE,0x01,0x00 }, | ||
359 | { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0xEF,0x00,0x00,0x04, | ||
360 | 0x40,0x05,0x13,0x00,0x00,0x03,0x26,0x03,0x88,0x0C,0x30,0x90,0x00,0x00,0x04,0x23, | ||
361 | 0x00,0x01,0x03,0x24,0x03,0x28,0x06,0x08,0x40,0x90,0x00,0x90,0x04,0x23,0x00,0x23, | ||
362 | 0x03,0x11,0x60,0x40,0x05,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x08,0x01,0x00,0x08,0x01, | ||
363 | 0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEA,0x58,0x01,0xBE,0x01,0x00 } | ||
292 | }; | 364 | }; |
293 | #endif | 365 | #endif |
294 | 366 | ||
295 | void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 367 | void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr); |
296 | void SiS_EnableCRT2(SiS_Private *SiS_Pr); | 368 | #ifndef SIS_LINUX_KERNEL |
297 | USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); | 369 | void SiS_LockCRT2(struct SiS_Private *SiS_Pr); |
298 | void SiS_WaitRetrace1(SiS_Private *SiS_Pr); | 370 | #endif |
299 | BOOLEAN SiS_IsDualEdge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 371 | void SiS_EnableCRT2(struct SiS_Private *SiS_Pr); |
300 | BOOLEAN SiS_IsVAMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 372 | unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); |
301 | void SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo); | 373 | void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr); |
302 | void SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo, | 374 | BOOLEAN SiS_IsDualEdge(struct SiS_Private *SiS_Pr); |
303 | USHORT ModeIdIndex, PSIS_HW_INFO HwInfo, | 375 | BOOLEAN SiS_IsVAMode(struct SiS_Private *SiS_Pr); |
304 | int checkcrt2mode); | 376 | void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, |
305 | void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 377 | unsigned short ModeIdIndex, int checkcrt2mode); |
306 | void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); | 378 | void SiS_SetYPbPr(struct SiS_Private *SiS_Pr); |
307 | void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); | 379 | void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo, |
308 | USHORT SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, | 380 | unsigned short ModeIdIndex); |
309 | USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo); | 381 | void SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, |
310 | USHORT SiS_GetResInfo(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex); | 382 | unsigned short ModeIdIndex); |
311 | void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 383 | unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex, |
312 | BOOLEAN SiS_SetCRT2Group(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo); | 384 | unsigned short RefreshRateTableIndex); |
313 | void SiS_SiS30xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 385 | unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr,unsigned short ModeNo,unsigned short ModeIdIndex); |
314 | void SiS_SiS30xBLOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 386 | void SiS_DisableBridge(struct SiS_Private *SiS_Pr); |
387 | #ifndef SIS_LINUX_KERNEL | ||
388 | void SiS_EnableBridge(struct SiS_Private *SiS_Pr); | ||
389 | #endif | ||
390 | BOOLEAN SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo); | ||
391 | void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr); | ||
392 | void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr); | ||
315 | 393 | ||
316 | void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempax); | 394 | void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val); |
317 | USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax); | 395 | unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax); |
318 | void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempax); | 396 | void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val); |
319 | USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempax); | 397 | unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax); |
320 | void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh); | 398 | #ifndef SIS_LINUX_KERNEL |
399 | void SiS_SetCH70xx(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val); | ||
400 | unsigned short SiS_GetCH70xx(struct SiS_Private *SiS_Pr, unsigned short tempax); | ||
401 | #endif | ||
402 | void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg, | ||
403 | unsigned char orval,unsigned short andval); | ||
321 | #ifdef SIS315H | 404 | #ifdef SIS315H |
322 | static void SiS_Chrontel701xOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 405 | static void SiS_Chrontel701xOn(struct SiS_Private *SiS_Pr); |
323 | static void SiS_Chrontel701xOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 406 | static void SiS_Chrontel701xOff(struct SiS_Private *SiS_Pr); |
324 | static void SiS_ChrontelInitTVVSync(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 407 | static void SiS_ChrontelInitTVVSync(struct SiS_Private *SiS_Pr); |
325 | static void SiS_ChrontelDoSomething1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 408 | static void SiS_ChrontelDoSomething1(struct SiS_Private *SiS_Pr); |
326 | void SiS_Chrontel701xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); | 409 | void SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr); |
327 | void SiS_Chrontel701xBLOff(SiS_Private *SiS_Pr); | 410 | void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr); |
328 | #endif /* 315 */ | 411 | #endif /* 315 */ |
329 | 412 | ||
330 | #ifdef SIS300 | 413 | #ifdef SIS300 |
331 | #if 0 | 414 | static BOOLEAN SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr); |
332 | static void SiS_SetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx); | 415 | void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo); |
333 | static USHORT SiS_GetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx); | ||
334 | #endif | ||
335 | static BOOLEAN SiS_SetTrumpionBlock(SiS_Private *SiS_Pr, UCHAR *dataptr); | ||
336 | #endif | 416 | #endif |
337 | 417 | ||
338 | void SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime); | 418 | void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime); |
339 | USHORT SiS_ReadDDC1Bit(SiS_Private *SiS_Pr); | 419 | unsigned short SiS_ReadDDC1Bit(struct SiS_Private *SiS_Pr); |
340 | USHORT SiS_HandleDDC(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine, | 420 | unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine, |
341 | USHORT adaptnum, USHORT DDCdatatype, UCHAR *buffer); | 421 | unsigned short adaptnum, unsigned short DDCdatatype, |
342 | #ifdef LINUX_XF86 | 422 | unsigned char *buffer, unsigned int VBFlags2); |
343 | USHORT SiS_SenseLCDDDC(SiS_Private *SiS_Pr, SISPtr pSiS); | ||
344 | USHORT SiS_SenseVGA2DDC(SiS_Private *SiS_Pr, SISPtr pSiS); | ||
345 | #endif | ||
346 | 423 | ||
347 | static void SiS_SetSwitchDDC2(SiS_Private *SiS_Pr); | 424 | #ifdef SIS_XORG_XF86 |
348 | static USHORT SiS_SetStart(SiS_Private *SiS_Pr); | 425 | unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, |
349 | static USHORT SiS_SetStop(SiS_Private *SiS_Pr); | 426 | int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, |
350 | static USHORT SiS_SetSCLKLow(SiS_Private *SiS_Pr); | 427 | BOOLEAN checkcr32, unsigned int VBFlags2); |
351 | static USHORT SiS_SetSCLKHigh(SiS_Private *SiS_Pr); | 428 | unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr); |
352 | static USHORT SiS_ReadDDC2Data(SiS_Private *SiS_Pr, USHORT tempax); | 429 | unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, |
353 | static USHORT SiS_WriteDDC2Data(SiS_Private *SiS_Pr, USHORT tempax); | 430 | unsigned char *buffer); |
354 | static USHORT SiS_CheckACK(SiS_Private *SiS_Pr); | 431 | #else |
355 | static USHORT SiS_InitDDCRegs(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine, | 432 | static unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, |
356 | USHORT adaptnum, USHORT DDCdatatype, BOOLEAN checkcr32); | 433 | int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, |
357 | static USHORT SiS_WriteDABDDC(SiS_Private *SiS_Pr); | 434 | BOOLEAN checkcr32, unsigned int VBFlags2); |
358 | static USHORT SiS_PrepareReadDDC(SiS_Private *SiS_Pr); | 435 | static unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr); |
359 | static USHORT SiS_PrepareDDC(SiS_Private *SiS_Pr); | 436 | static unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, |
360 | static void SiS_SendACK(SiS_Private *SiS_Pr, USHORT yesno); | 437 | unsigned char *buffer); |
361 | static USHORT SiS_DoProbeDDC(SiS_Private *SiS_Pr); | 438 | #endif |
362 | static USHORT SiS_ProbeDDC(SiS_Private *SiS_Pr); | 439 | static void SiS_SetSwitchDDC2(struct SiS_Private *SiS_Pr); |
363 | static USHORT SiS_ReadDDC(SiS_Private *SiS_Pr, USHORT DDCdatatype, UCHAR *buffer); | 440 | static unsigned short SiS_SetStart(struct SiS_Private *SiS_Pr); |
441 | static unsigned short SiS_SetStop(struct SiS_Private *SiS_Pr); | ||
442 | static unsigned short SiS_SetSCLKLow(struct SiS_Private *SiS_Pr); | ||
443 | static unsigned short SiS_SetSCLKHigh(struct SiS_Private *SiS_Pr); | ||
444 | static unsigned short SiS_ReadDDC2Data(struct SiS_Private *SiS_Pr); | ||
445 | static unsigned short SiS_WriteDDC2Data(struct SiS_Private *SiS_Pr, unsigned short tempax); | ||
446 | static unsigned short SiS_CheckACK(struct SiS_Private *SiS_Pr); | ||
447 | static unsigned short SiS_WriteDABDDC(struct SiS_Private *SiS_Pr); | ||
448 | static unsigned short SiS_PrepareReadDDC(struct SiS_Private *SiS_Pr); | ||
449 | static unsigned short SiS_PrepareDDC(struct SiS_Private *SiS_Pr); | ||
450 | static void SiS_SendACK(struct SiS_Private *SiS_Pr, unsigned short yesno); | ||
451 | static unsigned short SiS_DoProbeDDC(struct SiS_Private *SiS_Pr); | ||
364 | 452 | ||
453 | #ifdef SIS300 | ||
454 | static void SiS_OEM300Setting(struct SiS_Private *SiS_Pr, | ||
455 | unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefTabindex); | ||
456 | static void SetOEMLCDData2(struct SiS_Private *SiS_Pr, | ||
457 | unsigned short ModeNo, unsigned short ModeIdIndex,unsigned short RefTableIndex); | ||
458 | #endif | ||
365 | #ifdef SIS315H | 459 | #ifdef SIS315H |
366 | static void SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, | 460 | static void SiS_OEM310Setting(struct SiS_Private *SiS_Pr, |
367 | USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI); | 461 | unsigned short ModeNo,unsigned short ModeIdIndex, unsigned short RRTI); |
368 | static void SiS_OEM661Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, | 462 | static void SiS_OEM661Setting(struct SiS_Private *SiS_Pr, |
369 | USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI); | 463 | unsigned short ModeNo,unsigned short ModeIdIndex, unsigned short RRTI); |
370 | static void SiS_FinalizeLCD(SiS_Private *, USHORT, USHORT, PSIS_HW_INFO); | 464 | static void SiS_FinalizeLCD(struct SiS_Private *, unsigned short, unsigned short); |
371 | #endif | 465 | #endif |
466 | |||
467 | extern void SiS_SetReg(SISIOADDRESS, unsigned short, unsigned short); | ||
468 | extern void SiS_SetRegByte(SISIOADDRESS, unsigned short); | ||
469 | extern void SiS_SetRegShort(SISIOADDRESS, unsigned short); | ||
470 | extern void SiS_SetRegLong(SISIOADDRESS, unsigned int); | ||
471 | extern unsigned char SiS_GetReg(SISIOADDRESS, unsigned short); | ||
472 | extern unsigned char SiS_GetRegByte(SISIOADDRESS); | ||
473 | extern unsigned short SiS_GetRegShort(SISIOADDRESS); | ||
474 | extern unsigned int SiS_GetRegLong(SISIOADDRESS); | ||
475 | extern void SiS_SetRegANDOR(SISIOADDRESS, unsigned short, unsigned short, unsigned short); | ||
476 | extern void SiS_SetRegOR(SISIOADDRESS, unsigned short, unsigned short); | ||
477 | extern void SiS_SetRegAND(SISIOADDRESS, unsigned short, unsigned short); | ||
478 | extern void SiS_DisplayOff(struct SiS_Private *SiS_Pr); | ||
479 | extern void SiS_DisplayOn(struct SiS_Private *SiS_Pr); | ||
480 | extern BOOLEAN SiS_SearchModeID(struct SiS_Private *, unsigned short *, unsigned short *); | ||
481 | extern unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo, | ||
482 | unsigned short ModeIdIndex); | ||
483 | extern unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); | ||
484 | extern unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); | ||
485 | extern unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex, | ||
486 | unsigned short RefreshRateTableIndex); | ||
487 | extern void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, | ||
488 | unsigned short ModeIdIndex); | ||
489 | extern void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo, | ||
490 | unsigned short ModeIdIndex); | ||
491 | extern void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth); | ||
492 | extern unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide); | ||
493 | extern unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide); | ||
372 | #ifdef SIS300 | 494 | #ifdef SIS300 |
373 | static void SiS_OEM300Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, | 495 | extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *tempbx, |
374 | USHORT ModeNo, USHORT ModeIdIndex, USHORT RefTabindex); | 496 | unsigned short *tempcl); |
375 | static void SetOEMLCDData2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, | 497 | extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl); |
376 | USHORT ModeNo, USHORT ModeIdIndex,USHORT RefTableIndex); | 498 | extern unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index); |
499 | #ifdef SIS_LINUX_KERNEL | ||
500 | extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg); | ||
501 | extern unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg); | ||
377 | #endif | 502 | #endif |
378 | |||
379 | extern void SiS_SetReg(SISIOADDRESS, USHORT, USHORT); | ||
380 | extern void SiS_SetRegByte(SISIOADDRESS, USHORT); | ||
381 | extern void SiS_SetRegShort(SISIOADDRESS, USHORT); | ||
382 | extern void SiS_SetRegLong(SISIOADDRESS, ULONG); | ||
383 | extern UCHAR SiS_GetReg(SISIOADDRESS, USHORT); | ||
384 | extern UCHAR SiS_GetRegByte(SISIOADDRESS); | ||
385 | extern USHORT SiS_GetRegShort(SISIOADDRESS); | ||
386 | extern ULONG SiS_GetRegLong(SISIOADDRESS); | ||
387 | extern void SiS_SetRegANDOR(SISIOADDRESS, USHORT, USHORT, USHORT); | ||
388 | extern void SiS_SetRegOR(SISIOADDRESS, USHORT, USHORT); | ||
389 | extern void SiS_SetRegAND(SISIOADDRESS, USHORT, USHORT); | ||
390 | extern void SiS_DisplayOff(SiS_Private *SiS_Pr); | ||
391 | extern void SiS_DisplayOn(SiS_Private *SiS_Pr); | ||
392 | extern BOOLEAN SiS_SearchModeID(SiS_Private *, USHORT *, USHORT *); | ||
393 | extern UCHAR SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex); | ||
394 | extern USHORT SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex); | ||
395 | extern USHORT SiS_GetOffset(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, | ||
396 | USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo); | ||
397 | extern void SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO, USHORT ModeNo, | ||
398 | USHORT ModeIdIndex); | ||
399 | extern void SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex); | ||
400 | #ifdef LINUX_XF86 | ||
401 | extern void SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c); | ||
402 | extern int SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct, | ||
403 | int *maxx, int *maxy, int *prefx, int *prefy); | ||
404 | #endif | 503 | #endif |
405 | 504 | ||
406 | #endif | 505 | #endif |