e:/XFree86 for RH 8.0/XFree86-4.2.0/xc/programs/Xserver/hw/kdrive/trident/trident.c File Reference

Go to the source code of this file.

Functions

Bool tridentCardInit (KdCardInfo *card)
Bool tridentScreenInit (KdScreenInfo *screen)
Bool tridentInitScreen (ScreenPtr pScreen)
Bool tridentFinishInitScreen (ScreenPtr pScreen)
CARD8 tridentReadIndex (TridentCardInfo *tridentc, CARD16 port, CARD8 index)
void tridentWriteIndex (TridentCardInfo *tridentc, CARD16 port, CARD8 index, CARD8 value)
CARD8 tridentReadReg (TridentCardInfo *tridentc, CARD16 port)
void tridentWriteReg (TridentCardInfo *tridentc, CARD16 port, CARD8 value)
void tridentPause ()
void tridentPreserve (KdCardInfo *card)
void tridentSetCLK (int clock, CARD8 *a, CARD8 *b)
void tridentSetMCLK (int clock, CARD8 *a, CARD8 *b)
void tridentSetMMIO (TridentCardInfo *tridentc)
void tridentResetMMIO (TridentCardInfo *tridentc)
Bool tridentEnable (ScreenPtr pScreen)
void tridentDisable (ScreenPtr pScreen)
Bool tridentDPMS (ScreenPtr pScreen, int mode)
void tridentRestore (KdCardInfo *card)
void tridentScreenFini (KdScreenInfo *screen)
void tridentCardFini (KdCardInfo *card)

Variables

int trident_clk = 0
int trident_mclk = 0
const CARD8 tridentDPMSModes [4]
KdCardFuncs tridentFuncs


Function Documentation

Bool tridentCardInit KdCardInfo card  ) 
 

Definition at line 39 of file trident.c.

References card, _tridentCardInfo::cop, _tridentCardInfo::cop_base, Card::driver, ErrorF(), _tridentCardInfo::fb, fbdevInitialize(), iopl(), k, KdMapDevice(), KdSetMappedMode(), _tridentCardInfo::mmio, pixels, TridentCardInfo, tridentReadIndex(), _tridentCardInfo::vesa, vesaInitialize(), _tridentCardInfo::window, xalloc(), and xfree().

00040 { 00041 int k; 00042 char *pixels; 00043 TridentCardInfo *tridentc; 00044 CARD8 r39; 00045 00046 tridentc = (TridentCardInfo *) xalloc (sizeof (TridentCardInfo)); 00047 if (!tridentc) 00048 return FALSE; 00049 00050 iopl (3); 00051 tridentc->cop_base = (CARD8 *) KdMapDevice (TRIDENT_COP_BASE(card), 00052 TRIDENT_COP_SIZE(card)); 00053 00054 if (tridentc->cop_base) 00055 { 00056 KdSetMappedMode (TRIDENT_COP_BASE(card), 00057 TRIDENT_COP_SIZE(card), 00058 KD_MAPPED_MODE_REGISTERS); 00059 } 00060 tridentc->cop = (Cop *) (tridentc->cop_base + TRIDENT_COP_OFF(card)); 00061 tridentc->mmio = FALSE; 00062 r39 = tridentReadIndex (tridentc, 0x3d4, 0x39); 00063 if (r39 & 1) 00064 { 00065 tridentc->mmio = TRUE; 00066 r39 = tridentReadIndex (tridentc, 0x3d4, 0x39); 00067 if ((r39 & 1) == 0) 00068 { 00069 ErrorF ("Trident: inconsisent IO mapping values\n"); 00070 return FALSE; 00071 } 00072 } 00073 00074 #ifdef VESA 00075 if (!vesaInitialize (card, &tridentc->vesa)) 00076 #else 00077 if (!fbdevInitialize (card, &tridentc->fb)) 00078 #endif 00079 { 00080 xfree (tridentc); 00081 return FALSE; 00082 } 00083 00084 #ifdef USE_PCI 00085 tridentc->window = (CARD32 *) (tridentc->cop_base + 0x10000); 00086 #else 00087 tridentc->window = 0; 00088 #endif 00089 card->driver = tridentc; 00090 00091 return TRUE; 00092 }

Bool tridentScreenInit KdScreenInfo screen  ) 
 

