diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-07-17 18:57:28 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-07-17 19:09:04 -0700 |
commit | 43b8136a07fbbdf6e5bdd786d06be89904fc0854 (patch) | |
tree | 7c21c408070535b4881293ea012ffa569d8fa88a | |
parent | d58ba314d1fe6fdb1aab7a9f471caabb6f13968c (diff) |
unifdef Lynx
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/XF86DGA.c | 21 | ||||
-rw-r--r-- | src/XF86DGA2.c | 12 |
2 files changed, 2 insertions, 31 deletions
diff --git a/src/XF86DGA.c b/src/XF86DGA.c index c582939..ffae13c 100644 --- a/src/XF86DGA.c +++ b/src/XF86DGA.c @@ -329,13 +329,7 @@ Bool XF86DGAViewPortChanged( #include <stdlib.h> #include <stdio.h> #include <fcntl.h> -# if defined(Lynx) && defined(NO_MMAP) -# include <sys/types.h> -# include <errno.h> -# include <smem.h> -# else -# include <sys/mman.h> -# endif +#include <sys/mman.h> #include <sys/wait.h> #include <signal.h> #include <unistd.h> @@ -463,10 +457,6 @@ MapPhysAddress(unsigned long address, unsigned long size) delta = address % pagesize; offset = address - delta; -#if defined(Lynx) && defined(NO_MMAP) - vaddr = (void *)smem_create("XF86DGA", (char *)offset, - size + delta, SM_READ|SM_WRITE); -#else #ifndef MAP_FILE #define MAP_FILE 0 #endif @@ -478,7 +468,6 @@ MapPhysAddress(unsigned long address, unsigned long size) MAP_FILE | MAP_SHARED, mapFd, (off_t)offset); if (vaddr == (void *)-1) return NULL; -#endif if (!vaddr) { if (!(mp = AddMap())) @@ -538,19 +527,11 @@ XF86DGADirectVideo( mp = sp->map; if (enable & XF86DGADirectGraphics) { -#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(Lynx) && defined(NO_MMAP)) if (mp && mp->vaddr) mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ); -#elif defined(Lynx) && defined(NO_MMAP) - /* XXX this doesn't allow enable after disable */ - smem_create(NULL, mp->vaddr, mp->size + mp->delta, SM_DETACH); - smem_remove("XF86DGA"); -#endif } XF86DGADirectVideoLL(dis, screen, enable); diff --git a/src/XF86DGA2.c b/src/XF86DGA2.c index 6479c18..deb4267 100644 --- a/src/XF86DGA2.c +++ b/src/XF86DGA2.c @@ -737,13 +737,7 @@ void XDGAKeyEventToXKeyEvent( #include <stdlib.h> #include <stdio.h> #include <fcntl.h> -# if defined(Lynx) && defined(NO_MMAP) -# include <sys/types.h> -# include <errno.h> -# include <smem.h> -# else -# include <sys/mman.h> -# endif +#include <sys/mman.h> #include <sys/wait.h> #include <signal.h> #include <unistd.h> @@ -876,9 +870,6 @@ DGAMapPhysical( pMap->physical = base; pMap->size = size; -#if defined (Lynx) && defined(NO_MMAP) - pMap->virtual = smem_create("XF86DGA", (char*)base, size, SM_READ|SM_WRITE); -#else #ifndef MAP_FILE #define MAP_FILE 0 #endif @@ -891,7 +882,6 @@ DGAMapPhysical( if (pMap->virtual == (void *)-1) return False; mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE); -#endif return True; } |