diff options
Diffstat (limited to 'hw/xfree86/os-support/bsd/arm_video.c')
-rw-r--r-- | hw/xfree86/os-support/bsd/arm_video.c | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c index 482d53fc3..4d43ba24f 100644 --- a/hw/xfree86/os-support/bsd/arm_video.c +++ b/hw/xfree86/os-support/bsd/arm_video.c @@ -115,9 +115,6 @@ static int devMemFd = -1; #define DEV_MEM "/dev/mem" -static pointer mapVidMem(int, unsigned long, unsigned long, int); -static void unmapVidMem(int, pointer, unsigned long); - /* * Check if /dev/mem can be mmap'd. If it can't print a warning when * "warn" is TRUE. @@ -171,64 +168,9 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) checkDevMem(TRUE); pVidMem->linearSupported = useDevMem; - pVidMem->mapMem = armMapVidMem; - pVidMem->unmapVidMem = armUnmapVidMem; - pVidMem->initialised = TRUE; } -static pointer -mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) -{ - pointer base; - - checkDevMem(FALSE); - - if (useDevMem) - { - if (devMemFd < 0) - { - FatalError("xf86MapVidMem: failed to open %s (%s)\n", - DEV_MEM, strerror(errno)); - } - base = mmap((caddr_t)0, Size, - (flags & VIDMEM_READONLY) ? - PROT_READ : (PROT_READ | PROT_WRITE), - MAP_FLAGS, devMemFd, (off_t)Base + BUS_BASE_BWX); - if (base == MAP_FAILED) - { - FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n", - "xf86MapVidMem", DEV_MEM, Size, Base, - strerror(errno)); - } - return base; - } - - /* else, mmap /dev/vga */ - if ((unsigned long)Base < 0xA0000 || (unsigned long)Base >= 0xC0000) - { - FatalError("%s: Address 0x%x outside allowable range\n", - "xf86MapVidMem", Base); - } - base = mmap(0, Size, - (flags & VIDMEM_READONLY) ? - PROT_READ : (PROT_READ | PROT_WRITE), - MAP_FLAGS, xf86Info.screenFd, - (unsigned long)Base - 0xA0000); - if (base == MAP_FAILED) - { - FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n", - strerror(errno)); - } - return base; -} - -static void -unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) -{ - munmap((caddr_t)Base, Size); -} - /* * Read BIOS via mmap()ing DEV_MEM */ @@ -403,50 +345,6 @@ xf86MapInfoUnmap(struct memAccess *memInfoP, unsigned long Size) } } -static pointer -armMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) -{ - struct memAccess *memInfoP; - - if((memInfoP = checkMapInfo(FALSE, Region)) != NULL) - { - /* - ** xf86 passes in a physical address offset from the start - ** of physical memory, but xf86MapInfoMap expects an - ** offset from the start of the specified region - it gets - ** the physical address of the region from the display driver. - */ - switch(Region) - { - case LINEAR_REGION: - if (vgaPhysLinearBase) - { - Base -= vgaPhysLinearBase; - } - break; - case VGA_REGION: - Base -= 0xA0000; - break; - } - - base = xf86MapInfoMap(memInfoP, Base, Size); - return base; - } - return mapVidMem(ScreenNum, Base, Size, flags); -} - -static void -armUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) -{ - struct memAccess *memInfoP; - - if((memInfoP = checkMapInfo(FALSE, Region)) != NULL) - { - xf86MapInfoUnmap(memInfoP, Base, Size); - } - unmapVidMem(ScreenNum, Base, Size); -} - #ifdef USE_DEV_IO static int IoFd = -1; |