Definition at line 95 of file trident.c.

References _tridentCardInfo::cop, _tridentScreenInfo::cursor_base, _fbdevPriv::fb, _tridentCardInfo::fb, _VesaScreenPriv::fb, _VesaScreenPriv::fb_size, _tridentScreenInfo::fbdev, fbdevScreenInitialize(), _Screen::height, _VesaScreenPriv::mapping, _tridentScreenInfo::off_screen, _tridentScreenInfo::off_screen_size, _tridentScreenInfo::screen, screen, TridentScreenInfo, _tridentScreenInfo::vesa, vesaScreenInitialize(), xalloc(), and xfree().

00096 { 00097 TridentCardInfo *tridentc = screen->card->driver; 00098 TridentScreenInfo *tridents; 00099 int screen_size, memory; 00100 00101 tridents = (TridentScreenInfo *) xalloc (sizeof (TridentScreenInfo)); 00102 if (!tridents) 00103 return FALSE; 00104 memset (tridents, '\0', sizeof (TridentScreenInfo)); 00105 #ifdef VESA 00106 if (!vesaScreenInitialize (screen, &tridents->vesa)) 00107 #else 00108 if (!fbdevScreenInitialize (screen, &tridents->fbdev)) 00109 #endif 00110 { 00111 xfree (tridents); 00112 return FALSE; 00113 } 00114 if (!tridentc->cop) 00115 screen->dumb = TRUE; 00116 #ifdef VESA 00117 if (tridents->vesa.mapping != VESA_LINEAR) 00118 screen->dumb = TRUE; 00119 tridents->screen = tridents->vesa.fb; 00120 memory = tridents->vesa.fb_size; 00121 #else 00122 tridents->screen = tridentc->fb.fb; 00123 memory = (2048 + 512) * 1024; 00124 #endif 00125 screen_size = screen->fb[0].byteStride * screen->height; 00126 if (tridents->screen && memory >= screen_size + 2048) 00127 { 00128 memory -= 2048; 00129 tridents->cursor_base = tridents->screen + memory - 2048; 00130 } 00131 else 00132 tridents->cursor_base = 0; 00133 memory -= screen_size; 00134 if (memory > screen->fb[0].byteStride) 00135 { 00136 tridents->off_screen = tridents->screen + screen_size; 00137 tridents->off_screen_size = memory; 00138 } 00139 else 00140 { 00141 tridents->off_screen = 0; 00142 tridents->off_screen_size = 0; 00143 } 00144 screen->driver = tridents; 00145 return TRUE; 00146 }

Bool tridentInitScreen ScreenPtr  pScreen  ) 
 

Definition at line 149 of file trident.c.

References fbdevInitScreen(), pScreen, and vesaInitScreen().

00150 { 00151 #ifdef VESA 00152 return vesaInitScreen (pScreen); 00153 #else 00154 return fbdevInitScreen (pScreen); 00155 #endif 00156 }

Bool tridentFinishInitScreen ScreenPtr  pScreen  ) 
 

Definition at line 159 of file trident.c.

References pScreen, and vesaFinishInitScreen().

