aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sis/init301.h
diff options
context:
space:
mode:
authorThomas Winischhofer <thomas@winischhofer.net>2005-09-09 16:04:45 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:58:01 -0400
commit544393fe584d333480659a4bed30f5295355df11 (patch)
tree873b30c67cdbb5cb93e6fd816692db312ed6ddd6 /drivers/video/sis/init301.h
parent5c06e2aa6339112befdc87b350b8bf712890d7a7 (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.h351
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
81static const UCHAR SiS_YPbPrTable[3][64] = { 86static 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
126static const UCHAR SiS_HiTVGroup3_1[] = { 131static 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
153static 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
137static const UCHAR SiS_HiTVGroup3_2[] = { 164static 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
150static const UCHAR SiS_Part2CLVX_1[] = { 177static 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
158static const UCHAR SiS_Part2CLVX_2[] = { 185static 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
166static const UCHAR SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */ 193static 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
185static const UCHAR SiS_Part2CLVX_4[] = { /* PAL */ 212static 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
204static const UCHAR SiS_Part2CLVX_5[] = { /* 750p */ 231static 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
213static const UCHAR SiS_Part2CLVX_6[] = { /* 1080i */ 240static 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) */
224static const UCHAR SiS_LCDStruct661[] = { 251static 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
256static UCHAR SiS300_TrumpionData[7][80] = { 292static 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
295void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 367void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
296void SiS_EnableCRT2(SiS_Private *SiS_Pr); 368#ifndef SIS_LINUX_KERNEL
297USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); 369void SiS_LockCRT2(struct SiS_Private *SiS_Pr);
298void SiS_WaitRetrace1(SiS_Private *SiS_Pr); 370#endif
299BOOLEAN SiS_IsDualEdge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 371void SiS_EnableCRT2(struct SiS_Private *SiS_Pr);
300BOOLEAN SiS_IsVAMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 372unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
301void SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo); 373void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
302void SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo, 374BOOLEAN SiS_IsDualEdge(struct SiS_Private *SiS_Pr);
303 USHORT ModeIdIndex, PSIS_HW_INFO HwInfo, 375BOOLEAN SiS_IsVAMode(struct SiS_Private *SiS_Pr);
304 int checkcrt2mode); 376void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
305void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 377 unsigned short ModeIdIndex, int checkcrt2mode);
306void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); 378void SiS_SetYPbPr(struct SiS_Private *SiS_Pr);
307void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); 379void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
308USHORT SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, 380 unsigned short ModeIdIndex);
309 USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo); 381void SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
310USHORT SiS_GetResInfo(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex); 382 unsigned short ModeIdIndex);
311void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 383unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex,
312BOOLEAN SiS_SetCRT2Group(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo); 384 unsigned short RefreshRateTableIndex);
313void SiS_SiS30xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 385unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr,unsigned short ModeNo,unsigned short ModeIdIndex);
314void SiS_SiS30xBLOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 386void SiS_DisableBridge(struct SiS_Private *SiS_Pr);
387#ifndef SIS_LINUX_KERNEL
388void SiS_EnableBridge(struct SiS_Private *SiS_Pr);
389#endif
390BOOLEAN SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
391void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr);
392void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr);
315 393
316void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempax); 394void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
317USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax); 395unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
318void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempax); 396void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
319USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempax); 397unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax);
320void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh); 398#ifndef SIS_LINUX_KERNEL
399void SiS_SetCH70xx(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
400unsigned short SiS_GetCH70xx(struct SiS_Private *SiS_Pr, unsigned short tempax);
401#endif
402void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
403 unsigned char orval,unsigned short andval);
321#ifdef SIS315H 404#ifdef SIS315H
322static void SiS_Chrontel701xOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 405static void SiS_Chrontel701xOn(struct SiS_Private *SiS_Pr);
323static void SiS_Chrontel701xOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 406static void SiS_Chrontel701xOff(struct SiS_Private *SiS_Pr);
324static void SiS_ChrontelInitTVVSync(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 407static void SiS_ChrontelInitTVVSync(struct SiS_Private *SiS_Pr);
325static void SiS_ChrontelDoSomething1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 408static void SiS_ChrontelDoSomething1(struct SiS_Private *SiS_Pr);
326void SiS_Chrontel701xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 409void SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr);
327void SiS_Chrontel701xBLOff(SiS_Private *SiS_Pr); 410void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr);
328#endif /* 315 */ 411#endif /* 315 */
329 412
330#ifdef SIS300 413#ifdef SIS300
331#if 0 414static BOOLEAN SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr);
332static void SiS_SetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx); 415void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);
333static USHORT SiS_GetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx);
334#endif
335static BOOLEAN SiS_SetTrumpionBlock(SiS_Private *SiS_Pr, UCHAR *dataptr);
336#endif 416#endif
337 417
338void SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime); 418void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime);
339USHORT SiS_ReadDDC1Bit(SiS_Private *SiS_Pr); 419unsigned short SiS_ReadDDC1Bit(struct SiS_Private *SiS_Pr);
340USHORT SiS_HandleDDC(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine, 420unsigned 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);
343USHORT SiS_SenseLCDDDC(SiS_Private *SiS_Pr, SISPtr pSiS);
344USHORT SiS_SenseVGA2DDC(SiS_Private *SiS_Pr, SISPtr pSiS);
345#endif
346 423
347static void SiS_SetSwitchDDC2(SiS_Private *SiS_Pr); 424#ifdef SIS_XORG_XF86
348static USHORT SiS_SetStart(SiS_Private *SiS_Pr); 425unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags,
349static USHORT SiS_SetStop(SiS_Private *SiS_Pr); 426 int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype,
350static USHORT SiS_SetSCLKLow(SiS_Private *SiS_Pr); 427 BOOLEAN checkcr32, unsigned int VBFlags2);
351static USHORT SiS_SetSCLKHigh(SiS_Private *SiS_Pr); 428unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr);
352static USHORT SiS_ReadDDC2Data(SiS_Private *SiS_Pr, USHORT tempax); 429unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype,
353static USHORT SiS_WriteDDC2Data(SiS_Private *SiS_Pr, USHORT tempax); 430 unsigned char *buffer);
354static USHORT SiS_CheckACK(SiS_Private *SiS_Pr); 431#else
355static USHORT SiS_InitDDCRegs(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine, 432static 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,
357static USHORT SiS_WriteDABDDC(SiS_Private *SiS_Pr); 434 BOOLEAN checkcr32, unsigned int VBFlags2);
358static USHORT SiS_PrepareReadDDC(SiS_Private *SiS_Pr); 435static unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr);
359static USHORT SiS_PrepareDDC(SiS_Private *SiS_Pr); 436static unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype,
360static void SiS_SendACK(SiS_Private *SiS_Pr, USHORT yesno); 437 unsigned char *buffer);
361static USHORT SiS_DoProbeDDC(SiS_Private *SiS_Pr); 438#endif
362static USHORT SiS_ProbeDDC(SiS_Private *SiS_Pr); 439static void SiS_SetSwitchDDC2(struct SiS_Private *SiS_Pr);
363static USHORT SiS_ReadDDC(SiS_Private *SiS_Pr, USHORT DDCdatatype, UCHAR *buffer); 440static unsigned short SiS_SetStart(struct SiS_Private *SiS_Pr);
441static unsigned short SiS_SetStop(struct SiS_Private *SiS_Pr);
442static unsigned short SiS_SetSCLKLow(struct SiS_Private *SiS_Pr);
443static unsigned short SiS_SetSCLKHigh(struct SiS_Private *SiS_Pr);
444static unsigned short SiS_ReadDDC2Data(struct SiS_Private *SiS_Pr);
445static unsigned short SiS_WriteDDC2Data(struct SiS_Private *SiS_Pr, unsigned short tempax);
446static unsigned short SiS_CheckACK(struct SiS_Private *SiS_Pr);
447static unsigned short SiS_WriteDABDDC(struct SiS_Private *SiS_Pr);
448static unsigned short SiS_PrepareReadDDC(struct SiS_Private *SiS_Pr);
449static unsigned short SiS_PrepareDDC(struct SiS_Private *SiS_Pr);
450static void SiS_SendACK(struct SiS_Private *SiS_Pr, unsigned short yesno);
451static unsigned short SiS_DoProbeDDC(struct SiS_Private *SiS_Pr);
364 452
453#ifdef SIS300
454static void SiS_OEM300Setting(struct SiS_Private *SiS_Pr,
455 unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefTabindex);
456static 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
366static void SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, 460static 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);
368static void SiS_OEM661Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, 462static 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);
370static void SiS_FinalizeLCD(SiS_Private *, USHORT, USHORT, PSIS_HW_INFO); 464static void SiS_FinalizeLCD(struct SiS_Private *, unsigned short, unsigned short);
371#endif 465#endif
466
467extern void SiS_SetReg(SISIOADDRESS, unsigned short, unsigned short);
468extern void SiS_SetRegByte(SISIOADDRESS, unsigned short);
469extern void SiS_SetRegShort(SISIOADDRESS, unsigned short);
470extern void SiS_SetRegLong(SISIOADDRESS, unsigned int);
471extern unsigned char SiS_GetReg(SISIOADDRESS, unsigned short);
472extern unsigned char SiS_GetRegByte(SISIOADDRESS);
473extern unsigned short SiS_GetRegShort(SISIOADDRESS);
474extern unsigned int SiS_GetRegLong(SISIOADDRESS);
475extern void SiS_SetRegANDOR(SISIOADDRESS, unsigned short, unsigned short, unsigned short);
476extern void SiS_SetRegOR(SISIOADDRESS, unsigned short, unsigned short);
477extern void SiS_SetRegAND(SISIOADDRESS, unsigned short, unsigned short);
478extern void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
479extern void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
480extern BOOLEAN SiS_SearchModeID(struct SiS_Private *, unsigned short *, unsigned short *);
481extern unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
482 unsigned short ModeIdIndex);
483extern unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
484extern unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
485extern unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex,
486 unsigned short RefreshRateTableIndex);
487extern void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
488 unsigned short ModeIdIndex);
489extern void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
490 unsigned short ModeIdIndex);
491extern void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
492extern unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
493extern unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
372#ifdef SIS300 494#ifdef SIS300
373static void SiS_OEM300Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, 495extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *tempbx,
374 USHORT ModeNo, USHORT ModeIdIndex, USHORT RefTabindex); 496 unsigned short *tempcl);
375static void SetOEMLCDData2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, 497extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl);
376 USHORT ModeNo, USHORT ModeIdIndex,USHORT RefTableIndex); 498extern unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
499#ifdef SIS_LINUX_KERNEL
500extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
501extern unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg);
377#endif 502#endif
378
379extern void SiS_SetReg(SISIOADDRESS, USHORT, USHORT);
380extern void SiS_SetRegByte(SISIOADDRESS, USHORT);
381extern void SiS_SetRegShort(SISIOADDRESS, USHORT);
382extern void SiS_SetRegLong(SISIOADDRESS, ULONG);
383extern UCHAR SiS_GetReg(SISIOADDRESS, USHORT);
384extern UCHAR SiS_GetRegByte(SISIOADDRESS);
385extern USHORT SiS_GetRegShort(SISIOADDRESS);
386extern ULONG SiS_GetRegLong(SISIOADDRESS);
387extern void SiS_SetRegANDOR(SISIOADDRESS, USHORT, USHORT, USHORT);
388extern void SiS_SetRegOR(SISIOADDRESS, USHORT, USHORT);
389extern void SiS_SetRegAND(SISIOADDRESS, USHORT, USHORT);
390extern void SiS_DisplayOff(SiS_Private *SiS_Pr);
391extern void SiS_DisplayOn(SiS_Private *SiS_Pr);
392extern BOOLEAN SiS_SearchModeID(SiS_Private *, USHORT *, USHORT *);
393extern UCHAR SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
394extern USHORT SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
395extern USHORT SiS_GetOffset(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
396 USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
397extern void SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO, USHORT ModeNo,
398 USHORT ModeIdIndex);
399extern void SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
400#ifdef LINUX_XF86
401extern void SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c);
402extern 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