Perform a warnings sweep on hw/kdrive. A number of these were my fault, but

some come from others.
This commit is contained in:
Eric Anholt 2005-06-09 23:22:55 +00:00
parent e11e60b361
commit 75065f3a54
21 changed files with 108 additions and 101 deletions

View File

@ -1,3 +1,9 @@
2005-06-09 Eric Anholt <anholt@FreeBSD.org>
* ati_dri.c:
Perform a warnings sweep on hw/kdrive. A number of these were my fault,
but some come from others.
2005-06-09 Eric Anholt <anholt@FreeBSD.org> 2005-06-09 Eric Anholt <anholt@FreeBSD.org>
* ati.c: * ati.c:

View File

@ -28,6 +28,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
#include "ati.h" #include "ati.h"
#include "ati_reg.h" #include "ati_reg.h"
#include "ati_dma.h" #include "ati_dma.h"
@ -38,6 +39,7 @@
#include "ati_draw.h" #include "ati_draw.h"
#include "r128_common.h" #include "r128_common.h"
#include "radeon_common.h" #include "radeon_common.h"
#include "kaa.h"
/* ?? HACK - for now, put this here... */ /* ?? HACK - for now, put this here... */
/* ?? Alpha - this may need to be a variable to handle UP1x00 vs TITAN */ /* ?? Alpha - this may need to be a variable to handle UP1x00 vs TITAN */

View File