00160 { 00161 #ifdef VESA 00162 return vesaFinishInitScreen (pScreen); 00163 #endif 00164 }

CARD8 tridentReadIndex TridentCardInfo tridentc,
CARD16  port,
CARD8  index
 

Definition at line 167 of file trident.c.

References _tridentCardInfo::cop_base, inb(), index, _tridentCardInfo::mmio, outb(), and value.

Referenced by tridentCardInit(), tridentPreserve(), and tridentSetMMIO().

00168 { 00169 CARD8 value; 00170 00171 if (tridentc->mmio) 00172 { 00173 tridentc->cop_base[port] = index; 00174 value = tridentc->cop_base[port+1]; 00175 } 00176 else 00177 { 00178 outb (index, port); 00179 value = inb (port+1); 00180 } 00181 return value; 00182 }

void tridentWriteIndex TridentCardInfo tridentc,
CARD16  port,
CARD8  index,
CARD8  value
 

Definition at line 185 of file trident.c.

References _tridentCardInfo::cop_base, index, _tridentCardInfo::mmio, outb(), and value.

Referenced by _tridentMoveCursor(), tridentDPMS(), tridentLoadCursor(), tridentResetMMIO(), tridentSetCursorColors(), tridentSetMMIO(), and tridentUnloadCursor().

00186 { 00187 if (tridentc->mmio) 00188 { 00189 tridentc->cop_base[port] = index; 00190 tridentc->cop_base[port+1] = value; 00191 } 00192 else 00193 { 00194 outb (index, port); 00195 outb (value, port+1); 00196 } 00197 }

CARD8 tridentReadReg TridentCardInfo tridentc,
CARD16  port
 

Definition at line 200 of file trident.c.

References _tridentCardInfo::cop_base, inb(), _tridentCardInfo::mmio, and value.

Referenced by tridentPreserve(), and tridentSetMMIO().

00201 { 00202 CARD8 value; 00203 00204 if (tridentc->mmio) 00205 { 00206 value = tridentc->cop_base[port]; 00207 } 00208 else 00209 { 00210 value = inb (port); 00211 } 00212 return value; 00213 }

void tridentWriteReg TridentCardInfo tridentc,
CARD16  port,
CARD8  value
 

Definition at line 216 of file trident.c.

References _tridentCardInfo::cop_base, _tridentCardInfo::mmio, outb(), and value.

Referenced by tridentResetMMIO(), and tridentSetMMIO().

00217 { 00218 if (tridentc->mmio) 00219 { 00220 tridentc->cop_base[port] = value; 00221 } 00222 else 00223 { 00224 outb (value, port); 00225 } 00226 }

void tridentPause  ) 
 

Definition at line 230 of file trident.c.

Referenced by tridentDPMS(), tridentPreserve(), and tridentResetMMIO().

00231 { 00232 struct timeval tv; 00233 00234 tv.tv_sec = 0; 00235 tv.tv_usec = 50 * 1000; 00236 select (1, 0, 0, 0, &tv); 00237 }

void tridentPreserve KdCardInfo card  ) 
 

Definition at line 240 of file trident.c.

References card, Card::driver, ErrorF(), fbdevPreserve(), _tridentSave::reg_3c2, _tridentSave::reg_3c4_0e, _tridentSave::reg_3c4_16, _tridentSave::reg_3c4_17, _tridentSave::reg_3c4_18, _tridentSave::reg_3c4_19, _tridentSave::reg_3ce_21, _tridentSave::reg_3d4_36, _tridentSave::reg_3d4_39, _tridentSave::reg_3d4_62, _tridentCardInfo::save, tridentPause(), tridentReadIndex(), tridentReadReg(), and vesaPreserve().

