summaryrefslogtreecommitdiff
path: root/driver/xf86-video-mga/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-11-23 21:31:18 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-11-23 21:31:18 +0000
commite60da65b3b585305891703baaab2680dd3299fb4 (patch)
tree274550eb688afb7d3f8aaa94855395e4b8479ec0 /driver/xf86-video-mga/src
parentbf4dee348fe6f9343ca4f84ca9f92b2b7a7d53f0 (diff)
Update to xf86-video-mga 1.6.2
Diffstat (limited to 'driver/xf86-video-mga/src')
-rw-r--r--driver/xf86-video-mga/src/Makefile.am4
-rw-r--r--driver/xf86-video-mga/src/Makefile.in15
-rw-r--r--driver/xf86-video-mga/src/mga_dri.c6
-rw-r--r--driver/xf86-video-mga/src/mga_driver.c9
-rw-r--r--driver/xf86-video-mga/src/mga_storm.c22
5 files changed, 32 insertions, 24 deletions
diff --git a/driver/xf86-video-mga/src/Makefile.am b/driver/xf86-video-mga/src/Makefile.am
index 79745d1ae..8227c0582 100644
--- a/driver/xf86-video-mga/src/Makefile.am
+++ b/driver/xf86-video-mga/src/Makefile.am
@@ -55,6 +55,7 @@ mga_drv_la_SOURCES = \
mga_ucode.h \
mga_vga.c \
mga_video.c \
+ mga_storm.c \
compat-api.h
if DRI
@@ -71,6 +72,5 @@ endif
if XAA
mga_drv_la_SOURCES += \
- mga_arc.c \
- mga_storm.c
+ mga_arc.c
endif
diff --git a/driver/xf86-video-mga/src/Makefile.in b/driver/xf86-video-mga/src/Makefile.in
index ace0987dd..20c70422e 100644
--- a/driver/xf86-video-mga/src/Makefile.in
+++ b/driver/xf86-video-mga/src/Makefile.in
@@ -79,8 +79,7 @@ host_triplet = @host@
@USE_EXA_TRUE@ mga_exa.c
@XAA_TRUE@am__append_3 = \
-@XAA_TRUE@ mga_arc.c \
-@XAA_TRUE@ mga_storm.c
+@XAA_TRUE@ mga_arc.c
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
@@ -128,16 +127,16 @@ am__mga_drv_la_SOURCES_DIST = binding.h client.h mga_bios.c \
mga_driver.c mga_esc.c mga_g450pll.c mga.h mga_halmod.c \
mga_hwcurs.c mga_macros.h mga_maven.h mga_merge.c mga_merge.h \
mgareg_flags.h mga_reg.h mga_sarea.h mga_shadow.c mga_ucode.h \
- mga_vga.c mga_video.c compat-api.h mga_dri.c mga_dri.h \
- mga_dripriv.h mga_exa.c mga_arc.c mga_storm.c
+ mga_vga.c mga_video.c mga_storm.c compat-api.h mga_dri.c \
+ mga_dri.h mga_dripriv.h mga_exa.c mga_arc.c
@DRI_TRUE@am__objects_1 = mga_dri.lo
@USE_EXA_TRUE@am__objects_2 = mga_exa.lo
-@XAA_TRUE@am__objects_3 = mga_arc.lo mga_storm.lo
+@XAA_TRUE@am__objects_3 = mga_arc.lo
am_mga_drv_la_OBJECTS = mga_bios.lo mga_dac3026.lo mga_dacG.lo \
mga_dga.lo mga_dh.lo mga_driver.lo mga_esc.lo mga_g450pll.lo \
mga_halmod.lo mga_hwcurs.lo mga_merge.lo mga_shadow.lo \
- mga_vga.lo mga_video.lo $(am__objects_1) $(am__objects_2) \
- $(am__objects_3)
+ mga_vga.lo mga_video.lo mga_storm.lo $(am__objects_1) \
+ $(am__objects_2) $(am__objects_3)
mga_drv_la_OBJECTS = $(am_mga_drv_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -349,7 +348,7 @@ mga_drv_la_SOURCES = binding.h client.h mga_bios.c mga_common.h \
mga_esc.c mga_g450pll.c mga.h mga_halmod.c mga_hwcurs.c \
mga_macros.h mga_maven.h mga_merge.c mga_merge.h \
mgareg_flags.h mga_reg.h mga_sarea.h mga_shadow.c mga_ucode.h \
- mga_vga.c mga_video.c compat-api.h $(am__append_1) \
+ mga_vga.c mga_video.c mga_storm.c compat-api.h $(am__append_1) \
$(am__append_2) $(am__append_3)
all: all-am
diff --git a/driver/xf86-video-mga/src/mga_dri.c b/driver/xf86-video-mga/src/mga_dri.c
index 0154671b2..3923c04ac 100644
--- a/driver/xf86-video-mga/src/mga_dri.c
+++ b/driver/xf86-video-mga/src/mga_dri.c
@@ -922,13 +922,11 @@ static void MGADRIInitBuffersXAA(WindowPtr pWin, RegionPtr prgn,
}
#endif
-#ifdef USE_EXA
static void MGADRIInitBuffersEXA(WindowPtr pWin, RegionPtr prgn,
CARD32 index)
{
/* FIXME */
}
-#endif
#ifdef USE_XAA
/*
@@ -1078,13 +1076,11 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg,
}
#endif
-#ifdef USE_EXA
static void MGADRIMoveBuffersEXA(WindowPtr pParent, DDXPointRec ptOldOrg,
RegionPtr prgnSrc, CARD32 index)
{
/* FIXME */
}
-#endif
Bool MGADRIScreenInit( ScreenPtr pScreen )
{
@@ -1231,6 +1227,8 @@ Bool MGADRIScreenInit( ScreenPtr pScreen )
pDRIInfo->SwapContext = MGADRISwapContext;
}
+ pDRIInfo->InitBuffers = MGADRIInitBuffersEXA;
+ pDRIInfo->MoveBuffers = MGADRIMoveBuffersEXA;
#ifdef USE_EXA
if (pMga->Exa) {
pDRIInfo->InitBuffers = MGADRIInitBuffersEXA;
diff --git a/driver/xf86-video-mga/src/mga_driver.c b/driver/xf86-video-mga/src/mga_driver.c
index b3fe5384b..8c4bb9c3c 100644
--- a/driver/xf86-video-mga/src/mga_driver.c
+++ b/driver/xf86-video-mga/src/mga_driver.c
@@ -73,9 +73,6 @@
/* All drivers initialising the SW cursor need this */
#include "mipointer.h"
-/* All drivers implementing backing store need this */
-#include "mibstore.h"
-
#include "micmap.h"
#include "xf86DDC.h"
@@ -3401,14 +3398,9 @@ MGAScreenInit(SCREEN_INIT_ARGS_DECL)
mgaExaInit(pScreen);
else
#endif
-#ifdef XAA
MGAStormAccelInit(pScreen);
-#else
- ;
-#endif
}
- miInitializeBackingStore(pScreen);
xf86SetBackingStore(pScreen);
xf86SetSilkenMouse(pScreen);
@@ -4188,4 +4180,3 @@ MGAG100BlackMagic(ScrnInfoPtr pScrn)
OUTREG(MGAREG_MACCESS, 1<<15);
usleep(10);
}
-
diff --git a/driver/xf86-video-mga/src/mga_storm.c b/driver/xf86-video-mga/src/mga_storm.c
index c32caf437..fb0e7be54 100644
--- a/driver/xf86-video-mga/src/mga_storm.c
+++ b/driver/xf86-video-mga/src/mga_storm.c
@@ -15,8 +15,10 @@
#include "xf86Pci.h"
/* Drivers that use XAA need this */
+#ifdef HAVE_XAA_H
#include "xaa.h"
#include "xaalocal.h"
+#endif
#include "xf86fbman.h"
#include "miline.h"
#include "servermd.h"
@@ -59,6 +61,7 @@ do { \
XAAMoveDWORDS((d),(s),(c)); \
} while (0)
+#ifdef HAVE_XAA_H
static void mgaSetupForSolidFill( ScrnInfoPtr pScrn, int color,
int rop, unsigned int planemask );
@@ -569,10 +572,13 @@ MGASubsequentCPUToScreenTexture (
#endif /* defined(RENDER) */
+#endif
Bool mgaAccelInit( ScreenPtr pScreen )
{
+#ifdef HAVE_XAA_H
XAAInfoRecPtr infoPtr;
+#endif
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
MGAPtr pMga = MGAPTR(pScrn);
int maxFastBlitMem, maxlines;
@@ -583,8 +589,10 @@ Bool mgaAccelInit( ScreenPtr pScreen )
pMga->ScratchBuffer = malloc(((pScrn->displayWidth * pMga->CurrentLayout.bitsPerPixel) + 127) >> 3);
if(!pMga->ScratchBuffer) return FALSE;
+#ifdef HAVE_XAA_H
pMga->AccelInfoRec = infoPtr = XAACreateInfoRec();
if(!infoPtr) return FALSE;
+#endif
pMga->RenderTime = 0;
pMga->LinearScratch = 0;
@@ -617,6 +625,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
pMga->AtypeNoBLK = MGAAtypeNoBLK;
}
+#ifdef HAVE_XAA_H
/* fill out infoPtr here */
infoPtr->Flags = PIXMAP_CACHE |
OFFSCREEN_PIXMAPS |
@@ -782,6 +791,8 @@ Bool mgaAccelInit( ScreenPtr pScreen )
pMga->MaxFastBlitY = maxFastBlitMem / (pScrn->displayWidth * pMga->CurrentLayout.bitsPerPixel / 8);
}
+#endif
+
switch (pMga->Chipset) {
case PCI_CHIP_MGAG200_SE_A_PCI:
case PCI_CHIP_MGAG200_SE_B_PCI:
@@ -917,6 +928,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
}
+#ifdef HAVE_XAA_H
for (i = 0; i < pScrn->numEntities; i++) {
if (xf86IsEntityShared(pScrn->entityList[i])) {
infoPtr->RestoreAccelState = mgaRestoreAccelState;
@@ -949,9 +961,13 @@ Bool mgaAccelInit( ScreenPtr pScreen )
#endif /* defined(RENDER) */
return(XAAInit(pScreen, infoPtr));
+#else
+ return TRUE;
+#endif
}
+#ifdef HAVE_XAA_H
/* Support for multiscreen */
static void mgaRestoreAccelState(ScrnInfoPtr pScrn)
{
@@ -994,7 +1010,7 @@ static void mgaRestoreAccelState(ScrnInfoPtr pScrn)
OUTREG(MGAREG_YBOT, 0x007FFFFF); /* maxPixelPointer */
pMga->AccelFlags &= ~CLIPPER_ON;
}
-
+#endif
CARD32 MGAAtype[16] = {
MGADWG_RPL | 0x00000000, MGADWG_RSTR | 0x00080000,
@@ -1080,9 +1096,11 @@ void MGAStormEngineInit( ScrnInfoPtr pScrn )
opmode &= ~0x30000;
#endif
+#ifdef HAVE_XAA_H
pMga->SetupForSolidFill = mgaSetupForSolidFill;
pMga->SubsequentSolidFillRect = mgaSubsequentSolidFillRect;
pMga->RestoreAccelState = mgaRestoreAccelState;
+#endif
pMga->fifoCount = 0;
@@ -1155,6 +1173,7 @@ void MGAStormEngineInit( ScrnInfoPtr pScrn )
}
+#ifdef HAVE_XAA_H
static void
MGASetClippingRectangle(
ScrnInfoPtr pScrn,
@@ -2534,3 +2553,4 @@ MGAFillCacheBltRects(
SET_SYNC_FLAG(infoRec);
}
+#endif