@ -30,14 +30,10 @@
#undef CHIPS_DEBUG #undef CHIPS_DEBUG
Bool static Bool
chipsCardInit (KdCardInfo *card) chipsCardInit (KdCardInfo *card)
{ {
int k;
char *pixels;
ChipsCardInfo *chipsc; ChipsCardInfo *chipsc;
CARD8 r00, r01, r02;
CARD8 r39;
chipsc = (ChipsCardInfo *) xalloc (sizeof (ChipsCardInfo)); chipsc = (ChipsCardInfo *) xalloc (sizeof (ChipsCardInfo));
if (!chipsc) if (!chipsc)
@ -61,14 +57,11 @@ chipsCardInit (KdCardInfo *card)
return TRUE; return TRUE;
} }
Bool static Bool
chipsScreenInit (KdScreenInfo *screen) chipsScreenInit (KdScreenInfo *screen)
{ {
ChipsCardInfo *chipsc = screen->card->driver;
ChipsScreenInfo *chipss; ChipsScreenInfo *chipss;
int screen_size, memory; int screen_size, memory;
CARD32 mmio_base;
CARD32 mmio_size;
chipss = (ChipsScreenInfo *) xalloc (sizeof (ChipsScreenInfo)); chipss = (ChipsScreenInfo *) xalloc (sizeof (ChipsScreenInfo));
if (!chipss) if (!chipss)
@ -126,7 +119,7 @@ chipsScreenInit (KdScreenInfo *screen)
return TRUE; return TRUE;
} }
Bool static Bool
chipsInitScreen (ScreenPtr pScreen) chipsInitScreen (ScreenPtr pScreen)
{ {
return vesaInitScreen (pScreen); return vesaInitScreen (pScreen);
@ -156,7 +149,7 @@ chipsRandRInit (ScreenPtr pScreen)
} }
#endif #endif
Bool static Bool
chipsFinishInitScreen (ScreenPtr pScreen) chipsFinishInitScreen (ScreenPtr pScreen)
{ {
Bool ret; Bool ret;
@ -189,7 +182,8 @@ chipsWriteXR (ChipsScreenInfo *chipss, CARD8 index, CARD8 value)
outb (value, 0x3d7); outb (value, 0x3d7);
} }
CARD8 #if 0
static CARD8
chipsReadFR (ChipsScreenInfo *chipss, CARD8 index) chipsReadFR (ChipsScreenInfo *chipss, CARD8 index)
{ {
CARD8 value; CARD8 value;
@ -198,14 +192,14 @@ chipsReadFR (ChipsScreenInfo *chipss, CARD8 index)
return value; return value;
} }
void static void
chipsWriteFR (ChipsScreenInfo *chipss, CARD8 index, CARD8 value) chipsWriteFR (ChipsScreenInfo *chipss, CARD8 index, CARD8 value)
{ {
outb (index, 0x3d0); outb (index, 0x3d0);
outb (value, 0x3d1); outb (value, 0x3d1);
} }
CARD8 static CARD8
chipsReadSeq (ChipsScreenInfo *chipss, CARD8 index) chipsReadSeq (ChipsScreenInfo *chipss, CARD8 index)
{ {
CARD8 value; CARD8 value;
@ -214,31 +208,31 @@ chipsReadSeq (ChipsScreenInfo *chipss, CARD8 index)
return value; return value;
} }
void static void
chipsWriteSeq (ChipsScreenInfo *chipss, CARD8 index, CARD8 value) chipsWriteSeq (ChipsScreenInfo *chipss, CARD8 index, CARD8 value)
{ {
outb (index, 0x3c4); outb (index, 0x3c4);
outb (value, 0x3c5); outb (value, 0x3c5);
} }
#endif
void static void
chipsPreserve (KdCardInfo *card) chipsPreserve (KdCardInfo *card)
{ {
ChipsCardInfo *chipss = card->driver;
vesaPreserve(card); vesaPreserve(card);
} }
void static void
chipsSetMMIO (ChipsCardInfo *chipsc) chipsSetMMIO (ChipsCardInfo *chipsc)
{ {
} }
void static void
chipsResetMMIO (ChipsCardInfo *chipsc) chipsResetMMIO (ChipsCardInfo *chipsc)
{ {
} }
Bool static Bool
chipsEnable (ScreenPtr pScreen) chipsEnable (ScreenPtr pScreen)
{ {
KdScreenPriv(pScreen); KdScreenPriv(pScreen);
@ -250,7 +244,8 @@ chipsEnable (ScreenPtr pScreen)
return TRUE; return TRUE;
} }
Bool #if 0
static Bool
chipsDPMS (ScreenPtr pScreen, int mode) chipsDPMS (ScreenPtr pScreen, int mode)
{ {
KdScreenPriv(pScreen); KdScreenPriv(pScreen);
@ -264,14 +259,15 @@ chipsDPMS (ScreenPtr pScreen, int mode)
ErrorF ("flat panel XR52 0x%x\n", chipsReadXR (chipss, 0x52)); ErrorF ("flat panel XR52 0x%x\n", chipsReadXR (chipss, 0x52));
return TRUE; return TRUE;
} }
#endif
void static void
chipsDisable (ScreenPtr pScreen) chipsDisable (ScreenPtr pScreen)
{ {
vesaDisable (pScreen); vesaDisable (pScreen);
} }
void static void
chipsRestore (KdCardInfo *card) chipsRestore (KdCardInfo *card)
{ {
ChipsCardInfo *chipsc = card->driver; ChipsCardInfo *chipsc = card->driver;
@ -280,7 +276,7 @@ chipsRestore (KdCardInfo *card)
vesaRestore (card); vesaRestore (card);
} }
void static void
chipsScreenFini (KdScreenInfo *screen) chipsScreenFini (KdScreenInfo *screen)
{ {
ChipsScreenInfo *chipss = (ChipsScreenInfo *) screen->driver; ChipsScreenInfo *chipss = (ChipsScreenInfo *) screen->driver;
@ -297,11 +293,9 @@ chipsScreenFini (KdScreenInfo *screen)
screen->driver = 0; screen->driver = 0;
} }
void static void
chipsCardFini (KdCardInfo *card) chipsCardFini (KdCardInfo *card)
{ {
ChipsCardInfo *chipsc = card->driver;
vesaCardFini (card); vesaCardFini (card);
} }

View File