00241 { 00242 TridentCardInfo *tridentc = card->driver; 00243 00244 #ifdef VESA 00245 vesaPreserve(card); 00246 #else 00247 fbdevPreserve (card); 00248 #endif 00249 tridentPause (); 00250 tridentc->save.reg_3c4_0e = tridentReadIndex (tridentc, 0x3c4, 0x0e); 00251 tridentc->save.reg_3d4_36 = tridentReadIndex (tridentc, 0x3d4, 0x36); 00252 tridentc->save.reg_3d4_39 = tridentReadIndex (tridentc, 0x3d4, 0x39); 00253 tridentc->save.reg_3d4_62 = tridentReadIndex (tridentc, 0x3d4, 0x62); 00254 tridentc->save.reg_3ce_21 = tridentReadIndex (tridentc, 0x3ce, 0x21); 00255 tridentc->save.reg_3c2 = tridentReadReg (tridentc, 0x3cc); 00256 tridentc->save.reg_3c4_16 = tridentReadIndex (tridentc, 0x3c4, 0x16); 00257 tridentc->save.reg_3c4_17 = tridentReadIndex (tridentc, 0x3c4, 0x17); 00258 tridentc->save.reg_3c4_18 = tridentReadIndex (tridentc, 0x3c4, 0x18); 00259 tridentc->save.reg_3c4_19 = tridentReadIndex (tridentc, 0x3c4, 0x19); 00260 ErrorF ("clk low 0x%x high 0x%x freq %d\n", 00261 tridentc->save.reg_3c4_18, 00262 tridentc->save.reg_3c4_19, 00263 CLK_FREQ(tridentc->save.reg_3c4_18, 00264 tridentc->save.reg_3c4_19)); 00265 #ifdef TRI_DEBUG 00266 fprintf (stderr, "3c4 0e: %02x\n", tridentc->save.reg_3c4_0e); 00267 fprintf (stderr, "3d4 36: %02x\n", tridentc->save.reg_3d4_36); 00268 fprintf (stderr, "3d4 39: %02x\n", tridentc->save.reg_3d4_39); 00269 fprintf (stderr, "3d4 62: %02x\n", tridentc->save.reg_3d4_62); 00270 fprintf (stderr, "3ce 21: %02x\n", tridentc->save.reg_3ce_21); 00271 fflush (stderr); 00272 #endif 00273 tridentPause (); 00274 }

void tridentSetCLK int  clock,
CARD8 *  a,
CARD8 *  b
 

Definition at line 277 of file trident.c.

References a, b, ErrorF(), FatalError(), k, n, and r.

Referenced by pcmciaEnable(), and tridentSetMMIO().

00278 { 00279 int powerup[4] = { 1,2,4,8 }; 00280 int clock_diff = 750; 00281 int freq, ffreq; 00282 int m, n, k; 00283 int p, q, r, s; 00284 int startn, endn; 00285 int endm, endk; 00286 00287 p = q = r = s = 0; 00288 00289 startn = 64; 00290 endn = 255; 00291 endm = 63; 00292 endk = 3; 00293 00294 freq = clock; 00295 00296 for (k=0;k<=endk;k++) 00297 for (n=startn;n<=endn;n++) 00298 for (m=1;m<=endm;m++) 00299 { 00300 ffreq = ( ( ((n + 8) * CLOCK) / ((m + 2) * powerup[k]) )); 00301 if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff)) 00302 { 00303 clock_diff = (freq > ffreq) ? freq - ffreq : ffreq - freq; 00304 p = n; q = m; r = k; s = ffreq; 00305 } 00306 } 00307 00308 ErrorF ("ffreq %d clock %d\n", s, clock); 00309 if (s == 0) 00310 { 00311 FatalError("Unable to set programmable clock.\n" 00312 "Frequency %d is not a valid clock.\n" 00313 "Please modify XF86Config for a new clock.\n", 00314 freq); 00315 } 00316 00317 /* N is all 8bits */ 00318 *a = p; 00319 /* M is first 6bits, with K last 2bits */ 00320 *b = (q & 0x3F) | (r << 6); 00321 }

void tridentSetMCLK int  clock,
CARD8 *  a,
CARD8 *  b
 

Definition at line 324 of file trident.c.

References a, b, FatalError(), k, n, and r.

Referenced by tridentSetMMIO().

