diff options
author | Daniel Stone <daniel@fooishbar.org> | 2005-04-20 12:25:23 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2005-04-20 12:25:23 +0000 |
commit | 264b155fdc7f0f860a5cfa5932fb683e5d1934ef (patch) | |
tree | 3f8b84863492fa2dbc3eacc01da0383550362d8f | |
parent | 979f1e0c830891c9e4f0b4837980766cc7eac3d7 (diff) |
Fix includes right throughout the Xserver tree:sco_port_update-baseXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10sco_port_update
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
change "foo.h", "extensions/foo.h" and "X11/foo.h" to
<X11/extensions/foo.h> for extension headers, e.g. Xv.h;
change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
-rw-r--r-- | src/alp_driver.c | 44 | ||||
-rw-r--r-- | src/lg_driver.c | 26 |
2 files changed, 27 insertions, 43 deletions
diff --git a/src/alp_driver.c b/src/alp_driver.c index b4aecf5..d2f9692 100644 --- a/src/alp_driver.c +++ b/src/alp_driver.c @@ -11,7 +11,7 @@ * Guy DESBIEF */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v 1.32 2003/08/23 16:09:16 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v 1.35 2003/11/03 05:11:09 tsi Exp $ */ /* All drivers should typically include these */ #include "xf86.h" @@ -66,7 +66,7 @@ #include "alp.h" #include "xf86xv.h" -#include "Xv.h" +#include <X11/extensions/Xv.h> #ifdef ALPPROBEI2C /* For debugging... should go away. */ @@ -93,7 +93,8 @@ void AlpAdjustFrame(int scrnIndex, int x, int y, int flags); /* Optional functions */ void AlpFreeScreen(int scrnIndex, int flags); -int AlpValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags); +ModeStatus AlpValidMode(int scrnIndex, DisplayModePtr mode, + Bool verbose, int flags); /* Internally used functions */ static void AlpSave(ScrnInfoPtr pScrn); static void AlpRestore(ScrnInfoPtr pScrn); @@ -237,7 +238,7 @@ static XF86ModuleVersionInfo alpVersRec = MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, - XF86_VERSION_CURRENT, + XORG_VERSION_CURRENT, ALP_MAJOR_VERSION, ALP_MINOR_VERSION, ALP_PATCHLEVEL, ABI_CLASS_VIDEODRV, /* This is a video driver */ ABI_VIDEODRV_VERSION, @@ -361,7 +362,7 @@ AlpCountRam(ScrnInfoPtr pScrn) pCir->chip.alp->sr0f = hwp->readSeq(hwp, 0x0F); } xf86DrvMsg(pScrn->scrnIndex, from, "Memory Config reg 1 is 0x%02X\n", - pCir->chip.alp->sr0f); + (unsigned int)pCir->chip.alp->sr0f); switch (pCir->Chipset) { case PCI_CHIP_GD5430: @@ -404,7 +405,7 @@ AlpCountRam(ScrnInfoPtr pScrn) pCir->chip.alp->sr17 = hwp->readSeq(hwp, 0x17); } xf86DrvMsg(pScrn->scrnIndex, from, "Memory Config reg 2 is 0x%02X\n", - pCir->chip.alp->sr17); + (unsigned int)pCir->chip.alp->sr17); if ((pCir->chip.alp->sr0f & 0x18) == 0x18) { if (pCir->chip.alp->sr0f & 0x80) { @@ -430,7 +431,7 @@ AlpCountRam(ScrnInfoPtr pScrn) pCir->chip.alp->sr17 = hwp->readSeq(hwp, 0x17); } xf86DrvMsg(pScrn->scrnIndex, from, "Memory Config reg 2 is 0x%02X\n", - pCir->chip.alp->sr17); + (unsigned int)pCir->chip.alp->sr17); videoram = 1024; if ((pCir->chip.alp->sr0f & 0x18) == 0x18) { /* 2 or 4 MB */ videoram = 2048; @@ -1220,7 +1221,6 @@ static Bool AlpModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) { vgaHWPtr hwp; - vgaRegPtr vgaReg; CirPtr pCir; int depthcode; int width; @@ -1315,8 +1315,6 @@ AlpModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) pCir->chip.alp->ModeReg.ExtVga[GR17] |= 0x08; pCir->chip.alp->ModeReg.ExtVga[GR17] &= ~0x04; - vgaReg = &hwp->ModeReg; - pCir->chip.alp->ModeReg.ExtVga[HDR] = 0; /* Enable linear mode and high-res packed pixel mode */ pCir->chip.alp->ModeReg.ExtVga[SR07] &= 0xe0; @@ -1468,7 +1466,6 @@ AlpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) ScrnInfoPtr pScrn; vgaHWPtr hwp; CirPtr pCir; - AlpPtr pAlp; int i, ret; int init_picture = 0; VisualPtr visual; @@ -1487,7 +1484,6 @@ AlpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) hwp = VGAHWPTR(pScrn); pCir = CIRPTR(pScrn); - pAlp = ALPPTR(pCir); /* Map the VGA memory when the primary video */ if (!vgaHWMapMem(pScrn)) @@ -1517,6 +1513,9 @@ AlpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if (!AlpModeInit(pScrn, pScrn->currentMode)) return FALSE; + /* Make things beautiful */ + AlpSaveScreen(pScreen, SCREEN_SAVER_ON); + /* Set the viewport */ AlpAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); @@ -1908,7 +1907,7 @@ AlpFreeScreen(int scrnIndex, int flags) /* Checks if a mode is suitable for the selected chipset. */ /* Optional */ -int +ModeStatus AlpValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags) { int lace; @@ -1946,7 +1945,7 @@ AlpSaveScreen(ScreenPtr pScreen, int mode) static void AlpSetClock(CirPtr pCir, vgaHWPtr hwp, int freq) { - int num, den, ffreq, usemclk, diff, mclk; + int num, den, ffreq; CARD8 tmp; #ifdef ALP_DEBUG @@ -1957,22 +1956,9 @@ AlpSetClock(CirPtr pCir, vgaHWPtr hwp, int freq) if (!CirrusFindClock(&ffreq, pCir->MaxClock, &num, &den)) return; - /* Calculate the MCLK. */ - mclk = 14318 * (hwp->readSeq(hwp, 0x1F) & 0x3F) / 8; /* XXX */ - /* - * Favour MCLK as VLCK if it matches as good as the found clock, - * or if it is within 0.2 MHz of the request clock. A VCLK close - * to MCLK can cause instability. - */ - diff = abs(freq - ffreq); - if (abs(mclk - ffreq) <= diff + 10 || abs(mclk - freq) <= 200) - usemclk = TRUE; - else - usemclk = FALSE; - #ifdef ALP_DEBUG - ErrorF("AlpSetClock: nom=%x den=%x ffreq=%d.%03dMHz usemclk=%x\n", - num, den, ffreq / 1000, ffreq % 1000, usemclk); + ErrorF("AlpSetClock: nom=%x den=%x ffreq=%d.%03dMHz\n", + num, den, ffreq / 1000, ffreq % 1000); #endif /* So - how do we use MCLK here for the VCLK ? */ diff --git a/src/lg_driver.c b/src/lg_driver.c index 95b7655..4fda937 100644 --- a/src/lg_driver.c +++ b/src/lg_driver.c @@ -13,7 +13,7 @@ * David Dawes, Andrew E. Mileski, Leonard N. Zubkoff, * Guy DESBIEF, Itai Nahshon. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg_driver.c,v 1.45 2003/08/23 15:02:57 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg_driver.c,v 1.49 2003/11/03 05:11:09 tsi Exp $ */ #define EXPERIMENTAL @@ -63,7 +63,7 @@ #include "lg.h" #include "xf86xv.h" -#include "Xv.h" +#include <X11/extensions/Xv.h> /* * Forward definitions for the functions that make up the driver. @@ -84,7 +84,8 @@ void LgAdjustFrame(int scrnIndex, int x, int y, int flags); /* Optional functions */ void LgFreeScreen(int scrnIndex, int flags); -int LgValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags); +ModeStatus LgValidMode(int scrnIndex, DisplayModePtr mode, + Bool verbose, int flags); /* Internally used functions */ static void LgRestoreLgRegs(ScrnInfoPtr pScrn, LgRegPtr lgReg); @@ -245,7 +246,7 @@ static XF86ModuleVersionInfo lgVersRec = MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, - XF86_VERSION_CURRENT, + XORG_VERSION_CURRENT, LG_MAJOR_VERSION, LG_MINOR_VERSION, LG_PATCHLEVEL, ABI_CLASS_VIDEODRV, /* This is a video driver */ ABI_VIDEODRV_VERSION, @@ -370,10 +371,6 @@ LgDoDDC(ScrnInfoPtr pScrn) if (!CirMapMem(pCir, pScrn->scrnIndex)) return FALSE; - { - ErrorF("RIF Control %#04x, RAC Control %#04x\n", - memrw(0x200), memrw(0x201)); - } #if LGuseI2C if (!LgI2CInit(pScrn)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I2C initialization failed\n"); @@ -383,7 +380,8 @@ LgDoDDC(ScrnInfoPtr pScrn) /* Read and output monitor info using DDC2 over I2C bus */ MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pCir->I2CPtr1); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "I2C Monitor info: %p\n", MonInfo); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "I2C Monitor info: %p\n", + (void *)MonInfo); xf86PrintEDID(MonInfo); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "end of I2C Monitor info\n\n"); #endif /* LGuseI2C */ @@ -949,7 +947,6 @@ static Bool LgModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) { vgaHWPtr hwp; - vgaRegPtr vgaReg; CirPtr pCir; int width; Bool VDiv2 = FALSE; @@ -1000,8 +997,6 @@ LgModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) #ifdef LG_DEBUG ErrorF("SynthClock = %d\n", mode->SynthClock); #endif - vgaReg = &hwp->ModeReg; - hwp->IOBase = 0x3D0; hwp->ModeReg.MiscOutReg |= 0x01; #if 0 /* Mono address */ @@ -1282,7 +1277,7 @@ LgRestore(ScrnInfoPtr pScrn) LgRegPtr lgReg; #ifdef LG_DEBUG - ErrorF("LgRestore pScrn = 0x%08X\n", pScrn); + ErrorF("LgRestore pScrn = %p\n", (void *)pScrn); #endif pCir = CIRPTR(pScrn); @@ -1348,6 +1343,9 @@ LgScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if (!LgModeInit(pScrn, pScrn->currentMode)) return FALSE; + /* Make things beautiful */ + LgSaveScreen(pScreen, SCREEN_SAVER_ON); + /* Set the viewport */ LgAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); @@ -1725,7 +1723,7 @@ LgFreeScreen(int scrnIndex, int flags) /* Checks if a mode is suitable for the selected chipset. */ /* Optional */ -int +ModeStatus LgValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags) { int lace; |