@ -160,13 +160,6 @@ chipsSet (ScreenPtr pScreen)
pixelStride = pScreenPriv->screen->fb[0].pixelStride; pixelStride = pScreenPriv->screen->fb[0].pixelStride;
} }
static void
chipsWaitMarker (ScreenPtr pScreen, int marker)
{
chipsSet (pScreen);
chipsWaitIdle ();
}
#ifdef HIQV #ifdef HIQV
#define CHIPS_BR0 0x00 /* offset */ #define CHIPS_BR0 0x00 /* offset */
#define CHIPS_BR1 0x04 /* bg */ #define CHIPS_BR1 0x04 /* bg */
@ -312,6 +305,13 @@ chipsWaitIdle (void)
#endif #endif
} }
static void
chipsWaitMarker (ScreenPtr pScreen, int marker)
{
chipsSet (pScreen);
chipsWaitIdle ();
}
static Bool static Bool
chipsPrepareSolid (PixmapPtr pPixmap, chipsPrepareSolid (PixmapPtr pPixmap,
int alu, int alu,

View File

@ -186,7 +186,6 @@ KdCardFuncs ephyrFuncs = {
0, /* initAccel */ 0, /* initAccel */
0, /* enableAccel */ 0, /* enableAccel */
0, /* syncAccel */
0, /* disableAccel */ 0, /* disableAccel */
0, /* finiAccel */ 0, /* finiAccel */

View File

@ -29,11 +29,11 @@
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> /* for memset */ #include <string.h> /* for memset */
#include <time.h>
#include <sys/ipc.h> #include <sys/ipc.h>
#include <sys/shm.h> #include <sys/shm.h>
#include <sys/time.h> #include <sys/time.h>
#include <time.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>

View File

@ -56,18 +56,9 @@ fakeCardInit (KdCardInfo *card)
return TRUE; return TRUE;
} }
static Bool
fakeModeSupported (KdScreenInfo *screen,
const KdMonitorTiming *t)
{
return TRUE;
}
Bool Bool
fakeScreenInitialize (KdScreenInfo *screen, FakeScrPriv *scrpriv) fakeScreenInitialize (KdScreenInfo *screen, FakeScrPriv *scrpriv)
{ {
const KdMonitorTiming *t;
if (!screen->width || !screen->height) if (!screen->width || !screen->height)
{ {
screen->width = 1024; screen->width = 1024;

View File

@ -87,7 +87,6 @@ KdCardFuncs fbdevFuncs = {
0, /* initAccel */ 0, /* initAccel */
0, /* enableAccel */ 0, /* enableAccel */
0, /* syncAccel */
0, /* disableAccel */ 0, /* disableAccel */
0, /* finiAccel */ 0, /* finiAccel */

View File

@ -47,14 +47,13 @@ X Window System is a trademark of The Open Group */
#endif #endif
#include "kdrive.h" #include "kdrive.h"
#include "kxv.h" #include "kxv.h"
#include "klinux.h"
#include "i810.h" #include "i810.h"
#include "agp.h" #include "agp.h"
#include "i810draw.h" #include "i810draw.h"
Bool i810InitVideo(ScreenPtr pScreen);
#ifndef I810_DEBUG #ifndef I810_DEBUG
int I810_DEBUG = (0 int I810_DEBUG = (0
/* | DEBUG_ALWAYS_SYNC */ /* | DEBUG_ALWAYS_SYNC */
@ -137,8 +136,6 @@ i810CardInit (KdCardInfo *card)
{ {
unsigned long *p; unsigned long *p;
unsigned char *LinuxGetPciCfg(KdCardAttr *attr);
if (!(p= (unsigned long *) LinuxGetPciCfg(&card->attr))) if (!(p= (unsigned long *) LinuxGetPciCfg(&card->attr)))
return FALSE; return FALSE;

View File

@ -435,6 +435,9 @@ i810PrintErrorState(i810CardInfo *i810c);
void void
i810VGAGetIOBase(i810VGAPtr vgap); i810VGAGetIOBase(i810VGAPtr vgap);
Bool
i810InitVideo(ScreenPtr pScreen);
/* /*
* MMIO versions of the register access functions. These require * MMIO versions of the register access functions. These require
* hwp->MemBase to be set in such a way that when the standard VGA port * hwp->MemBase to be set in such a way that when the standard VGA port

View File

@ -79,20 +79,23 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "i810.h" #include "i810.h"
#include "cursorstr.h" #include "cursorstr.h"
#define SetupCursor(s) KdScreenPriv(s); \ #define SetupCursor(s) KdScreenPriv(pScreen); \
i810CardInfo(pScreenPriv); \ i810CardInfo(pScreenPriv); \
i810ScreenInfo(pScreenPriv); \ i810ScreenInfo(pScreenPriv); \
i810Cursor *pCurPriv = &i810s->cursor i810Cursor *pCurPriv = &i810s->cursor
static void static void
writeStandardMMIO(I810CardInfo *i810c, int addr, CARD8 val) { writeStandardMMIO(I810CardInfo *i810c, int addr, CARD8 val)
{
moutb(addr, val); moutb(addr, val);
} }
void static void
_i810MoveCursor(ScreenPtr pScreen, int x, int y) { _i810MoveCursor(ScreenPtr pScreen, int x, int y)
SetupCursor(pScreen); {
KdScreenPriv(pScreen);
i810CardInfo(pScreenPriv);
int flag; int flag;
if (I810_DEBUG & DEBUG_VERBOSE_CURSOR) if (I810_DEBUG & DEBUG_VERBOSE_CURSOR)
@ -128,7 +131,9 @@ static void i810LoadCursor(ScreenPtr pScreen, int x, int y);
static void static void
i810MoveCursor (ScreenPtr pScreen, int x, int y) i810MoveCursor (ScreenPtr pScreen, int x, int y)
{ {
SetupCursor (pScreen); KdScreenPriv(pScreen);
i810ScreenInfo(pScreenPriv);
i810Cursor *pCurPriv = &i810s->cursor;
if (!pCurPriv->has_cursor) if (!pCurPriv->has_cursor)
return; return;
@ -142,9 +147,11 @@ i810MoveCursor (ScreenPtr pScreen, int x, int y)
} }
static void static void
_i810SetCursorColors(ScreenPtr pScreen) { /* int bg, int fg */ _i810SetCursorColors(ScreenPtr pScreen)
{
SetupCursor(pScreen); KdScreenPriv(pScreen);
i810CardInfo(pScreenPriv);
int tmp; int tmp;
int bg = 0xffffff; int bg = 0xffffff;
@ -176,12 +183,11 @@ _i810SetCursorColors(ScreenPtr pScreen) { /* int bg, int fg */
v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \
} }
static void i810LoadCursor(ScreenPtr pScreen, int x, int y) { static void i810LoadCursor(ScreenPtr pScreen, int x, int y)
{
SetupCursor(pScreen); SetupCursor(pScreen);
int w, h; int h;
unsigned short r;
unsigned int *msk, *mskLine, *src, *srcLine; unsigned int *msk, *mskLine, *src, *srcLine;
int i, j; int i, j;
@ -219,7 +225,7 @@ static void i810LoadCursor(ScreenPtr pScreen, int x, int y) {
for (j = 0; j < I810_CURSOR_WIDTH / 32; j++) { for (j = 0; j < I810_CURSOR_WIDTH / 32; j++) {
unsigned long m, s, b1, b2; unsigned long m, s;
if (i < h && j < src_width) if (i < h && j < src_width)
{ {
@ -261,9 +267,10 @@ static void i810LoadCursor(ScreenPtr pScreen, int x, int y) {
} }
static void static void
i810UnloadCursor(ScreenPtr pScreen) { i810UnloadCursor(ScreenPtr pScreen)
{
SetupCursor(pScreen); KdScreenPriv(pScreen);
i810CardInfo(pScreenPriv);
unsigned char tmp; unsigned char tmp;
@ -276,7 +283,9 @@ i810UnloadCursor(ScreenPtr pScreen) {
static Bool static Bool
i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
{ {
SetupCursor(pScreen); KdScreenPriv(pScreen);
i810ScreenInfo(pScreenPriv);
i810Cursor *pCurPriv = &i810s->cursor;
if (!pScreenPriv->enabled) if (!pScreenPriv->enabled)
return TRUE; return TRUE;
@ -304,7 +313,9 @@ i810UnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
static void static void
i810SetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) i810SetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
{ {
SetupCursor(pScreen); KdScreenPriv(pScreen);
i810ScreenInfo(pScreenPriv);
i810Cursor *pCurPriv = &i810s->cursor;
pCurPriv->pCursor = pCursor; pCurPriv->pCursor = pCursor;
@ -329,7 +340,9 @@ i810QueryBestSize (int class,
unsigned short *pwidth, unsigned short *pheight, unsigned short *pwidth, unsigned short *pheight,
ScreenPtr pScreen) ScreenPtr pScreen)
{ {
SetupCursor (pScreen); KdScreenPriv(pScreen);
i810ScreenInfo(pScreenPriv);
i810Cursor *pCurPriv = &i810s->cursor;
switch (class) switch (class)
{ {
@ -352,8 +365,10 @@ i810QueryBestSize (int class,
Bool Bool
i810CursorInit(ScreenPtr pScreen) i810CursorInit(ScreenPtr pScreen)
{ {
KdScreenPriv(pScreen);
SetupCursor(pScreen); i810ScreenInfo(pScreenPriv);
i810CardInfo(pScreenPriv);
i810Cursor *pCurPriv = &i810s->cursor;
if (!i810c->CursorStart) { if (!i810c->CursorStart) {
pCurPriv->has_cursor = FALSE; pCurPriv->has_cursor = FALSE;
@ -375,7 +390,9 @@ i810CursorInit(ScreenPtr pScreen)
void void
i810CursorEnable (ScreenPtr pScreen) i810CursorEnable (ScreenPtr pScreen)
{ {
SetupCursor (pScreen); KdScreenPriv(pScreen);
i810ScreenInfo(pScreenPriv);
i810Cursor *pCurPriv = &i810s->cursor;
if (pCurPriv->has_cursor) if (pCurPriv->has_cursor)
{ {
@ -394,7 +411,9 @@ i810CursorEnable (ScreenPtr pScreen)
void void
i810CursorDisable (ScreenPtr pScreen) i810CursorDisable (ScreenPtr pScreen)
{ {
SetupCursor (pScreen); KdScreenPriv(pScreen);
i810ScreenInfo(pScreenPriv);
i810Cursor *pCurPriv = &i810s->cursor;
if (!pScreenPriv->enabled) if (!pScreenPriv->enabled)
return; return;
@ -411,7 +430,9 @@ i810CursorDisable (ScreenPtr pScreen)
void void
i810CursorFini (ScreenPtr pScreen) i810CursorFini (ScreenPtr pScreen)
{ {
SetupCursor (pScreen); KdScreenPriv(pScreen);
i810ScreenInfo(pScreenPriv);
i810Cursor *pCurPriv = &i810s->cursor;
pCurPriv->pCursor = NULL; pCurPriv->pCursor = NULL;
} }

View File

@ -242,11 +242,13 @@ mgaDoneCopy (void)
mgaWaitIdle(); mgaWaitIdle();
} }
#if 0
static Bool static Bool
mgaUploadToScreen(PixmapPtr pDst, char *src, int src_pitch) { mgaUploadToScreen(PixmapPtr pDst, char *src, int src_pitch) {
/* fprintf(stderr,"Upload to Screen %p [%d]\n",src,src_pitch); */ /* fprintf(stderr,"Upload to Screen %p [%d]\n",src,src_pitch); */
return TRUE; return TRUE;
} }
#endif
Bool Bool
mgaDrawInit (ScreenPtr pScreen) mgaDrawInit (ScreenPtr pScreen)

View File

@ -1,3 +1,10 @@
2005-06-09 Eric Anholt <anholt@FreeBSD.org>
* neo_draw.c:
* neomagic.c: (neoScreenInit):
Perform a warnings sweep on hw/kdrive. A number of these were my fault,
but some come from others.
2005-06-09 Eric Anholt <anholt@FreeBSD.org> 2005-06-09 Eric Anholt <anholt@FreeBSD.org>
* neo_draw.c: (neoWaitMarker), (neoDrawInit): * neo_draw.c: (neoWaitMarker), (neoDrawInit):

View File

@ -79,10 +79,6 @@ static void neoWaitMarker (ScreenPtr pScreen, int marker)
neoWaitIdle(neoc); neoWaitIdle(neoc);
} }
static void neoWaitFifo(NeoCardInfo *neoc, int requested_fifo_space)
{
neoWaitIdle( neoc );
}
static Bool neoPrepareSolid(PixmapPtr pPixmap, static Bool neoPrepareSolid(PixmapPtr pPixmap,
int alu, int alu,

View File

@ -85,7 +85,6 @@ static Bool
neoScreenInit(KdScreenInfo *screen) neoScreenInit(KdScreenInfo *screen)
{ {
NeoScreenInfo *neos; NeoScreenInfo *neos;
neoCardInfo(screen);
int screen_size, memory; int screen_size, memory;
neos = xcalloc(sizeof(NeoScreenInfo), 1); neos = xcalloc(sizeof(NeoScreenInfo), 1);

View File

@ -26,6 +26,7 @@
#include <config.h> #include <config.h>
#endif #endif
#include "nvidia.h" #include "nvidia.h"
#include "kaa.h"
#include <sys/io.h> #include <sys/io.h>
static Bool static Bool

View File

@ -49,7 +49,7 @@ int partprodPermedia[] = {
-1, -1, -1, -1, -1, -1, -1, -1,
0}; 0};
Bool static Bool
pmMapReg(KdCardInfo *card, PM2CardInfo *pm2c) pmMapReg(KdCardInfo *card, PM2CardInfo *pm2c)
{ {
pm2c->reg_base = (CARD8 *)KdMapDevice(PM2_REG_BASE(card), pm2c->reg_base = (CARD8 *)KdMapDevice(PM2_REG_BASE(card),
@ -64,7 +64,7 @@ pmMapReg(KdCardInfo *card, PM2CardInfo *pm2c)
return TRUE; return TRUE;
} }
void static void
pmUnmapReg(KdCardInfo *card, PM2CardInfo *pm2c) pmUnmapReg(KdCardInfo *card, PM2CardInfo *pm2c)
{ {
if (pm2c->reg_base) { if (pm2c->reg_base) {
@ -78,8 +78,6 @@ pmUnmapReg(KdCardInfo *card, PM2CardInfo *pm2c)
Bool Bool
pmCardInit (KdCardInfo *card) pmCardInit (KdCardInfo *card)
{ {
int i;
PM2CardInfo *pm2c; PM2CardInfo *pm2c;
pm2c = (PM2CardInfo *) xalloc (sizeof (PM2CardInfo)); pm2c = (PM2CardInfo *) xalloc (sizeof (PM2CardInfo));
@ -102,7 +100,7 @@ pmCardInit (KdCardInfo *card)
return TRUE; return TRUE;
} }
void static void
pmCardFini (KdCardInfo *card) pmCardFini (KdCardInfo *card)
{ {
PM2CardInfo *pm2c = (PM2CardInfo *) card->driver; PM2CardInfo *pm2c = (PM2CardInfo *) card->driver;
@ -176,7 +174,7 @@ pmScreenInit (KdScreenInfo *screen)
return TRUE; return TRUE;
} }
void static void
pmScreenFini (KdScreenInfo *screen) pmScreenFini (KdScreenInfo *screen)
{ {
PM2ScreenInfo *pm2s = (PM2ScreenInfo *) screen->driver; PM2ScreenInfo *pm2s = (PM2ScreenInfo *) screen->driver;
@ -186,7 +184,7 @@ pmScreenFini (KdScreenInfo *screen)
screen->driver = 0; screen->driver = 0;
} }
Bool static Bool
pmInitScreen (ScreenPtr pScreen) pmInitScreen (ScreenPtr pScreen)
{ {
return vesaInitScreen (pScreen); return vesaInitScreen (pScreen);
@ -216,7 +214,7 @@ pmRandRInit (ScreenPtr pScreen)
} }
#endif #endif
Bool static Bool
pmFinishInitScreen (ScreenPtr pScreen) pmFinishInitScreen (ScreenPtr pScreen)
{ {
Bool ret; Bool ret;
@ -227,7 +225,7 @@ pmFinishInitScreen (ScreenPtr pScreen)
return ret; return ret;
} }
void static void
pmPreserve(KdCardInfo *card) pmPreserve(KdCardInfo *card)
{ {
vesaPreserve(card); vesaPreserve(card);
@ -236,17 +234,12 @@ pmPreserve(KdCardInfo *card)
static void static void
pmRestore(KdCardInfo *card) pmRestore(KdCardInfo *card)
{ {
PM2CardInfo *pm2c = card->driver;
vesaRestore (card); vesaRestore (card);
} }
Bool static Bool
pmEnable (ScreenPtr pScreen) pmEnable (ScreenPtr pScreen)
{ {
KdScreenPriv(pScreen);
PM2CardInfo *pm2c = pScreenPriv->card->driver;
if (!vesaEnable (pScreen)) if (!vesaEnable (pScreen))
return FALSE; return FALSE;
@ -257,12 +250,9 @@ pmEnable (ScreenPtr pScreen)
return TRUE; return TRUE;
} }
void static void
pmDisable(ScreenPtr pScreen) pmDisable(ScreenPtr pScreen)
{ {
KdScreenPriv(pScreen);
PM2CardInfo *pm2c = pScreenPriv->card->driver;
#ifdef XV #ifdef XV
KdXVDisable (pScreen); KdXVDisable (pScreen);
#endif #endif

View File

@ -2,6 +2,7 @@
#include <config.h> #include <config.h>
#endif #endif
#include "kdrive.h" #include "kdrive.h"
#include "klinux.h"
#include "pm2.h" #include "pm2.h"
@ -16,8 +17,6 @@ InitCard (char *name)
KdCardAttr attr; KdCardAttr attr;
int i; int i;
Bool LinuxFindPci(CARD16, CARD16, CARD32, KdCardAttr *);
for (i = 0; i < numPM2Cards; i++) for (i = 0; i < numPM2Cards; i++)
if (LinuxFindPci (0x3d3d, PM2Cards[i], 0, &attr)) if (LinuxFindPci (0x3d3d, PM2Cards[i], 0, &attr))
KdCardInfoAdd (&PM2Funcs, &attr, (void *) PM2Cards[i]); KdCardInfoAdd (&PM2Funcs, &attr, (void *) PM2Cards[i]);

View File

@ -25,6 +25,7 @@
#include <config.h> #include <config.h>
#endif #endif
#include "smi.h" #include "smi.h"
#include "kaa.h"
#include <sys/io.h> #include <sys/io.h>
static Bool static Bool

View File

@ -38,6 +38,7 @@
#ifdef XV #ifdef XV
#include "kxv.h" #include "kxv.h"
#endif #endif
#include "kaa.h"
#ifdef DPMSExtension #ifdef DPMSExtension
#include "dpmsproc.h" #include "dpmsproc.h"

View File

@ -48,7 +48,6 @@ const KdCardFuncs vesaFuncs = {
0, /* initAccel */ 0, /* initAccel */
0, /* enableAccel */ 0, /* enableAccel */
0, /* syncAccel */
0, /* disableAccel */ 0, /* disableAccel */
0, /* finiAccel */ 0, /* finiAccel */