summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am3
-rw-r--r--src/atiaccel.c66
-rw-r--r--src/atiaccel.h33
-rw-r--r--src/atimach64accel.c25
-rw-r--r--src/atimach64accel.h2
-rw-r--r--src/atiscreen.c3
6 files changed, 23 insertions, 109 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index ee4911b8..adb87073 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,7 +60,7 @@ atimisc_drv_la_LTLIBRARIES = atimisc_drv.la
atimisc_drv_la_LDFLAGS = -module -avoid-version
atimisc_drv_ladir = @moduledir@/drivers
atimisc_drv_la_SOURCES = \
- atiaccel.c atiadjust.c atiaudio.c aticlock.c aticonfig.c aticonsole.c \
+ atiadjust.c atiaudio.c aticlock.c aticonfig.c aticonsole.c \
aticursor.c atidac.c atidecoder.c atidsp.c atifillin.c atii2c.c \
atilock.c atimach64.c atimach64accel.c atimach64cursor.c \
atimach64i2c.c atimach64io.c atimach64xv.c atimode.c atipreinit.c \
@@ -108,7 +108,6 @@ EXTRA_DIST = \
radeon_render.c \
radeon_accelfuncs.c \
\
- atiaccel.h \
atiadjust.h \
atiaudio.h \
atibank.h \
diff --git a/src/atiaccel.c b/src/atiaccel.c
deleted file mode 100644
index a1f09aaa..00000000
--- a/src/atiaccel.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2001 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of Marc Aurele La France not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. Marc Aurele La France makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as-is" without express or implied warranty.
- *
- * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
- * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * DRI support by:
- * Leif Delgass <ldelgass@retinalburn.net>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "atiaccel.h"
-#include "atimach64accel.h"
-#include "atistruct.h"
-
-#ifdef USE_XAA
-/*
- * ATIInitializeAcceleration --
- *
- * This function is called to initialise both the framebuffer manager and XAA
- * on a screen.
- */
-Bool
-ATIInitializeAcceleration
-(
- ScreenPtr pScreen,
- ScrnInfoPtr pScreenInfo,
- ATIPtr pATI
-)
-{
- if (pATI->OptionAccel)
- {
- if (!(pATI->pXAAInfo = XAACreateInfoRec()))
- return FALSE;
-
- {
- ATIMach64AccelInit(pATI, pATI->pXAAInfo);
- }
- }
-
- if (!pATI->OptionAccel || XAAInit(pScreen, pATI->pXAAInfo))
- return TRUE;
-
- XAADestroyInfoRec(pATI->pXAAInfo);
- pATI->pXAAInfo = NULL;
- return FALSE;
-}
-#endif /* USE_XAA */
diff --git a/src/atiaccel.h b/src/atiaccel.h
deleted file mode 100644
index 44861236..00000000
--- a/src/atiaccel.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2001 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of Marc Aurele La France not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. Marc Aurele La France makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as-is" without express or implied warranty.
- *
- * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
- * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef ___ATIACCEL_H___
-#define ___ATIACCEL_H___ 1
-
-#include "atipriv.h"
-
-#include "xf86str.h"
-#include "xf86fbman.h"
-
-extern Bool ATIInitializeAcceleration(ScreenPtr, ScrnInfoPtr, ATIPtr);
-
-#endif /* ___ATIACCEL_H___ */
diff --git a/src/atimach64accel.c b/src/atimach64accel.c
index 090ae788..276fc86a 100644
--- a/src/atimach64accel.c
+++ b/src/atimach64accel.c
@@ -970,13 +970,21 @@ ATIMach64SubsequentColorExpandScanline
* This function fills in structure fields needed for acceleration on Mach64
* variants.
*/
-int
+Bool
ATIMach64AccelInit
(
- ATIPtr pATI,
- XAAInfoRecPtr pXAAInfo
+ ScreenPtr pScreen
)
{
+ ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
+ ATIPtr pATI = ATIPTR(pScreenInfo);
+ XAAInfoRecPtr pXAAInfo;
+
+ if (!(pATI->pXAAInfo = XAACreateInfoRec()))
+ return FALSE;
+
+ pXAAInfo = pATI->pXAAInfo;
+
/* This doesn't seem quite right... */
if (pATI->XModifier == 1)
{
@@ -1040,7 +1048,7 @@ ATIMach64AccelInit
/* The engine does not support the following primitives for 24bpp */
if (pATI->XModifier != 1)
- return ATIMach64MaxY;
+ goto XAAInit;
/* Solid lines */
pXAAInfo->SetupForSolidLine = ATIMach64SetupForSolidLine;
@@ -1048,6 +1056,13 @@ ATIMach64AccelInit
pXAAInfo->SubsequentSolidBresenhamLine =
ATIMach64SubsequentSolidBresenhamLine;
- return ATIMach64MaxY;
+XAAInit:
+ if (!XAAInit(pScreen, pATI->pXAAInfo)) {
+ XAADestroyInfoRec(pATI->pXAAInfo);
+ pATI->pXAAInfo = NULL;
+ return FALSE;
+ }
+
+ return TRUE;
}
#endif /* USE_XAA */
diff --git a/src/atimach64accel.h b/src/atimach64accel.h
index 1cdf6ca3..6a7d5b25 100644
--- a/src/atimach64accel.h
+++ b/src/atimach64accel.h
@@ -35,7 +35,7 @@
extern Bool ATIMach64ExaInit(ScreenPtr);
#endif
#ifdef USE_XAA
-extern int ATIMach64AccelInit(ATIPtr, XAAInfoRecPtr);
+extern Bool ATIMach64AccelInit(ScreenPtr);
#endif
extern void ATIMach64Sync(ScrnInfoPtr);
diff --git a/src/atiscreen.c b/src/atiscreen.c
index e8499415..338342ac 100644
--- a/src/atiscreen.c
+++ b/src/atiscreen.c
@@ -34,7 +34,6 @@
#include "ati.h"
#include "atibus.h"
#include "atichip.h"
-#include "atiaccel.h"
#include "aticonsole.h"
#include "aticursor.h"
#include "atidac.h"
@@ -525,7 +524,7 @@ ATIScreenInit
/* Setup acceleration */
- if (!ATIInitializeAcceleration(pScreen, pScreenInfo, pATI))
+ if (pATI->OptionAccel && !ATIMach64AccelInit(pScreen))
return FALSE;
}