00325 { 00326 int powerup[4] = { 1,2,4,8 }; 00327 int clock_diff = 750; 00328 int freq, ffreq; 00329 int m,n,k; 00330 int p, q, r, s; 00331 int startn, endn; 00332 int endm, endk; 00333 00334 p = q = r = s = 0; 00335 00336 startn = 64; 00337 endn = 255; 00338 endm = 63; 00339 endk = 3; 00340 00341 freq = clock; 00342 00343 for (k=0;k<=endk;k++) 00344 for (n=startn;n<=endn;n++) 00345 for (m=1;m<=endm;m++) { 00346 ffreq = ((((n+8)*CLOCK)/((m+2)*powerup[k]))); 00347 if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff)) 00348 { 00349 clock_diff = (freq > ffreq) ? freq - ffreq : ffreq - freq; 00350 p = n; q = m; r = k; s = ffreq; 00351 } 00352 } 00353 00354 if (s == 0) 00355 { 00356 FatalError("Unable to set memory clock.\n" 00357 "Frequency %d is not a valid clock.\n" 00358 "Please modify XF86Config for a new clock.\n", 00359 freq); 00360 } 00361 00362 /* N is all 8bits */ 00363 *a = p; 00364 /* M is first 6bits, with K last 2bits */ 00365 *b = (q & 0x3F) | (r << 6); 00366 }

void tridentSetMMIO TridentCardInfo tridentc  ) 
 

Definition at line 369 of file trident.c.

References a, b, _tridentCardInfo::cop, ErrorF(), FatalError(), _tridentCardInfo::mmio, mode, _tridentSave::reg_3c4_0e, _tridentSave::reg_3d4_62, _tridentCardInfo::save, _cop::status, trident_clk, trident_mclk, tridentReadIndex(), tridentReadReg(), tridentSetCLK(), tridentSetMCLK(), tridentWriteIndex(), tridentWriteReg(), and v.

Referenced by tridentEnable().

00370 { 00371 int tries; 00372 CARD8 v; 00373 00374 #ifdef TRI_DEBUG 00375 fprintf (stderr, "Set MMIO\n"); 00376 #endif 00377 /* enable config port writes */ 00378 for (tries = 0; tries < 3; tries++) 00379 { 00380 /* enable direct read when GE busy, enable PCI retries */ 00381 tridentWriteIndex (tridentc, 0x3d4, 0x62, 00382 tridentc->save.reg_3d4_62 | 0x70); 00383 /* make sure the chip is in new mode */ 00384 tridentReadIndex (tridentc, 0x3c4, 0xb); 00385 /* enable access to upper registers */ 00386 tridentWriteIndex (tridentc, 0x3c4, 0xe, 00387 tridentc->save.reg_3c4_0e | 0x80); 00388 v = tridentReadIndex (tridentc, 0x3c4, 0xe); 00389 if (!(v & 0x80)) 00390 { 00391 fprintf (stderr, "Trident GE not enabled 0x%x\n", v); 00392 continue; 00393 } 00394 /* enable screen */ 00395 tridentWriteIndex (tridentc, 0x3ce, 0x21, 0x80); 00396 #ifdef USE_PCI 00397 /* enable burst r/w, enable memory mapped ports */ 00398 tridentWriteIndex (tridentc, 0x3d4, 0x39, 7); 00399 tridentc->mmio = TRUE; 00400 /* reset GE, enable GE, set GE to pci 1 */ 00401 tridentWriteIndex (tridentc, 0x3d4, 0x36, 0x90); 00402 #else 00403 /* enable burst r/w, disable memory mapped ports */ 00404 tridentWriteIndex (tridentc, 0x3d4, 0x39, 0x6); 00405 /* reset GE, enable GE, set GE to 0xbff00 */ 00406 tridentWriteIndex (tridentc, 0x3d4, 0x36, 0x92); 00407 #endif 00408 /* set clock */ 00409 if (trident_clk) 00410 { 00411 CARD8 a, b; 00412 00413 a = tridentReadIndex (tridentc, 0x3c4, 0x18); 00414 b = tridentReadIndex (tridentc, 0x3c4, 0x19); 00415 ErrorF ("old clock 0x%x 0x%x %d\n", 00416 a, b, CLK_FREQ(a,b)); 00417 tridentSetCLK (trident_clk, &a, &b); 00418 ErrorF ("clk %d-> 0x%x 0x%x %d\n", trident_clk, a, b, 00419 CLK_FREQ(a,b)); 00420 #if 1 00421 tridentWriteIndex (tridentc, 0x3c4, 0x18, a); 00422 tridentWriteIndex (tridentc, 0x3c4, 0x19, b); 00423 #endif 00424 } 00425 if (trident_mclk) 00426 { 00427 CARD8 a, b; 00428 00429 tridentSetMCLK (trident_mclk, &a, &b); 00430 ErrorF ("mclk %d -> 0x%x 0x%x\n", trident_mclk, a, b); 00431 #if 0 00432 tridentWriteIndex (tridentc, 0x3c4, 0x16, a); 00433 tridentWriteIndex (tridentc, 0x3c4, 0x17, b); 00434 #endif 00435 } 00436 if (trident_clk || trident_mclk) 00437 { 00438 CARD8 mode; 00439 00440 mode = tridentReadReg (tridentc, 0x3cc); 00441 ErrorF ("old mode 0x%x\n", mode); 00442 mode = (mode & 0xf3) | 0x08; 00443 ErrorF ("new mode 0x%x\n", mode); 00444 #if 1 00445 tridentWriteReg (tridentc, 0x3c2, mode); 00446 #endif 00447 } 00448 #ifdef TRI_DEBUG 00449 fprintf (stderr, "0x36: 0x%02x\n", 00450 tridentReadIndex (tridentc, 0x3d4, 0x36)); 00451 #endif 00452 if (tridentc->cop->status != 0xffffffff) 00453 break; 00454 } 00455 #ifdef TRI_DEBUG 00456 fprintf (stderr, "COP status 0x%x\n", tridentc->cop->status); 00457 #endif 00458 if (tridentc->cop->status == 0xffffffff) 00459 FatalError ("Trident COP not visible\n"); 00460 }

void tridentResetMMIO TridentCardInfo tridentc  ) 
 

