diff options
author | Keith Packard <keithp@keithp.com> | 2003-10-29 16:26:49 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2003-10-29 16:26:49 +0000 |
commit | fe28039ff4c3c9d86df775e2b177370f7e286318 (patch) | |
tree | d75239f3d26e951fe1c2c59b766285a7773ac5da | |
parent | f1d14244dfb6c0ad91e0881efa0bfea408dbaadb (diff) |
Prototype fixes (various) Add GCC warnings (including -Werror. clean up
your code) Other warning fixes (unused variables, etc) Get rid of
unused extension interfaces (aux screen procs) Make lots of functions
in kdrive static Eliminate unused code from os library
33 files changed, 352 insertions, 219 deletions
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index 4e33155ee..cb0a1b399 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -292,6 +292,7 @@ Bool fbdevUnmapFramebuffer (KdScreenInfo *screen) { KdShadowFbFree (screen, 0); + return TRUE; } Bool @@ -361,7 +362,6 @@ fbdevRandRSetConfig (ScreenPtr pScreen, int oldmmwidth; int oldmmheight; int newwidth, newheight; - PixmapPtr pPixmap; if (screen->randr & (RR_Rotate_0|RR_Rotate_180)) { diff --git a/hw/kdrive/fbdev/fbdev.h b/hw/kdrive/fbdev/fbdev.h index f7c6be5eb..d37b99597 100644 --- a/hw/kdrive/fbdev/fbdev.h +++ b/hw/kdrive/fbdev/fbdev.h @@ -102,4 +102,41 @@ fbdevGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs); void fbdevPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs); +Bool +fbdevMapFramebuffer (KdScreenInfo *screen); + +void * +fbdevWindowLinear (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size, + void *closure); + +void +fbdevSetScreenSizes (ScreenPtr pScreen); + +Bool +fbdevUnmapFramebuffer (KdScreenInfo *screen); + +Bool +fbdevSetShadow (ScreenPtr pScreen); + +Bool +fbdevCreateColormap (ColormapPtr pmap); + +#ifdef RANDR +Bool +fbdevRandRGetInfo (ScreenPtr pScreen, Rotation *rotations); + +Bool +fbdevRandRSetConfig (ScreenPtr pScreen, + Rotation randr, + int rate, + RRScreenSizePtr pSize); +Bool +fbdevRandRInit (ScreenPtr pScreen); + +#endif + #endif /* _FBDEV_H_ */ diff --git a/hw/kdrive/linux/agp.c b/hw/kdrive/linux/agp.c index 6f4482c03..d401e03a1 100644 --- a/hw/kdrive/linux/agp.c +++ b/hw/kdrive/linux/agp.c @@ -87,7 +87,7 @@ static int acquiredScreen = -1; */ static Bool -GARTInit() +GARTInit(void) { static Bool initDone = FALSE; struct _agp_info agpinf; diff --git a/hw/kdrive/linux/bus.c b/hw/kdrive/linux/bus.c index 5451b0aa4..15d2ba846 100644 --- a/hw/kdrive/linux/bus.c +++ b/hw/kdrive/linux/bus.c @@ -35,7 +35,7 @@ /* /dev/adbmouse is a busmouse */ -void +static void BusRead (int adbPort, void *closure) { unsigned char buf[3]; @@ -68,7 +68,7 @@ char *BusNames[] = { int BusInputType; -int +static int BusInit (void) { int i; @@ -89,7 +89,7 @@ BusInit (void) return n; } -void +static void BusFini (void) { KdUnregisterFds (BusInputType, TRUE); diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c index f2998766e..dba87a00d 100644 --- a/hw/kdrive/linux/keyboard.c +++ b/hw/kdrive/linux/keyboard.c @@ -112,7 +112,7 @@ static unsigned char tbl[KD_MAX_WIDTH] = }; static void -readKernelMapping() +readKernelMapping(void) { KeySym *k; int i, j; @@ -373,13 +373,13 @@ readKernelMapping() kdMaxScanCode = maxKeyCode; } -void +static void LinuxKeyboardLoad (void) { readKernelMapping (); } -void +static void LinuxKeyboardRead (int fd, void *closure) { unsigned char buf[256], *b; @@ -400,7 +400,7 @@ static int LinuxKbdTrans; static struct termios LinuxTermios; static int LinuxKbdType; -int +static int LinuxKeyboardEnable (int fd, void *closure) { struct termios nTty; @@ -429,14 +429,14 @@ LinuxKeyboardEnable (int fd, void *closure) return fd; } -void +static void LinuxKeyboardDisable (int fd, void *closure) { ioctl(LinuxConsoleFd, KDSKBMODE, LinuxKbdTrans); tcsetattr(LinuxConsoleFd, TCSANOW, &LinuxTermios); } -int +static int LinuxKeyboardInit (void) { if (!LinuxKbdType) @@ -450,20 +450,20 @@ LinuxKeyboardInit (void) return 1; } -void +static void LinuxKeyboardFini (void) { LinuxKeyboardDisable (LinuxConsoleFd, 0); KdUnregisterFds (LinuxKbdType, FALSE); } -void +static void LinuxKeyboardLeds (int leds) { ioctl (LinuxConsoleFd, KDSETLED, leds & 7); } -void +static void LinuxKeyboardBell (int volume, int pitch, int duration) { if (volume && pitch) diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c index eb52f160c..3362d1f09 100644 --- a/hw/kdrive/linux/linux.c +++ b/hw/kdrive/linux/linux.c @@ -65,7 +65,7 @@ LinuxCheckChown (char *file) } static int -LinuxInit () +LinuxInit (void) { int fd = -1; char vtname[11]; diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c index 2158a587d..689c7e9e7 100644 --- a/hw/kdrive/linux/mouse.c +++ b/hw/kdrive/linux/mouse.c @@ -46,7 +46,7 @@ typedef struct _kbufio { int used; } Kbufio; -Bool +static Bool MouseWaitForReadable (int fd, int timeout) { fd_set set; @@ -69,7 +69,7 @@ MouseWaitForReadable (int fd, int timeout) return FALSE; } -int +static int MouseReadByte (Kbufio *b, int timeout) { int n; @@ -89,7 +89,8 @@ MouseReadByte (Kbufio *b, int timeout) return b->buf[b->used++]; } -int +#if NOTUSED +static int MouseFlush (Kbufio *b, char *buf, int size) { CARD32 now = GetTimeInMillis (); @@ -115,7 +116,7 @@ MouseFlush (Kbufio *b, char *buf, int size) return n; } -int +static int MousePeekByte (Kbufio *b, int timeout) { int c; @@ -125,8 +126,9 @@ MousePeekByte (Kbufio *b, int timeout) --b->used; return c; } +#endif /* NOTUSED */ -Bool +static Bool MouseWaitForWritable (int fd, int timeout) { fd_set set; @@ -149,7 +151,7 @@ MouseWaitForWritable (int fd, int timeout) return FALSE; } -Bool +static Bool MouseWriteByte (int fd, unsigned char c, int timeout) { int ret; @@ -171,7 +173,7 @@ MouseWriteByte (int fd, unsigned char c, int timeout) } } -Bool +static Bool MouseWriteBytes (int fd, unsigned char *c, int n, int timeout) { while (n--) @@ -708,7 +710,7 @@ static const KmouseProt *kmouseProts[] = { #define NUM_PROT (sizeof (kmouseProts) / sizeof (kmouseProts[0])) -void +static void MouseInitProtocol (Kmouse *km) { int ret; @@ -736,7 +738,7 @@ MouseInitProtocol (Kmouse *km) km->state = km->prot->state; } -void +static void MouseFirstProtocol (Kmouse *km, char *prot) { if (prot) @@ -772,7 +774,7 @@ MouseFirstProtocol (Kmouse *km, char *prot) MouseInitProtocol (km); } -void +static void MouseNextProtocol (Kmouse *km) { do @@ -787,7 +789,7 @@ MouseNextProtocol (Kmouse *km) ErrorF ("Switching to mouse protocol \"%s\"\n", km->prot->name); } -void +static void MouseRead (int mousePort, void *closure) { KdMouseInfo *mi = closure; @@ -911,7 +913,7 @@ char *kdefaultMouse[] = { #define NUM_DEFAULT_MOUSE (sizeof (kdefaultMouse) / sizeof (kdefaultMouse[0])) -Bool +static Bool MouseInit (void) { int i; @@ -968,7 +970,7 @@ MouseInit (void) return TRUE; } -void +static void MouseFini (void) { KdMouseInfo *mi; diff --git a/hw/kdrive/linux/ms.c b/hw/kdrive/linux/ms.c index 20c3dc680..b29f6527b 100644 --- a/hw/kdrive/linux/ms.c +++ b/hw/kdrive/linux/ms.c @@ -35,7 +35,7 @@ THE SOFTWARE. #include "scrnintstr.h" #include "kdrive.h" -int +static int MsReadBytes (int fd, char *buf, int len, int min) { int n, tot; @@ -65,7 +65,7 @@ MsReadBytes (int fd, char *buf, int len, int min) return tot; } -void +static void MsRead (int port, void *closure) { unsigned char buf[3 * 200]; @@ -97,7 +97,7 @@ MsRead (int port, void *closure) int MsInputType; -int +static int MsInit (void) { int port; @@ -151,7 +151,7 @@ MsInit (void) return 0; } -void +static void MsFini (void) { KdUnregisterFds (MsInputType, TRUE); diff --git a/hw/kdrive/linux/ps2.c b/hw/kdrive/linux/ps2.c index 3a3444366..da3372011 100644 --- a/hw/kdrive/linux/ps2.c +++ b/hw/kdrive/linux/ps2.c @@ -33,7 +33,7 @@ #include "scrnintstr.h" #include "kdrive.h" -int +static int Ps2ReadBytes (int fd, char *buf, int len, int min) { int n, tot; @@ -71,7 +71,7 @@ char *Ps2Names[] = { #define NUM_PS2_NAMES (sizeof (Ps2Names) / sizeof (Ps2Names[0])) -void +static void Ps2Read (int ps2Port, void *closure) { unsigned char buf[3 * 200]; @@ -119,7 +119,7 @@ Ps2Read (int ps2Port, void *closure) int Ps2InputType; -int +static int Ps2Init (void) { int i; @@ -141,7 +141,7 @@ Ps2Init (void) return n; } -void +static void Ps2Fini (void) { KdUnregisterFds (Ps2InputType, TRUE); diff --git a/hw/kdrive/mach64/mach64.c b/hw/kdrive/mach64/mach64.c index d03667492..3d24045da 100644 --- a/hw/kdrive/mach64/mach64.c +++ b/hw/kdrive/mach64/mach64.c @@ -27,7 +27,7 @@ #include "mach64.h" #include <sys/io.h> -Bool +static Bool mach64CardInit (KdCardInfo *card) { Mach64CardInfo *mach64c; @@ -50,7 +50,7 @@ mach64CardInit (KdCardInfo *card) return TRUE; } -Bool +static Bool mach64ScreenInit (KdScreenInfo *screen) { Mach64CardInfo *mach64c = screen->card->driver; @@ -88,7 +88,7 @@ mach64ScreenInit (KdScreenInfo *screen) return TRUE; } -Bool +static Bool mach64InitScreen (ScreenPtr pScreen) { #ifdef XV @@ -98,7 +98,7 @@ mach64InitScreen (ScreenPtr pScreen) } #ifdef RANDR -Bool +static Bool mach64RandRSetConfig (ScreenPtr pScreen, Rotation rotation, int rate, @@ -112,7 +112,7 @@ mach64RandRSetConfig (ScreenPtr pScreen, return TRUE; } -void +static void mach64RandRInit (ScreenPtr pScreen) { rrScrPriv(pScreen); @@ -121,7 +121,7 @@ mach64RandRInit (ScreenPtr pScreen) } #endif -Bool +static Bool mach64FinishInitScreen (ScreenPtr pScreen) { Bool ret; @@ -132,7 +132,7 @@ mach64FinishInitScreen (ScreenPtr pScreen) return ret; } -Bool +static Bool mach64CreateResources (ScreenPtr pScreen) { return vesaCreateResources (pScreen); @@ -362,7 +362,7 @@ mach64DPMS (ScreenPtr pScreen, int mode) return TRUE; } -void +static void mach64Restore (KdCardInfo *card) { Mach64CardInfo *mach64c = card->driver; @@ -376,7 +376,7 @@ mach64Restore (KdCardInfo *card) vesaRestore (card); } -void +static void mach64ScreenFini (KdScreenInfo *screen) { Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; @@ -388,7 +388,7 @@ mach64ScreenFini (KdScreenInfo *screen) screen->driver = 0; } -void +static void mach64CardFini (KdCardInfo *card) { Mach64CardInfo *mach64c = card->driver; diff --git a/hw/kdrive/mach64/mach64draw.c b/hw/kdrive/mach64/mach64draw.c index ecc3aac63..d93e7dff7 100644 --- a/hw/kdrive/mach64/mach64draw.c +++ b/hw/kdrive/mach64/mach64draw.c @@ -147,7 +147,7 @@ mach64Setup (PixmapPtr pDst, PixmapPtr pSrc, CARD32 combo, int wait) return TRUE; } -Bool +static Bool mach64PrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, @@ -161,7 +161,7 @@ mach64PrepareSolid (PixmapPtr pPixmap, return TRUE; } -void +static void mach64Solid (int x1, int y1, int x2, int y2) { if (triple) @@ -183,7 +183,7 @@ mach64Solid (int x1, int y1, int x2, int y2) reg->DST_WIDTH_HEIGHT = MACH64_XY(x2-x1,y2-y1); } -void +static void mach64DoneSolid (void) { #if SYNC_ALWAYS @@ -195,7 +195,7 @@ static int copyDx; static int copyDy; static CARD32 copyCombo; -Bool +static Bool mach64PrepareCopy (PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int dx, @@ -227,7 +227,7 @@ mach64PrepareCopy (PixmapPtr pSrcPixmap, return TRUE; } -void +static void mach64Copy (int srcX, int srcY, int dstX, @@ -270,7 +270,7 @@ mach64Copy (int srcX, reg->DST_HEIGHT_WIDTH = MACH64_YX(w,h); } -void +static void mach64DoneCopy (void) { #if SYNC_ALWAYS diff --git a/hw/kdrive/mga/mga.c b/hw/kdrive/mga/mga.c index 145ba7fcf..556b9b18f 100644 --- a/hw/kdrive/mga/mga.c +++ b/hw/kdrive/mga/mga.c @@ -27,7 +27,7 @@ #endif #include "mga.h" -Bool +static Bool mgaCardInit (KdCardInfo *card) { MgaCardInfo *mgac; @@ -51,7 +51,7 @@ mgaCardInit (KdCardInfo *card) return TRUE; } -Bool +static Bool mgaScreenInit (KdScreenInfo *screen) { MgaScreenInfo *mgas; @@ -78,13 +78,13 @@ mgaScreenInit (KdScreenInfo *screen) return TRUE; } -Bool +static Bool mgaInitScreen (ScreenPtr pScreen) { return vesaInitScreen (pScreen); } -Bool +static Bool mgaFinishInitScreen (ScreenPtr pScreen) { Bool ret; @@ -94,13 +94,13 @@ mgaFinishInitScreen (ScreenPtr pScreen) return ret; } -Bool +static Bool mgaCreateResources (ScreenPtr pScreen) { return vesaCreateResources (pScreen); } -void +static void mgaPreserve (KdCardInfo *card) { vesaPreserve (card); @@ -151,14 +151,14 @@ mgaResetMMIO (KdCardInfo *card, MgaCardInfo *mgac) mgaUnmapReg (card, mgac); } -Bool +static Bool mgaDPMS (ScreenPtr pScreen, int mode) { /* XXX */ return TRUE; } -Bool +static Bool mgaEnable (ScreenPtr pScreen) { KdScreenPriv (pScreen); @@ -173,7 +173,7 @@ mgaEnable (ScreenPtr pScreen) return TRUE; } -void +static void mgaDisable (ScreenPtr pScreen) { KdScreenPriv (pScreen); @@ -184,7 +184,7 @@ mgaDisable (ScreenPtr pScreen) vesaDisable (pScreen); } -void +static void mgaRestore (KdCardInfo *card) { MgaCardInfo *mgac = card->driver; @@ -193,7 +193,7 @@ mgaRestore (KdCardInfo *card) vesaRestore (card); } -void +static void mgaScreenFini (KdScreenInfo *screen) { MgaScreenInfo *mgas = (MgaScreenInfo *) screen->driver; @@ -203,7 +203,7 @@ mgaScreenFini (KdScreenInfo *screen) screen->driver = 0; } -void +static void mgaCardFini (KdCardInfo *card) { MgaCardInfo *mgac = (MgaCardInfo *)card->driver; diff --git a/hw/kdrive/mga/mgadraw.c b/hw/kdrive/mga/mgadraw.c index b41c5c16a..04cd44fc9 100644 --- a/hw/kdrive/mga/mgadraw.c +++ b/hw/kdrive/mga/mgadraw.c @@ -51,7 +51,7 @@ int fifo_size; int pitch, src_pitch; int dir; -void +static void mgaWaitAvail (int n) { if (fifo_size < n) { @@ -62,7 +62,7 @@ mgaWaitAvail (int n) fifo_size -= n; } -void +static void mgaWaitIdle (void) { while (MGA_IN32 (mmio, MGA_REG_STATUS) & 0x10000); @@ -91,11 +91,10 @@ mgaSetup (ScreenPtr pScreen, int wait) return TRUE; } -Bool +static Bool mgaPrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg) { KdScreenPriv(pPixmap->drawable.pScreen); - mgaScreenInfo (pScreenPriv); int cmd; int dst_org; @@ -115,7 +114,7 @@ mgaPrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg) return TRUE; } -void +static void mgaSolid (int x1, int y1, int x2, int y2) { mgaWaitAvail (2); @@ -124,7 +123,7 @@ mgaSolid (int x1, int y1, int x2, int y2) MGA_OUT32 (mmio, MGA_REG_YDSTLEN | MGA_REG_EXEC, (y1 << 16) | (y2 - y1)); } -void +static void mgaDoneSolid (void) { } @@ -132,12 +131,11 @@ mgaDoneSolid (void) #define BLIT_LEFT 1 #define BLIT_UP 4 -Bool +static Bool mgaPrepareCopy (PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int dx, int dy, int alu, Pixel pm) { KdScreenPriv(pSrcPixmap->drawable.pScreen); - mgaScreenInfo (pScreenPriv); int cmd; @@ -165,7 +163,7 @@ mgaPrepareCopy (PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, return TRUE; } -void +static void mgaCopy (int srcX, int srcY, int dstX, int dstY, int w, int h) { int start, end; @@ -191,7 +189,7 @@ mgaCopy (int srcX, int srcY, int dstX, int dstY, int w, int h) MGA_OUT32 (mmio, MGA_REG_YDSTLEN | MGA_REG_EXEC, (dstY << 16) | h); } -void +static void mgaDoneCopy (void) { } diff --git a/hw/kdrive/nvidia/nvidia.c b/hw/kdrive/nvidia/nvidia.c index 750426481..fa53476b1 100644 --- a/hw/kdrive/nvidia/nvidia.c +++ b/hw/kdrive/nvidia/nvidia.c @@ -28,7 +28,7 @@ #include "nvidia.h" #include <sys/io.h> -Bool +static Bool nvidiaCardInit (KdCardInfo *card) { NvidiaCardInfo *nvidiac; @@ -50,7 +50,7 @@ nvidiaCardInit (KdCardInfo *card) return TRUE; } -Bool +static Bool nvidiaScreenInit (KdScreenInfo *screen) { NvidiaCardInfo *nvidiac = screen->card->driver; @@ -96,7 +96,7 @@ nvidiaScreenInit (KdScreenInfo *screen) return TRUE; } -Bool +static Bool nvidiaInitScreen (ScreenPtr pScreen) { #if 0 @@ -111,7 +111,7 @@ nvidiaInitScreen (ScreenPtr pScreen) } #ifdef RANDR -Bool +static Bool nvidiaRandRSetConfig (ScreenPtr pScreen, Rotation rotation, int rate, @@ -125,7 +125,7 @@ nvidiaRandRSetConfig (ScreenPtr pScreen, return TRUE; } -void +static void nvidiaRandRInit (ScreenPtr pScreen) { rrScrPriv(pScreen); @@ -134,7 +134,7 @@ nvidiaRandRInit (ScreenPtr pScreen) } #endif -Bool +static Bool nvidiaFinishInitScreen (ScreenPtr pScreen) { Bool ret; @@ -195,7 +195,7 @@ static void vgaLockUnlock (NvidiaCardInfo *nvidiac, Bool lock) LEAVE (); } -void nvidiaLockUnlock (NvidiaCardInfo *nvidiac, Bool lock) +static void nvidiaLockUnlock (NvidiaCardInfo *nvidiac, Bool lock) { if (NVIDIA_IS_3(nvidiac)) nvidiaSetIndex (nvidiac, 0x3c4, 0x3c5, 0x06, lock ? 0x99 : 0x57); @@ -292,13 +292,13 @@ nvidiaDisable (ScreenPtr pScreen) vesaDisable (pScreen); } -Bool +static Bool nvidiaDPMS (ScreenPtr pScreen, int mode) { return vesaDPMS (pScreen, mode); } -void +static void nvidiaRestore (KdCardInfo *card) { NvidiaCardInfo *nvidiac = card->driver; @@ -307,7 +307,7 @@ nvidiaRestore (KdCardInfo *card) vesaRestore (card); } -void +static void nvidiaScreenFini (KdScreenInfo *screen) { NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; @@ -317,7 +317,7 @@ nvidiaScreenFini (KdScreenInfo *screen) screen->driver = 0; } -void +static void nvidiaCardFini (KdCardInfo *card) { NvidiaCardInfo *nvidiac = card->driver; diff --git a/hw/kdrive/nvidia/nvidia.h b/hw/kdrive/nvidia/nvidia.h index b1ba3b3ad..083ffc0ea 100644 --- a/hw/kdrive/nvidia/nvidia.h +++ b/hw/kdrive/nvidia/nvidia.h @@ -26,6 +26,7 @@ #define _NVIDIA_H_ #include <vesa.h> #include "kxv.h" +#include "klinux.h" /* * offset from ioport beginning diff --git a/hw/kdrive/nvidia/nvidiadraw.c b/hw/kdrive/nvidia/nvidiadraw.c index 840b0752c..b49ed7805 100644 --- a/hw/kdrive/nvidia/nvidiadraw.c +++ b/hw/kdrive/nvidia/nvidiadraw.c @@ -81,19 +81,18 @@ nvidiaWaitIdle (NvidiaCardInfo *card) } } -Bool -nvidiaPrepareSolid (DrawablePtr pDrawable, - int alu, - Pixel pm, - Pixel fg) +static Bool +nvidiaPrepareSolid (PixmapPtr pPixmap, + int alu, + Pixel pm, + Pixel fg) { - ScreenPtr pScreen = pDrawable->pScreen; + ScreenPtr pScreen = pPixmap->drawable.pScreen; KdScreenPriv(pScreen); - nvidiaScreenInfo(pScreenPriv); nvidiaCardInfo(pScreenPriv); card = nvidiac; - if (~pm & FbFullMask(pDrawable->depth)) + if (~pm & FbFullMask(pPixmap->drawable.depth)) return FALSE; nvidiaWait (nvidiac, &nvidiac->rop->FifoFree, 1); nvidiac->rop->Rop3 = nvidiaRop[alu]; @@ -102,7 +101,7 @@ nvidiaPrepareSolid (DrawablePtr pDrawable, return TRUE; } -void +static void nvidiaSolid (int x1, int y1, int x2, int y2) { nvidiaWait (card, &card->rect->FifoFree, 2); @@ -110,34 +109,33 @@ nvidiaSolid (int x1, int y1, int x2, int y2) card->rect->WidthHeight = NVIDIA_XY(x2-x1,y2-y1); } -void +static void nvidiaDoneSolid (void) { } -Bool -nvidiaPrepareCopy (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, +static Bool +nvidiaPrepareCopy (PixmapPtr pSrcPixmap, + PixmapPtr pDstPixmap, int dx, int dy, int alu, Pixel pm) { - ScreenPtr pScreen = pDstDrawable->pScreen; + ScreenPtr pScreen = pDstPixmap->drawable.pScreen; KdScreenPriv(pScreen); - nvidiaScreenInfo(pScreenPriv); nvidiaCardInfo(pScreenPriv); card = nvidiac; - if (~pm & FbFullMask(pDstDrawable->depth)) + if (~pm & FbFullMask(pDstPixmap->drawable.depth)) return FALSE; nvidiaWait (nvidiac, &card->rop->FifoFree, 1); nvidiac->rop->Rop3 = nvidiaRop[alu]; return TRUE; } -void +static void nvidiaCopy (int srcX, int srcY, int dstX, @@ -151,7 +149,7 @@ nvidiaCopy (int srcX, card->blt->WidthHeight = NVIDIA_XY(w, h); } -void +static void nvidiaDoneCopy (void) { } @@ -170,9 +168,8 @@ Bool nvidiaDrawInit (ScreenPtr pScreen) { KdScreenPriv(pScreen); - nvidiaScreenInfo(pScreenPriv); nvidiaCardInfo(pScreenPriv); - Bool ret; + Bool ret = TRUE; ENTER (); if (pScreenPriv->screen->fb[0].depth == 4) @@ -213,7 +210,6 @@ void nvidiaDrawEnable (ScreenPtr pScreen) { KdScreenPriv(pScreen); - nvidiaScreenInfo(pScreenPriv); nvidiaCardInfo(pScreenPriv); ENTER (); diff --git a/hw/kdrive/r128/r128.c b/hw/kdrive/r128/r128.c index 5dff93e03..2be8b26d2 100644 --- a/hw/kdrive/r128/r128.c +++ b/hw/kdrive/r128/r128.c @@ -27,7 +27,7 @@ #endif #include "r128.h" -Bool +static Bool r128CardInit (KdCardInfo *card) { R128CardInfo *r128c; @@ -51,10 +51,9 @@ r128CardInit (KdCardInfo *card) return TRUE; } -Bool +static Bool r128ScreenInit (KdScreenInfo *screen) { - R128CardInfo *r128c = screen->card->driver; R128ScreenInfo *r128s; int screen_size, memory; @@ -96,13 +95,13 @@ r128ScreenInit (KdScreenInfo *screen) return TRUE; } -Bool +static Bool r128InitScreen (ScreenPtr pScreen) { return vesaInitScreen (pScreen); } -Bool +static Bool r128FinishInitScreen (ScreenPtr pScreen) { Bool ret; @@ -112,11 +111,9 @@ r128FinishInitScreen (ScreenPtr pScreen) return ret; } -void +static void r128Preserve (KdCardInfo *card) { - R128CardInfo *r128c = card->driver; - vesaPreserve (card); } @@ -164,7 +161,15 @@ r128ResetMMIO (KdCardInfo *card, R128CardInfo *r128c) r128UnmapReg (card, r128c); } -Bool + +static Bool +r128DPMS (ScreenPtr pScreen, int mode) +{ + /* XXX */ + return TRUE; +} + +static Bool r128Enable (ScreenPtr pScreen) { KdScreenPriv (pScreen); @@ -179,7 +184,7 @@ r128Enable (ScreenPtr pScreen) return TRUE; } -void +static void r128Disable (ScreenPtr pScreen) { KdScreenPriv (pScreen); @@ -189,14 +194,7 @@ r128Disable (ScreenPtr pScreen) vesaDisable (pScreen); } -Bool -r128DPMS (ScreenPtr pScreen, int mode) -{ - /* XXX */ - return TRUE; -} - -void +static void r128Restore (KdCardInfo *card) { R128CardInfo *r128c = card->driver; @@ -205,7 +203,7 @@ r128Restore (KdCardInfo *card) vesaRestore (card); } -void +static void r128ScreenFini (KdScreenInfo *screen) { R128ScreenInfo *r128s = (R128ScreenInfo *) screen->driver; @@ -215,7 +213,7 @@ r128ScreenFini (KdScreenInfo *screen) screen->driver = 0; } -void +static void r128CardFini (KdCardInfo *card) { R128CardInfo *r128c = (R128CardInfo *)card->driver; diff --git a/hw/kdrive/r128/r128draw.c b/hw/kdrive/r128/r128draw.c index 78447fc1c..092f8e272 100644 --- a/hw/kdrive/r128/r128draw.c +++ b/hw/kdrive/r128/r128draw.c @@ -69,11 +69,9 @@ int copydx, copydy; int fifo_size; char *mmio; -void +static void r128WaitAvail (int n) { - int i; - if (fifo_size < n) { while ((fifo_size = R128_IN32 (mmio, R128_REG_GUI_STAT) & 0xfff) < n) @@ -83,7 +81,7 @@ r128WaitAvail (int n) fifo_size -= n; } -void +static void r128WaitIdle (void) { int tries; @@ -126,10 +124,10 @@ r128Setup (ScreenPtr pScreen, int wait) r128WaitAvail (2); R128_OUT32 (mmio, R128_REG_DEFAULT_OFFSET, 0); R128_OUT32 (mmio, R128_REG_DEFAULT_PITCH, r128s->pitch); - + return TRUE; } -Bool +static Bool r128PrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg) { KdScreenPriv (pPixmap->drawable.pScreen); @@ -148,7 +146,7 @@ r128PrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg) return TRUE; } -void +static void r128Solid (int x1, int y1, int x2, int y2) { r128WaitAvail (2); @@ -157,12 +155,12 @@ r128Solid (int x1, int y1, int x2, int y2) } -void +static void r128DoneSolid (void) { } -Bool +static Bool r128PrepareCopy (PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, Pixel pm) { KdScreenPriv (pSrc->drawable.pScreen); @@ -186,7 +184,7 @@ r128PrepareCopy (PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, Pixel return TRUE; } -void +static void r128Copy (int srcX, int srcY, int dstX, int dstY, int w, int h) { if (copydx < 0) @@ -207,7 +205,7 @@ r128Copy (int srcX, int srcY, int dstX, int dstY, int w, int h) R128_OUT32 (mmio, R128_REG_DST_HEIGHT_WIDTH, (h << 16) | w); } -void +static void r128DoneCopy (void) { } @@ -225,8 +223,6 @@ KaaScreenInfoRec r128Kaa = { Bool r128DrawInit (ScreenPtr pScreen) { - KdScreenPriv(pScreen); - if (!kaaDrawInit (pScreen, &r128Kaa)) return FALSE; diff --git a/hw/kdrive/r128/r128stub.c b/hw/kdrive/r128/r128stub.c index 006d66a6a..674625f93 100644 --- a/hw/kdrive/r128/r128stub.c +++ b/hw/kdrive/r128/r128stub.c @@ -26,6 +26,7 @@ #include <config.h> #endif #include "r128.h" +#include "klinux.h" void InitCard (char *name) diff --git a/hw/kdrive/smi/smi.c b/hw/kdrive/smi/smi.c index d40009775..aaa0b8356 100644 --- a/hw/kdrive/smi/smi.c +++ b/hw/kdrive/smi/smi.c @@ -27,7 +27,7 @@ #include "smi.h" #include <sys/io.h> -Bool +static Bool smiCardInit (KdCardInfo *card) { SmiCardInfo *smic; @@ -51,7 +51,7 @@ smiCardInit (KdCardInfo *card) return TRUE; } -Bool +static Bool smiScreenInit (KdScreenInfo *screen) { SmiCardInfo *smic = screen->card->driver; @@ -80,7 +80,7 @@ smiScreenInit (KdScreenInfo *screen) return TRUE; } -Bool +static Bool smiInitScreen (ScreenPtr pScreen) { Bool ret; @@ -99,13 +99,13 @@ smiInitScreen (ScreenPtr pScreen) } #ifdef RANDR +static Bool smiRandRSetConfig (ScreenPtr pScreen, Rotation randr, int rate, RRScreenSizePtr pSize) { Bool ret; - KdScreenPriv(pScreen); ENTER (); KdCheckSync (pScreen); @@ -115,7 +115,7 @@ smiRandRSetConfig (ScreenPtr pScreen, return ret; } -Bool +static Bool smiRandRInit (ScreenPtr pScreen) { rrScrPriv(pScreen); @@ -127,7 +127,7 @@ smiRandRInit (ScreenPtr pScreen) } #endif -Bool +static Bool smiFinishInitScreen (ScreenPtr pScreen) { Bool ret; @@ -141,8 +141,6 @@ smiFinishInitScreen (ScreenPtr pScreen) void smiPreserve (KdCardInfo *card) { - SmiCardInfo *smic = card->driver; - ENTER (); subPreserve(card); LEAVE(); @@ -229,6 +227,16 @@ smiResetMMIO (KdCardInfo *card, SmiCardInfo *smic) smiUnmapReg (card, smic); } +static Bool +smiDPMS (ScreenPtr pScreen, int mode) +{ + Bool ret; + ENTER (); + ret = subDPMS (pScreen, mode); + LEAVE (); + return ret; +} + Bool smiEnable (ScreenPtr pScreen) { @@ -268,27 +276,15 @@ smiDisable (ScreenPtr pScreen) LEAVE (); } -Bool -smiDPMS (ScreenPtr pScreen, int mode) -{ - Bool ret; - ENTER (); - ret = subDPMS (pScreen, mode); - LEAVE (); - return ret; -} - -void +static void smiRestore (KdCardInfo *card) { - SmiCardInfo *smic = card->driver; - ENTER (); subRestore (card); LEAVE(); } -void +static void smiScreenFini (KdScreenInfo *screen) { SmiScreenInfo *smis = (SmiScreenInfo *) screen->driver; @@ -300,7 +296,7 @@ smiScreenFini (KdScreenInfo *screen) LEAVE (); } -void +static void smiCardFini (KdCardInfo *card) { SmiCardInfo *smic = card->driver; diff --git a/hw/kdrive/smi/smi.h b/hw/kdrive/smi/smi.h index 481535fc4..abee819bf 100644 --- a/hw/kdrive/smi/smi.h +++ b/hw/kdrive/smi/smi.h @@ -199,6 +199,18 @@ void smiUnmapReg (KdCardInfo *card, SmiCardInfo *smic); void +smiOutb (CARD16 port, CARD8 val); + +CARD8 +smiInb (CARD16 port); + +CARD8 +smiGetIndex (SmiCardInfo *smic, CARD16 addr, CARD16 data, CARD8 id); + +void +smiSetIndex (SmiCardInfo *smic, CARD16 addr, CARD16 data, CARD8 id, CARD8 val); + +void smiSetMMIO (KdCardInfo *card, SmiCardInfo *smic); void diff --git a/hw/kdrive/smi/smidraw.c b/hw/kdrive/smi/smidraw.c index 3b0033586..d1691fce0 100644 --- a/hw/kdrive/smi/smidraw.c +++ b/hw/kdrive/smi/smidraw.c @@ -143,18 +143,16 @@ smiSetup (ScreenPtr pScreen, int wait) return TRUE; } -Bool -smiPrepareSolid (DrawablePtr pDrawable, +static Bool +smiPrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg) { - KdScreenPriv(pDrawable->pScreen); - - if (~pm & FbFullMask(pDrawable->depth)) + if (~pm & FbFullMask(pPixmap->drawable.depth)) return FALSE; - if (!smiSetup (pDrawable->pScreen, 3)) + if (!smiSetup (pPixmap->drawable.pScreen, 3)) return FALSE; accel_cmd = smiSolidRop[alu] | SMI_BITBLT | SMI_START_ENGINE; @@ -164,7 +162,7 @@ smiPrepareSolid (DrawablePtr pDrawable, return TRUE; } -void +static void smiSolid (int x1, int y1, int x2, int y2) { smiWaitAvail(smic,3); @@ -173,7 +171,7 @@ smiSolid (int x1, int y1, int x2, int y2) dpr->accel_cmd = accel_cmd; } -void +static void smiDoneSolid (void) { } @@ -181,20 +179,18 @@ smiDoneSolid (void) static int copyDx; static int copyDy; -Bool -smiPrepareCopy (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - int dx, - int dy, - int alu, - Pixel pm) +static Bool +smiPrepareCopy (PixmapPtr pSrcPixmap, + PixmapPtr pDstPixmap, + int dx, + int dy, + int alu, + Pixel pm) { - KdScreenPriv(pSrcDrawable->pScreen); - - if (~pm & FbFullMask(pSrcDrawable->depth)) + if (~pm & FbFullMask(pSrcPixmap->drawable.depth)) return FALSE; - if (!smiSetup (pSrcDrawable->pScreen, 0)) + if (!smiSetup (pSrcPixmap->drawable.pScreen, 0)) return FALSE; accel_cmd = smiBltRop[alu] | SMI_BITBLT | SMI_START_ENGINE; @@ -206,7 +202,7 @@ smiPrepareCopy (DrawablePtr pSrcDrawable, return TRUE; } -void +static void smiCopy (int srcX, int srcY, int dstX, @@ -228,7 +224,7 @@ smiCopy (int srcX, dpr->accel_cmd = accel_cmd; } -void +static void smiDoneCopy (void) { } @@ -248,7 +244,6 @@ smiDrawInit (ScreenPtr pScreen) { KdScreenPriv(pScreen); smiCardInfo (pScreenPriv); - smiScreenInfo (pScreenPriv); ENTER (); if (pScreenPriv->screen->fb[0].depth == 4) diff --git a/hw/kdrive/smi/smistub.c b/hw/kdrive/smi/smistub.c index 7b67c4b2e..fb4e1bad7 100644 --- a/hw/kdrive/smi/smistub.c +++ b/hw/kdrive/smi/smistub.c @@ -28,6 +28,7 @@ #include <config.h> #endif #include "smi.h" +#include "klinux.h" void InitCard (char *name) diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index ff6be8a35..f34f644b4 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -334,7 +334,7 @@ kaaDrawableIsOffscreen (DrawablePtr pDrawable) return kaaPixmapIsOffscreen (pPixmap); } -void +static void kaaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, DDXPointPtr ppt, int *pwidth, int fSorted) { @@ -416,7 +416,7 @@ kaaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, KdMarkSync(pDrawable->pScreen); } -void +static void kaaCopyNtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -471,7 +471,7 @@ kaaCopyNtoN (DrawablePtr pSrcDrawable, } } -RegionPtr +static RegionPtr kaaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty) { @@ -480,7 +480,7 @@ kaaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, dstx, dsty, kaaCopyNtoN, 0, 0); } -void +static void kaaPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, @@ -576,7 +576,7 @@ kaaPolyFillRect(DrawablePtr pDrawable, KdMarkSync(pDrawable->pScreen); } -void +static void kaaSolidBoxClipped (DrawablePtr pDrawable, RegionPtr pClip, FbBits pm, @@ -636,7 +636,7 @@ kaaSolidBoxClipped (DrawablePtr pDrawable, KdMarkSync(pDrawable->pScreen); } -void +static void kaaImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, int x, @@ -793,7 +793,7 @@ static const GCOps kaaOps = { #endif }; -void +static void kaaValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable) { fbValidateGC (pGC, changes, pDrawable); @@ -814,7 +814,7 @@ GCFuncs kaaGCFuncs = { miCopyClip }; -int +static int kaaCreateGC (GCPtr pGC) { if (!fbCreateGC (pGC)) @@ -826,7 +826,7 @@ kaaCreateGC (GCPtr pGC) } -void +static void kaaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { RegionRec rgnDst; @@ -850,7 +850,7 @@ kaaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); } -void +static void kaaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel) @@ -882,7 +882,7 @@ kaaFillRegionSolid (DrawablePtr pDrawable, } } -void +static void kaaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) { diff --git a/hw/kdrive/src/kcmap.c b/hw/kdrive/src/kcmap.c index d3cb7f20a..855dc6f02 100644 --- a/hw/kdrive/src/kcmap.c +++ b/hw/kdrive/src/kcmap.c @@ -130,7 +130,7 @@ KdDisableColormap (ScreenPtr pScreen) } } -int +static int KdColormapFb (ColormapPtr pCmap) { ScreenPtr pScreen = pCmap->pScreen; diff --git a/hw/kdrive/src/kcurscol.c b/hw/kdrive/src/kcurscol.c index 8afd6442b..50edf1735 100644 --- a/hw/kdrive/src/kcurscol.c +++ b/hw/kdrive/src/kcurscol.c @@ -28,7 +28,7 @@ #include "kdrive.h" #include "cursorstr.h" -int +static int KdComputeCmapShift (unsigned long mask) { int shift; diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index af6e96cbd..a6065f6f4 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -225,7 +225,7 @@ KdDisableScreen (ScreenPtr pScreen) (*pScreenPriv->card->cfuncs->disable) (pScreen); } -void +static void KdDoSwitchCmd (char *reason) { if (kdSwitchCmd) @@ -382,7 +382,7 @@ ddxGiveUp () Bool kdDumbDriver; Bool kdSoftCursor; -char * +static char * KdParseFindNext (char *cur, char *delim, char *save, char *last) { while (*cur && !strchr (delim, *cur)) @@ -836,7 +836,6 @@ Bool KdCreateScreenResources (ScreenPtr pScreen) { KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; KdCardInfo *card = pScreenPriv->card; Bool ret; @@ -947,7 +946,7 @@ KdSaveScreen (ScreenPtr pScreen, int on) return TRUE; } -Bool +static Bool KdCreateWindow (WindowPtr pWin) { #ifndef PHOENIX @@ -1263,7 +1262,7 @@ KdInitScreen (ScreenInfo *pScreenInfo, screen->softCursor = TRUE; } -Bool +static Bool KdSetPixmapFormats (ScreenInfo *pScreenInfo) { CARD8 depthToBpp[33]; /* depth -> bpp map */ @@ -1328,7 +1327,7 @@ KdSetPixmapFormats (ScreenInfo *pScreenInfo) return TRUE; } -void +static void KdAddScreen (ScreenInfo *pScreenInfo, KdScreenInfo *screen, int argc, diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index e46a24e32..8969e6f83 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -219,6 +219,7 @@ extern KdMouseInfo *kdMouseInfo; extern int KdCurScreen; KdMouseInfo *KdMouseInfoAdd (void); +void KdMouseInfoDispose (KdMouseInfo *mi); void KdParseMouse (char *); typedef struct _KdMouseFuncs { @@ -698,7 +699,7 @@ void KdEnableInput (void); void -ProcessInputEvents (); +ProcessInputEvents (void); extern KdMouseFuncs LinuxMouseFuncs; extern KdMouseFuncs Ps2MouseFuncs; diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 5ac032c0e..016e35ddc 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -92,7 +92,7 @@ KdInputFd kdInputFds[KD_MAX_INPUT_FDS]; int kdNumInputFds; int kdInputTypeSequence; -void +static void KdSigio (int sig) { int i; @@ -101,7 +101,7 @@ KdSigio (int sig) (*kdInputFds[i].read) (kdInputFds[i].fd, kdInputFds[i].closure); } -void +static void KdBlockSigio (void) { sigset_t set; @@ -111,7 +111,7 @@ KdBlockSigio (void) sigprocmask (SIG_BLOCK, &set, 0); } -void +static void KdUnblockSigio (void) { sigset_t set; @@ -158,7 +158,7 @@ KdNonBlockFd (int fd) fcntl (fd, F_SETFL, flags); } -void +static void KdAddFd (int fd) { struct sigaction act; @@ -179,7 +179,7 @@ KdAddFd (int fd) sigprocmask (SIG_SETMASK, &set, 0); } -void +static void KdRemoveFd (int fd) { struct sigaction act; @@ -915,7 +915,7 @@ KdInputTransition kdInputMachine[num_input_states][num_input_class] = { #define EventX(e) ((e)->u.keyButtonPointer.rootX) #define EventY(e) ((e)->u.keyButtonPointer.rootY) -int +static int KdInsideEmulationWindow (KdMouseInfo *mi, xEvent *ev) { if (ev->u.keyButtonPointer.pad1) @@ -932,7 +932,7 @@ KdInsideEmulationWindow (KdMouseInfo *mi, xEvent *ev) abs (mi->emulationDy) < EMULATION_WINDOW); } -KdInputClass +static KdInputClass KdClassifyInput (KdMouseInfo *mi, xEvent *ev) { switch (ev->u.u.type) { @@ -1083,7 +1083,7 @@ KdResetInputMachine (void) } } -void +static void KdHandleMouseEvent (KdMouseInfo *mi, xEvent *ev) { if (mi->emulateMiddleButton) @@ -1092,7 +1092,7 @@ KdHandleMouseEvent (KdMouseInfo *mi, xEvent *ev) KdQueueEvent (ev); } -void +static void KdReceiveTimeout (KdMouseInfo *mi) { KdRunMouseMachine (mi, timeout, 0); @@ -1122,7 +1122,7 @@ extern char dispatchException; extern int nClients; -void +static void KdCheckSpecialKeys(xEvent *xE) { KeySym sym = KEYCOL1(xE->u.u.detail); @@ -1195,7 +1195,7 @@ KdCheckSpecialKeys(xEvent *xE) * */ -void +static void KdHandleKeyboardEvent (xEvent *ev) { int key = ev->u.u.detail; @@ -1236,7 +1236,7 @@ KdReleaseAllKeys (void) KdUnblockSigio (); } -void +static void KdCheckLock (void) { KeyClassPtr keyc = pKdKeyboard->key; diff --git a/hw/kdrive/src/knoop.c b/hw/kdrive/src/knoop.c index d791d819d..26d7642f9 100644 --- a/hw/kdrive/src/knoop.c +++ b/hw/kdrive/src/knoop.c @@ -255,14 +255,14 @@ typedef void (* typePushPixels)( #endif ); -RegionPtr +static RegionPtr KdNoopCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty) { return NullRegion; } -RegionPtr +static RegionPtr KdNoopCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long bitPlane) diff --git a/hw/kdrive/src/vga.c b/hw/kdrive/src/vga.c index 23372424c..7975d5c5c 100644 --- a/hw/kdrive/src/vga.c +++ b/hw/kdrive/src/vga.c @@ -210,7 +210,7 @@ VgaInvalidate (VgaCard *card) } -void +static void _VgaSync (VgaCard *card, VGA16 id) { if (!(card->values[id].flags & VGA_VALUE_VALID)) diff --git a/hw/kdrive/src/vga.h b/hw/kdrive/src/vga.h index 2123257d5..5d7e77307 100644 --- a/hw/kdrive/src/vga.h +++ b/hw/kdrive/src/vga.h @@ -126,6 +126,12 @@ VgaInvalidate (VgaCard *card); void VgaRestore (VgaCard *card); +void +VgaFinish (VgaCard *card); + +void +VgaFlushReg (VgaCard *card, VgaReg *reg); + VGA8 VgaFetch (VgaCard *card, VGA16 id); diff --git a/hw/kdrive/vesa/vesa.h b/hw/kdrive/vesa/vesa.h index 1cce002a7..4cad3ac2a 100644 --- a/hw/kdrive/vesa/vesa.h +++ b/hw/kdrive/vesa/vesa.h @@ -108,6 +108,82 @@ extern int vesa_video_mode; extern Bool vesa_force_mode; void +vesaReportMode (VesaModePtr mode); + +VesaModePtr +vesaGetModes (Vm86InfoPtr vi, int *ret_nmode); + +void +vesaTestMode (void); + +void * +vesaSetWindowPlanar(ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size); + +void * +vesaSetWindowLinear (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size); + +void * +vesaSetWindowWindowed (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size); + +void * +vesaWindowPlanar (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size, + void *closure); + +void * +vesaWindowLinear (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size, + void *closure); + +void * +vesaWindowWindowed (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size, + void *closure); + +void * +vesaWindowCga (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size, + void *closure); + +void +vesaUpdateMono (ScreenPtr pScreen, + shadowBufPtr pBuf); + +Bool +vesaCreateColormap16 (ColormapPtr pmap); + +void +vesaSetScreenSizes (ScreenPtr pScreen); + +Bool +vesaSetShadow (ScreenPtr pScreen); + + +void vesaListModes(void); Bool @@ -150,6 +226,9 @@ vesaGetPixmap (ScreenPtr pScreen); Bool vesaMapFramebuffer (KdScreenInfo *screen); +void +vesaUnmapFramebuffer (KdScreenInfo *screen); + Bool vesaInitScreen(ScreenPtr pScreen); @@ -184,6 +263,12 @@ vesaCardFini(KdCardInfo *card); void vesaScreenFini(KdScreenInfo *screen); +int +vesaSetPalette(VesaCardPrivPtr priv, int first, int number, U8 *entries); + +int +vesaGetPalette(VesaCardPrivPtr priv, int first, int number, U8 *entries); + void vesaPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs); @@ -195,10 +280,19 @@ vesaProcessArgument (int argc, char **argv, int i); #ifdef RANDR Bool +vesaRandRGetInfo (ScreenPtr pScreen, Rotation *rotations); + +Bool vesaRandRSetConfig (ScreenPtr pScreen, Rotation randr, int rate, RRScreenSizePtr pSize); +Bool +vesaRandRInit (ScreenPtr pScreen); + #endif +Bool +toshibaDPMS (ScreenPtr pScreen, int mode); + #endif /* _VESA_H_ */ |