diff options
author | George Fufutos <fufutos610@hotmail.com> | 2006-04-20 03:51:18 +0300 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2006-04-20 05:13:22 +0200 |
commit | f0c8e36e5d67ea99eff70027908669566aec4641 (patch) | |
tree | a0f18680519bd88267e17123925450aa1560fff5 | |
parent | e3c7c50a0a17953d1993907901b8d4439fe1dc91 (diff) |
[PATCH] Move ATIInitializeXVideo to atimach64xv.c .
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/atimach64xv.c | 51 | ||||
-rw-r--r-- | src/atimach64xv.h | 2 | ||||
-rw-r--r-- | src/atipreinit.c | 2 | ||||
-rw-r--r-- | src/atiscreen.c | 6 | ||||
-rw-r--r-- | src/atixv.c | 81 | ||||
-rw-r--r-- | src/atixv.h | 34 |
7 files changed, 58 insertions, 121 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 2c5f122..9c8304a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -53,7 +53,7 @@ mach64_drv_la_SOURCES = \ atidecoder.c atidsp.c atii2c.c 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 ati.c \ + atituner.c atiutil.c ativalid.c atiload.c ati.c \ $(ATIMISC_DRI_SRCS) $(ATIMISC_DGA_SOURCES) $(ATI_CPIO_SOURCES) \ $(ATIMISC_EXA_SOURCES) @@ -102,7 +102,6 @@ EXTRA_DIST = \ atividmem.h \ atiwonder.h \ atiwonderio.h \ - atixv.h \ mach64_common.h \ mach64_dri.h \ mach64_sarea.h diff --git a/src/atimach64xv.c b/src/atimach64xv.c index 9a3d034..5309ce6 100644 --- a/src/atimach64xv.c +++ b/src/atimach64xv.c @@ -1513,6 +1513,27 @@ ATIMach64XVInitialiseAdaptor } /* + * ATIXVFreeAdaptorInfo -- + * + * Free XVideo adaptor information. + */ +static void +ATIXVFreeAdaptorInfo +( + XF86VideoAdaptorPtr *ppAdaptor, + int nAdaptor +) +{ + if (!ppAdaptor) + return; + + while (nAdaptor > 0) + xfree(ppAdaptor[--nAdaptor]); + + xfree(ppAdaptor); +} + +/* * ATIXVPreInit -- * * This function is called by ATIPreInit() to set up the environment required @@ -1534,6 +1555,36 @@ ATIXVPreInit(ATIPtr pATI) } /* + * 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; + + if (!(pScreenInfo->memPhysBase = pATI->LinearBase)) + return FALSE; + + 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 diff --git a/src/atimach64xv.h b/src/atimach64xv.h index bed7048..6aaed2f 100644 --- a/src/atimach64xv.h +++ b/src/atimach64xv.h @@ -29,6 +29,8 @@ #include "xf86str.h" #include "xf86xv.h" +extern void ATIXVPreInit(ATIPtr); +extern Bool ATIInitializeXVideo(ScreenPtr, ScrnInfoPtr, ATIPtr); extern void ATIMach64CloseXVideo(ScreenPtr, ScrnInfoPtr, ATIPtr); #endif /* ___ATIMACH64XV_H___ */ diff --git a/src/atipreinit.c b/src/atipreinit.c index aa2faf0..5b9fd6b 100644 --- a/src/atipreinit.c +++ b/src/atipreinit.c @@ -46,12 +46,12 @@ #include "atimach64accel.h" #include "atimach64cursor.h" #include "atimach64io.h" +#include "atimach64xv.h" #include "atimode.h" #include "atipreinit.h" #include "atiprint.h" #include "atividmem.h" #include "atiwonderio.h" -#include "atixv.h" #include "vbe.h" #include "xf86RAC.h" diff --git a/src/atiscreen.c b/src/atiscreen.c index 05fb43c..537622f 100644 --- a/src/atiscreen.c +++ b/src/atiscreen.c @@ -39,12 +39,12 @@ #include "atidga.h" #include "atidri.h" #include "atimach64.h" +#include "atimach64accel.h" +#include "atimach64cursor.h" +#include "atimach64xv.h" #include "atimode.h" #include "atiscreen.h" #include "atistruct.h" -#include "atixv.h" -#include "atimach64accel.h" -#include "atimach64cursor.h" #ifdef XF86DRI_DEVEL #include "mach64_dri.h" diff --git a/src/atixv.c b/src/atixv.c deleted file mode 100644 index bd0cb83..0000000 --- a/src/atixv.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atixv.c,v 1.5 2003/04/25 04:09:54 tsi Exp $ */ -/* - * 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; - - if (!(pScreenInfo->memPhysBase = pATI->LinearBase)) - return FALSE; - - pScreenInfo->fbOffset = 0; - - nAdaptor = xf86XVListGenericAdaptors(pScreenInfo, &ppAdaptor); - result = xf86XVScreenInit(pScreen, ppAdaptor, nAdaptor); - - ATIXVFreeAdaptorInfo(ppAdaptor, nAdaptor); - - return result; -} diff --git a/src/atixv.h b/src/atixv.h deleted file mode 100644 index fe5d119..0000000 --- a/src/atixv.h +++ /dev/null @@ -1,34 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atixv.h,v 1.4 2003/04/23 21:51:31 tsi Exp $ */ -/* - * 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 ___ATIXV_H___ -#define ___ATIXV_H___ 1 - -#include "atipriv.h" - -#include "xf86str.h" - -extern void ATIXVPreInit(ATIPtr); -extern Bool ATIInitializeXVideo(ScreenPtr, ScrnInfoPtr, ATIPtr); - -#endif /* ___ATIXV_H___ */ |