Definition at line 463 of file trident.c.

References _tridentCardInfo::mmio, _tridentSave::reg_3c2, _tridentSave::reg_3c4_0e, _tridentSave::reg_3c4_16, _tridentSave::reg_3c4_17, _tridentSave::reg_3c4_18, _tridentSave::reg_3c4_19, _tridentSave::reg_3ce_21, _tridentSave::reg_3d4_36, _tridentSave::reg_3d4_39, _tridentSave::reg_3d4_62, _tridentCardInfo::save, tridentPause(), tridentWriteIndex(), and tridentWriteReg().

Referenced by tridentRestore().

00464 { 00465 #ifdef TRI_DEBUG 00466 fprintf (stderr, "Reset MMIO\n"); 00467 #endif 00468 tridentPause (); 00469 #if 0 00470 tridentWriteIndex (tridentc, 0x3c4, 0x16, tridentc->save.reg_3c4_16); 00471 tridentWriteIndex (tridentc, 0x3c4, 0x17, tridentc->save.reg_3c4_17); 00472 #endif 00473 tridentWriteIndex (tridentc, 0x3c4, 0x18, tridentc->save.reg_3c4_18); 00474 tridentWriteIndex (tridentc, 0x3c4, 0x19, tridentc->save.reg_3c4_19); 00475 tridentWriteReg (tridentc, 0x3c2, tridentc->save.reg_3c2); 00476 tridentPause (); 00477 tridentWriteIndex (tridentc, 0x3ce, 0x21, tridentc->save.reg_3ce_21); 00478 tridentPause (); 00479 tridentWriteIndex (tridentc, 0x3d4, 0x62, tridentc->save.reg_3d4_62); 00480 tridentWriteIndex (tridentc, 0x3d4, 0x39, tridentc->save.reg_3d4_39); 00481 tridentc->mmio = FALSE; 00482 tridentWriteIndex (tridentc, 0x3d4, 0x36, tridentc->save.reg_3d4_36); 00483 tridentWriteIndex (tridentc, 0x3c4, 0x0e, tridentc->save.reg_3c4_0e); 00484 tridentPause (); 00485 }

Bool tridentEnable ScreenPtr  pScreen  ) 
 

