diff options
Diffstat (limited to 'driver/xf86-video-apm/src/apm_dga.c')
-rw-r--r-- | driver/xf86-video-apm/src/apm_dga.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/driver/xf86-video-apm/src/apm_dga.c b/driver/xf86-video-apm/src/apm_dga.c index d2502512c..6e92123f0 100644 --- a/driver/xf86-video-apm/src/apm_dga.c +++ b/driver/xf86-video-apm/src/apm_dga.c @@ -11,8 +11,6 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" -#include "xaa.h" -#include "xaalocal.h" #include "apm.h" #include "dgaproc.h" @@ -22,10 +20,12 @@ static Bool ApmOpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, static Bool ApmSetMode(ScrnInfoPtr, DGAModePtr); static int ApmGetViewport(ScrnInfoPtr); static void ApmSetViewport(ScrnInfoPtr, int, int, int); +#ifdef HAVE_XAA_H static void ApmFillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void ApmBlitRect(ScrnInfoPtr, int, int, int, int, int, int); static void ApmBlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, unsigned long); +#endif static void ApmSync(ScrnInfoPtr); static @@ -36,9 +36,13 @@ DGAFunctionRec ApmDGAFuncs = { ApmSetViewport, ApmGetViewport, ApmSync, +#ifdef HAVE_XAA_H ApmFillRect, ApmBlitRect, ApmBlitTransRect +#else + NULL, NULL, NULL +#endif }; /* @@ -167,7 +171,7 @@ SECOND_PASS: Bool ApmDGAInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); APMDECL(pScrn); DGAModePtr modes = NULL; int num = 0; @@ -243,8 +247,8 @@ ApmSetMode(ScrnInfoPtr pScrn, DGAModePtr pMode) } pScrn->currentMode = pApm->CurrentLayout.pMode; - ApmSwitchMode(index, pScrn->currentMode, 0); - ApmAdjustFrame(index, pScrn->frameX0, pScrn->frameY0, 0); + ApmSwitchMode(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode)); + ApmAdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0)); #if 0 if (pApm->AccelInfoRec) XAAInit(pScrn->pScreen, pApm->AccelInfoRec); @@ -269,8 +273,10 @@ ApmSetMode(ScrnInfoPtr pScrn, DGAModePtr pMode) else pApm->CurrentLayout.mask32 = 32 / pMode->bitsPerPixel - 1; - ApmSwitchMode(index, pMode->mode, 0); + ApmSwitchMode(SWITCH_MODE_ARGS(pScrn, pMode->mode)); +#ifdef HAVE_XAA_H ApmSetupXAAInfo(pApm, NULL); +#endif #if 0 if (pApm->DGAXAAInfo) @@ -321,7 +327,7 @@ ApmSetViewport( ApmWriteSeq(0x1C, 0x2F); pApm->apmLock = FALSE; } - pScrn->AdjustFrame(pScrn->pScreen->myNum, x, y, flags); + pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, x, y)); if (pApm->VGAMap) { /* Wait until vertical retrace is in progress. */ while (APMVGAB(0x3DA) & 0x08); @@ -334,6 +340,7 @@ ApmSetViewport( } } +#ifdef HAVE_XAA_H static void ApmFillRect ( ScrnInfoPtr pScrn, @@ -403,6 +410,7 @@ ApmBlitTransRect( SET_SYNC_FLAG(pApm->AccelInfoRec); } } +#endif static Bool ApmOpenFramebuffer( |