summaryrefslogtreecommitdiff
path: root/src/XF86DGA.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XF86DGA.c')
-rw-r--r--src/XF86DGA.c44
1 files changed, 5 insertions, 39 deletions
diff --git a/src/XF86DGA.c b/src/XF86DGA.c
index d5df369..c582939 100644
--- a/src/XF86DGA.c
+++ b/src/XF86DGA.c
@@ -329,20 +329,6 @@ Bool XF86DGAViewPortChanged(
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#if defined(ISC)
-# define HAS_SVR3_MMAP
-# include <sys/types.h>
-# include <errno.h>
-
-# include <sys/at_ansi.h>
-# include <sys/kd.h>
-
-# include <sys/sysmacros.h>
-# include <sys/immu.h>
-# include <sys/region.h>
-
-# include <sys/mmap.h>
-#else
# if defined(Lynx) && defined(NO_MMAP)
# include <sys/types.h>
# include <errno.h>
@@ -350,7 +336,6 @@ Bool XF86DGAViewPortChanged(
# else
# include <sys/mman.h>
# endif
-#endif
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
@@ -452,9 +437,6 @@ MapPhysAddress(unsigned long address, unsigned long size)
int pagesize = -1;
void *vaddr;
MapPtr mp;
-#if defined(ISC) && defined(HAS_SVR3_MMAP)
- struct kd_memloc mloc;
-#endif
if ((mp = FindMap(address, size))) {
mp->refcount++;
@@ -481,22 +463,9 @@ MapPhysAddress(unsigned long address, unsigned long size)
delta = address % pagesize;
offset = address - delta;
-
-#if defined(ISC) && defined(HAS_SVR3_MMAP)
- if (mapFd < 0) {
- if ((mapFd = open("/dev/mmap", O_RDWR)) < 0)
- return NULL;
- }
- mloc.vaddr = (char *)0;
- mloc.physaddr = (char *)offset;
- mloc.length = size + delta;
- mloc.ioflg=1;
-
- if ((vaddr = (void *)ioctl(mapFd, MAP, &mloc)) == (void *)-1)
- return NULL;
-#elif defined(Lynx) && defined(NO_MMAP)
+#if defined(Lynx) && defined(NO_MMAP)
vaddr = (void *)smem_create("XF86DGA", (char *)offset,
- size + delta, SM_READ|SM_WRITE);
+ size + delta, SM_READ|SM_WRITE);
#else
#ifndef MAP_FILE
#define MAP_FILE 0
@@ -506,7 +475,7 @@ MapPhysAddress(unsigned long address, unsigned long size)
return NULL;
}
vaddr = (void *)mmap(NULL, size + delta, PROT_READ | PROT_WRITE,
- MAP_FILE | MAP_SHARED, mapFd, (off_t)offset);
+ MAP_FILE | MAP_SHARED, mapFd, (off_t)offset);
if (vaddr == (void *)-1)
return NULL;
#endif
@@ -569,14 +538,12 @@ XF86DGADirectVideo(
mp = sp->map;
if (enable & XF86DGADirectGraphics) {
-#if !defined(ISC) && !defined(HAS_SVR3_MMAP) \
- && !(defined(Lynx) && defined(NO_MMAP))
+#if !(defined(Lynx) && defined(NO_MMAP))
if (mp && mp->vaddr)
mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ | PROT_WRITE);
#endif
} else {
-#if !defined(ISC) && !defined(HAS_SVR3_MMAP) \
- && !(defined(Lynx) && defined(NO_MMAP))
+#if !(defined(Lynx) && defined(NO_MMAP))
if (mp && mp->vaddr)
mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ);
#elif defined(Lynx) && defined(NO_MMAP)
@@ -660,4 +627,3 @@ XF86DGAGetVideo(
return 1;
}
-