Definition at line 488 of file trident.c.

References fbdevEnable(), pScreen, tridentSetMMIO(), and vesaEnable().

00489 { 00490 KdScreenPriv(pScreen); 00491 TridentCardInfo *tridentc = pScreenPriv->card->driver; 00492 00493 #ifdef VESA 00494 if (!vesaEnable (pScreen)) 00495 return FALSE; 00496 #else 00497 if (!fbdevEnable (pScreen)) 00498 return FALSE; 00499 #endif 00500 tridentSetMMIO (tridentc); 00501 return TRUE; 00502 }

void tridentDisable ScreenPtr  pScreen  ) 
 

Definition at line 505 of file trident.c.

References fbdevDisable(), pScreen, and vesaDisable().

00506 { 00507 #ifdef VESA 00508 vesaDisable (pScreen); 00509 #else 00510 fbdevDisable (pScreen); 00511 #endif 00512 }

Bool tridentDPMS ScreenPtr  pScreen,
int  mode
 

Definition at line 524 of file trident.c.

References mode, pScreen, tridentDPMSModes, tridentPause(), and tridentWriteIndex().

00525 { 00526 KdScreenPriv(pScreen); 00527 TridentCardInfo *tridentc = pScreenPriv->card->driver; 00528 00529 tridentWriteIndex (tridentc, 0x3ce, 0x21, tridentDPMSModes[mode]); 00530 tridentPause (); 00531 return TRUE; 00532 }

void tridentRestore KdCardInfo card  ) 
 

Definition at line 535 of file trident.c.

References card, Card::driver, fbdevRestore(), tridentResetMMIO(), and vesaRestore().

00536 { 00537 TridentCardInfo *tridentc = card->driver; 00538 00539 tridentResetMMIO (tridentc); 00540 #ifdef VESA 00541 vesaRestore (card); 00542 #else 00543 fbdevRestore (card); 00544 #endif 00545 }

void tridentScreenFini KdScreenInfo screen  ) 
 

Definition at line 548 of file trident.c.

References screen, vesaScreenFini(), and xfree().

00549 { 00550 TridentScreenInfo *tridents = (TridentScreenInfo *) screen->driver; 00551 00552 #ifdef VESA 00553 vesaScreenFini (screen); 00554 #endif 00555 xfree (tridents); 00556 screen->driver = 0; 00557 }

void tridentCardFini KdCardInfo card  ) 
 

Definition at line 560 of file trident.c.

References card, _tridentCardInfo::cop_base, Card::driver, fbdevCardFini(), KdResetMappedMode(), KdUnmapDevice(), and vesaCardFini().

00561 { 00562 TridentCardInfo *tridentc = card->driver; 00563 00564 if (tridentc->cop_base) 00565 { 00566 KdUnmapDevice ((void *) tridentc->cop_base, TRIDENT_COP_SIZE(card)); 00567 KdResetMappedMode (TRIDENT_COP_BASE(card), 00568 TRIDENT_COP_SIZE(card), 00569 KD_MAPPED_MODE_REGISTERS); 00570 } 00571 #ifdef VESA 00572 vesaCardFini (card); 00573 #else 00574 fbdevCardFini (card); 00575 #endif 00576 }


Variable Documentation

int trident_clk = 0
 

Definition at line 29 of file trident.c.

Referenced by ddxProcessArgument(), and tridentSetMMIO().

int trident_mclk = 0
 

Definition at line 30 of file trident.c.

Referenced by ddxProcessArgument(), and tridentSetMMIO().

const CARD8 tridentDPMSModes[4]
 

Initial value:

{ 0x80, 0x8c, 0x8c, 0x8c, }

Definition at line 514 of file trident.c.

KdCardFuncs tridentFuncs
 

Definition at line 578 of file trident.c.

Referenced by InitCard().


Generated on Tue May 11 01:19:54 2004 for XFree86 by doxygen 1.3.7