summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2006-11-21 04:02:41 +0200
committerGeorge Sapountzis <gsap7@yahoo.gr>2007-02-05 19:32:10 +0200
commiteda9fb15e8bc042661a91a3d8c921006dfb3ddd9 (patch)
tree2fb4c704c862732420c1ac0b53c3b94c15d22379
parent67b240ddd4a6549a23885afc723b6efa7c52db4c (diff)
Consolidate atixv.c w/ atimach64xv.c, part 2.
Move {Initialize,Close}XVideo from atixv.c to atimach64xv.c .
-rw-r--r--src/Makefile.am3
-rw-r--r--src/atimach64xv.c54
-rw-r--r--src/atimach64xv.h33
-rw-r--r--src/atixv.c95
4 files changed, 53 insertions, 132 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index a386c619..f31c0181 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -65,7 +65,7 @@ atimisc_drv_la_SOURCES = \
atilock.c atimach64.c atimach64accel.c atimach64cursor.c \
atimach64i2c.c atimach64io.c atimach64xv.c atimode.c atipreinit.c \
atiprint.c atirgb514.c atiscreen.c atituner.c atiutil.c ativalid.c \
- atixv.c atiload.c atimisc.c $(ATIMISC_DRI_SRCS) $(ATIMISC_DGA_SOURCES) \
+ atiload.c atimisc.c $(ATIMISC_DRI_SRCS) $(ATIMISC_DGA_SOURCES) \
$(ATIMISC_CPIO_SOURCES) $(ATIMISC_EXA_SOURCES)
r128_drv_la_LTLIBRARIES = r128_drv.la
@@ -135,7 +135,6 @@ EXTRA_DIST = \
atimach64i2c.h \
atimach64io.h \
atimach64render.c \
- atimach64xv.h \
atimode.h \
atimodule.h \
atioption.h \
diff --git a/src/atimach64xv.c b/src/atimach64xv.c
index 54f5c4c0..5df903b6 100644
--- a/src/atimach64xv.c
+++ b/src/atimach64xv.c
@@ -30,10 +30,11 @@
#include "atichip.h"
#include "atimach64accel.h"
#include "atimach64io.h"
-#include "atimach64xv.h"
+#include "atixv.h"
#include <X11/extensions/Xv.h>
#include "fourcc.h"
+#include "xf86xv.h"
#define MAKE_ATOM(string) MakeAtom(string, strlen(string), TRUE)
#define MaxScale (CARD32)(CARD16)(-1)
@@ -1529,13 +1530,62 @@ ATIXVPreInit
}
/*
+ * ATIXVFreeAdaptorInfo --
+ *
+ * Free XVideo adaptor information.
+ */
+static void
+ATIXVFreeAdaptorInfo
+(
+ XF86VideoAdaptorPtr *ppAdaptor,
+ int nAdaptor
+)
+{
+ if (!ppAdaptor)
+ return;
+
+ while (nAdaptor > 0)
+ xfree(ppAdaptor[--nAdaptor]);
+
+ xfree(ppAdaptor);
+}
+
+/*
+ * ATIInitializeXVideo --
+ *
+ * This function is called to initialise XVideo extension support on a screen.
+ */
+Bool
+ATIInitializeXVideo
+(
+ ScreenPtr pScreen,
+ ScrnInfoPtr pScreenInfo,
+ ATIPtr pATI
+)
+{
+ XF86VideoAdaptorPtr *ppAdaptor;
+ int nAdaptor;
+ Bool result;
+
+ pScreenInfo->memPhysBase = pATI->LinearBase;
+ pScreenInfo->fbOffset = 0;
+
+ nAdaptor = xf86XVListGenericAdaptors(pScreenInfo, &ppAdaptor);
+ result = xf86XVScreenInit(pScreen, ppAdaptor, nAdaptor);
+
+ ATIXVFreeAdaptorInfo(ppAdaptor, nAdaptor);
+
+ return result;
+}
+
+/*
* ATIMach64CloseXVideo --
*
* This function is called during screen termination to clean up after
* initialisation of Mach64 XVideo support.
*/
void
-ATIMach64CloseXVideo
+ATICloseXVideo
(
ScreenPtr pScreen,
ScrnInfoPtr pScreenInfo,
diff --git a/src/atimach64xv.h b/src/atimach64xv.h
deleted file mode 100644
index f46a120b..00000000
--- a/src/atimach64xv.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2003 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 ___ATIMACH64XV_H___
-#define ___ATIMACH64XV_H___ 1
-
-#include "atipriv.h"
-
-#include "xf86str.h"
-#include "xf86xv.h"
-
-extern void ATIMach64CloseXVideo(ScreenPtr, ScrnInfoPtr, ATIPtr);
-
-#endif /* ___ATIMACH64XV_H___ */
diff --git a/src/atixv.c b/src/atixv.c
deleted file mode 100644
index 476948d4..00000000
--- a/src/atixv.c
+++ /dev/null
@@ -1,95 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "atimach64xv.h"
-#include "atistruct.h"
-#include "atixv.h"
-
-/*
- * ATIXVFreeAdaptorInfo --
- *
- * Free XVideo adaptor information.
- */
-static void
-ATIXVFreeAdaptorInfo
-(
- XF86VideoAdaptorPtr *ppAdaptor,
- int nAdaptor
-)
-{
- if (!ppAdaptor)
- return;
-
- while (nAdaptor > 0)
- xfree(ppAdaptor[--nAdaptor]);
-
- xfree(ppAdaptor);
-}
-
-/*
- * ATIInitializeXVideo --
- *
- * This function is called to initialise XVideo extension support on a screen.
- */
-Bool
-ATIInitializeXVideo
-(
- ScreenPtr pScreen,
- ScrnInfoPtr pScreenInfo,
- ATIPtr pATI
-)
-{
- XF86VideoAdaptorPtr *ppAdaptor;
- int nAdaptor;
- Bool result;
-
- pScreenInfo->memPhysBase = pATI->LinearBase;
- pScreenInfo->fbOffset = 0;
-
- nAdaptor = xf86XVListGenericAdaptors(pScreenInfo, &ppAdaptor);
- result = xf86XVScreenInit(pScreen, ppAdaptor, nAdaptor);
-
- ATIXVFreeAdaptorInfo(ppAdaptor, nAdaptor);
-
- return result;
-}
-
-/*
- * ATICloseXVideo --
- *
- * This function is called during screen termination to clean up after XVideo
- * initialisation.
- */
-void
-ATICloseXVideo
-(
- ScreenPtr pScreen,
- ScrnInfoPtr pScreenInfo,
- ATIPtr pATI
-)
-{
- ATIMach64CloseXVideo(pScreen, pScreenInfo, pATI);
-}