diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-11-22 16:50:01 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-11-22 16:50:01 +0000 |
commit | eab8b1201e7531f9c060e7aaddc1e86200cc6d9d (patch) | |
tree | b26b9247a50675743fa2784658709c3ce95fa5a9 /driver/xf86-video-neomagic/src | |
parent | 7e94b920e5f0eab573c59dc3e9c8d64b5cb53598 (diff) |
Update to xf86-video-neomagic 1.2.4
Diffstat (limited to 'driver/xf86-video-neomagic/src')
-rw-r--r-- | driver/xf86-video-neomagic/src/Makefile.in | 14 | ||||
-rw-r--r-- | driver/xf86-video-neomagic/src/neo_driver.c | 119 | ||||
-rw-r--r-- | driver/xf86-video-neomagic/src/neo_shadow.c | 1 |
3 files changed, 27 insertions, 107 deletions
diff --git a/driver/xf86-video-neomagic/src/Makefile.in b/driver/xf86-video-neomagic/src/Makefile.in index 9e288e8c1..3b82a05c5 100644 --- a/driver/xf86-video-neomagic/src/Makefile.in +++ b/driver/xf86-video-neomagic/src/Makefile.in @@ -134,6 +134,7 @@ F77 = @F77@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -174,15 +175,9 @@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@ XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ ac_ct_F77 = @ac_ct_F77@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -199,24 +194,31 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ diff --git a/driver/xf86-video-neomagic/src/neo_driver.c b/driver/xf86-video-neomagic/src/neo_driver.c index f4726011a..ddb68123e 100644 --- a/driver/xf86-video-neomagic/src/neo_driver.c +++ b/driver/xf86-video-neomagic/src/neo_driver.c @@ -54,7 +54,11 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Everything using inb/outb, etc needs "compiler.h" */ #include "compiler.h" +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 #include "xf86Resources.h" +/* Needed by Resources Access Control (RAC) */ +#include "xf86RAC.h" +#endif /* Drivers for PCI hardware need this */ #include "xf86PciInfo.h" @@ -81,9 +85,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "fb.h" -/* Needed by Resources Access Control (RAC) */ -#include "xf86RAC.h" - /* int10 */ #include "xf86int10.h" #include "vbe.h" @@ -412,79 +413,6 @@ static const OptionInfoRec NEOOptions[] = { { -1, NULL, OPTV_NONE, {0}, FALSE } }; -/* - * List of symbols from other modules that this module references. This - * list is used to tell the loader that it is OK for symbols here to be - * unresolved providing that it hasn't been told that they haven't been - * told that they are essential via a call to xf86LoaderReqSymbols() or - * xf86LoaderReqSymLists(). The purpose is this is to avoid warnings about - * unresolved symbols that are not required. - */ - -static const char *vgahwSymbols[] = { - "vgaHWFreeHWRec", - "vgaHWGetHWRec", - "vgaHWGetIOBase", - "vgaHWGetIndex", - "vgaHWInit", - "vgaHWLock", - "vgaHWMapMem", - "vgaHWProtect", - "vgaHWRestore", - "vgaHWSave", - "vgaHWSaveScreenWeak", - "vgaHWSetStdFuncs", - "vgaHWUnlock", - "vgaHWddc1SetSpeedWeak", - NULL -}; - -static const char *fbSymbols[] = { - "fbPictureInit", - "fbScreenInit", - NULL -}; - -static const char *xaaSymbols[] = { - "XAACreateInfoRec", - "XAADestroyInfoRec", - "XAAInit", - NULL -}; - -static const char *ramdacSymbols[] = { - "xf86CreateCursorInfoRec", - "xf86DestroyCursorInfoRec", - "xf86InitCursor", - NULL -}; - -static const char *shadowSymbols[] = { - "shadowInit", - NULL -}; - -static const char *ddcSymbols[] = { - "xf86DoEDID_DDC1", - "xf86DoEDID_DDC2", - "xf86PrintEDID", - "xf86SetDDCproperties", - NULL -}; - -static const char *vbeSymbols[] = { - "VBEInit", - "vbeDoEDID", - "vbeFree", - NULL -}; - -static const char *i2cSymbols[] = { - "xf86CreateI2CBusRec", - "xf86I2CBusInit", - NULL -}; - #ifdef XFree86LOADER static MODULESETUPPROTO(neoSetup); @@ -519,18 +447,6 @@ neoSetup(pointer module, pointer opts, int *errmaj, int *errmin) xf86AddDriver(&NEOMAGIC, module, 0); /* - * Modules that this driver always requires can be loaded here - * by calling LoadSubModule(). - */ - - /* - * Tell the loader about symbols from other modules that this module - * might refer to. - */ - LoaderRefSymLists(vgahwSymbols, fbSymbols, xaaSymbols, - ramdacSymbols, shadowSymbols, - ddcSymbols, vbeSymbols, i2cSymbols, NULL); - /* * The return value must be non-NULL on success even though there * is no TearDownProc. */ @@ -744,8 +660,6 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) if (!xf86LoadSubModule(pScrn, "vgahw")) return FALSE; - xf86LoaderReqSymLists(vgahwSymbols, NULL); - /* * Allocate a vgaHWRec. */ @@ -774,7 +688,9 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) /* This is the general case */ for (i = 0; i<pScrn->numEntities; i++) { nPtr->pEnt = xf86GetEntityInfo(pScrn->entityList[i]); +#ifndef XSERVER_LIBPCIACCESS if (nPtr->pEnt->resources) return FALSE; +#endif nPtr->NeoChipset = nPtr->pEnt->chipset; pScrn->chipset = (char *)xf86TokenToString(NEOChipsets, nPtr->pEnt->chipset); @@ -965,7 +881,6 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) pScrn->monitor = pScrn->confScreen->monitor; if (xf86LoadSubModule(pScrn, "ddc")) { - xf86LoaderReqSymLists(ddcSymbols, NULL); #if 1 /* for DDC1 testing */ if (!neoDoDDCVBE(pScrn)) if (!neoDoDDC2(pScrn)) @@ -1259,11 +1174,15 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) nPtr->NeoMMIOAddr2); } } +#ifndef XSERVER_LIBPCIACCESS /* XXX What about VGA resources in OPERATING mode? */ if (xf86RegisterResources(nPtr->pEnt->index, NULL, ResExclusive)) RETURN; +#endif - } else if (nPtr->pEnt->location.type == BUS_ISA) { + } +#ifndef XSERVER_LIBPCIACCESS + else if (nPtr->pEnt->location.type == BUS_ISA) { unsigned int addr; resRange linearRes[] = { {ResExcMemBlock|ResBios|ResBus,0,0},_END }; @@ -1282,12 +1201,15 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) "MMIO base address is set at 0x%lX.\n", nPtr->NeoMMIOAddr); } + linearRes[0].rBegin = nPtr->NeoLinearAddr; linearRes[1].rEnd = nPtr->NeoLinearAddr + nPtr->NeoFbMapSize - 1; if (xf86RegisterResources(nPtr->pEnt->index,linearRes,ResNone)) { nPtr->noLinear = TRUE; /* XXX */ } - } else + } +#endif + else RETURN; if (nPtr->pEnt->device->videoRam != 0) { @@ -1411,25 +1333,20 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) RETURN; } - xf86LoaderReqSymLists(fbSymbols, NULL); - if (!nPtr->noLinear) { if (!xf86LoadSubModule(pScrn, "xaa")) RETURN; - xf86LoaderReqSymLists(xaaSymbols, NULL); } if (nPtr->shadowFB) { if (!xf86LoadSubModule(pScrn, "shadow")) { RETURN; } - xf86LoaderReqSymLists(shadowSymbols, NULL); } if (!nPtr->swCursor) { if (!xf86LoadSubModule(pScrn, "ramdac")) RETURN; - xf86LoaderReqSymLists(ramdacSymbols, NULL); } return TRUE; } @@ -1519,7 +1436,9 @@ NEOScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) int ret; VisualPtr visual; int allocatebase, freespace, currentaddr; +#ifndef XSERVER_LIBPCIACCESS unsigned int racflag = RAC_FB; +#endif unsigned char *FBStart; int height, width, displayWidth; @@ -1811,11 +1730,13 @@ NEOScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) CMAP_PALETTED_TRUECOLOR | CMAP_RELOAD_ON_MODE_SWITCH)) return FALSE; +#ifndef XSERVER_LIBPCIACCESS racflag |= RAC_COLORMAP; if (nPtr->NeoHWCursorInitialized) racflag |= RAC_CURSOR; pScrn->racIoFlags = pScrn->racMemFlags = racflag; +#endif NEOInitVideo(pScreen); @@ -3208,7 +3129,6 @@ neoDoDDC2(ScrnInfoPtr pScrn) VGAwGR(0x09,0x26); if (xf86LoadSubModule(pScrn, "i2c")) { - xf86LoaderReqSymLists(i2cSymbols, NULL); if (neo_I2CInit(pScrn)) { ret = xf86SetDDCproperties(pScrn,xf86PrintEDID(xf86DoEDID_DDC2( pScrn->scrnIndex,nPtr->I2C))); @@ -3229,7 +3149,6 @@ neoDoDDCVBE(ScrnInfoPtr pScrn) VGAwGR(0x09,0x26); if (xf86LoadSubModule(pScrn, "vbe")) { - xf86LoaderReqSymLists(vbeSymbols, NULL); if ((pVbe = VBEInit(NULL,nPtr->pEnt->index))) { ret = xf86SetDDCproperties( pScrn,xf86PrintEDID(vbeDoEDID(pVbe,NULL))); diff --git a/driver/xf86-video-neomagic/src/neo_shadow.c b/driver/xf86-video-neomagic/src/neo_shadow.c index c5b682f17..ee4a56b07 100644 --- a/driver/xf86-video-neomagic/src/neo_shadow.c +++ b/driver/xf86-video-neomagic/src/neo_shadow.c @@ -10,7 +10,6 @@ #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86Resources.h" #include "xf86PciInfo.h" #include "xf86Pci.h" #include "shadowfb.h" |