diff options
author | marha <marha@users.sourceforge.net> | 2011-11-04 08:57:20 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-04 08:57:20 +0100 |
commit | 02f377d5e2dd18537d0807ad63675a0970b5a37d (patch) | |
tree | 1814c826db4d95a30ad71431d9c84b8d2611ec18 /xorg-server/hw/xfree86/os-support/bsd | |
parent | 6f4feafd4d22beaabfb0202e66b0dea9047ee084 (diff) | |
download | vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.gz vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.bz2 vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.zip |
xserver pixman mesa git update 4 nov 2011
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/bsd')
6 files changed, 19 insertions, 76 deletions
diff --git a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c index 15eb2a422..882fb3b46 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c @@ -33,12 +33,10 @@ #include <sys/param.h> #ifndef __NetBSD__ -# include <sys/sysctl.h> -# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -# include <machine/sysarch.h> -# endif -# else -# include <machine/sysarch.h> +#include <sys/sysctl.h> +#endif +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) +#include <machine/sysarch.h> #endif #include "xf86Axp.h" @@ -52,10 +50,6 @@ #define MAP_FLAGS (MAP_FILE | MAP_SHARED) #endif -#ifndef MAP_FAILED -#define MAP_FAILED ((caddr_t)-1) -#endif - axpDevice bsdGetAXP(void); #ifndef __NetBSD__ @@ -64,8 +58,6 @@ extern unsigned long dense_base(void); static int axpSystem = -1; static unsigned long hae_thresh; static unsigned long hae_mask; -static unsigned long bus_base; -static unsigned long sparse_size; static unsigned long memory_base(void) @@ -197,7 +189,6 @@ static int devMemFd = -1; #ifdef HAS_APERTURE_DRV #define DEV_APERTURE "/dev/xf86" #endif -#define DEV_MEM "/dev/mem" static pointer mapVidMem(int, unsigned long, unsigned long, int); static void unmapVidMem(int, pointer, unsigned long); @@ -297,7 +288,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) axpSystem = bsdGetAXP(); hae_thresh = xf86AXPParams[axpSystem].hae_thresh; hae_mask = xf86AXPParams[axpSystem].hae_mask; - sparse_size = xf86AXPParams[axpSystem].size; #endif /* __NetBSD__ */ } pVidMem->initialised = TRUE; @@ -440,7 +430,6 @@ xf86DisableIO() #define vuip volatile unsigned int * -static unsigned long msb_set = 0; static pointer memSBase = 0; static pointer memBase = 0; @@ -478,29 +467,25 @@ writeSparse32(int Value, pointer Base, register unsigned long Offset); #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) extern int sysarch(int, void *); -#endif struct parms { u_int64_t hae; }; -#ifndef __NetBSD__ -static int +static void sethae(u_int64_t hae) { -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #ifndef ALPHA_SETHAE #define ALPHA_SETHAE 0 #endif - struct parms p; - p.hae = hae; - return (sysarch(ALPHA_SETHAE, (char *)&p)); -#endif -#ifdef __OpenBSD__ - return -1; -#endif + static struct parms p; + + if (p.hae != hae) { + p.hae = hae; + sysarch(ALPHA_SETHAE, (char *)&p); + } } -#endif /* __NetBSD__ */ +#endif static pointer mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags) @@ -555,12 +540,9 @@ readSparse8(pointer Base, register unsigned long Offset) if (Offset >= (hae_thresh)) { msb = Offset & hae_mask; Offset -= msb; - if (msb_set != msb) { -#ifndef __NetBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) sethae(msb); #endif - msb_set = msb; - } } result = *(vuip) ((unsigned long)memSBase + (Offset << 5)); result >>= shift; @@ -579,12 +561,9 @@ readSparse16(pointer Base, register unsigned long Offset) if (Offset >= (hae_thresh)) { msb = Offset & hae_mask; Offset -= msb; - if (msb_set != msb) { -#ifndef __NetBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) sethae(msb); #endif - msb_set = msb; - } } result = *(vuip)((unsigned long)memSBase+(Offset<<5)+(1<<(5-2))); result >>= shift; @@ -609,12 +588,9 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset) if (Offset >= (hae_thresh)) { msb = Offset & hae_mask; Offset -= msb; - if (msb_set != msb) { -#ifndef __NetBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) sethae(msb); #endif - msb_set = msb; - } } *(vuip) ((unsigned long)memSBase + (Offset << 5)) = b * 0x01010101; } @@ -630,12 +606,9 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset) if (Offset >= (hae_thresh)) { msb = Offset & hae_mask; Offset -= msb; - if (msb_set != msb) { -#ifndef __NetBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) sethae(msb); #endif - msb_set = msb; - } } *(vuip)((unsigned long)memSBase+(Offset<<5)+(1<<(5-2))) = w * 0x00010001; @@ -660,12 +633,9 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset) if (Offset >= (hae_thresh)) { msb = Offset & hae_mask; Offset -= msb; - if (msb_set != msb) { -#ifndef __NetBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) sethae(msb); #endif - msb_set = msb; - } } *(vuip) ((unsigned long)memSBase + (Offset << 5)) = b * 0x01010101; } @@ -680,12 +650,9 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset) if (Offset >= (hae_thresh)) { msb = Offset & hae_mask ; Offset -= msb; - if (msb_set != msb) { -#ifndef __NetBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) sethae(msb); #endif - msb_set = msb; - } } *(vuip)((unsigned long)memSBase+(Offset<<5)+(1<<(5-2))) = w * 0x00010001; diff --git a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c index eb631a7f3..1de6c87d6 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c @@ -97,11 +97,6 @@ struct memAccess ioMemInfo = { CONSOLE_GET_IO_INFO, NULL, NULL, #define MAP_FLAGS (MAP_FILE | MAP_SHARED) #endif -#ifndef MAP_FAILED -#define MAP_FAILED ((caddr_t)-1) -#endif - - #define BUS_BASE 0L #define BUS_BASE_BWX 0L @@ -113,8 +108,6 @@ struct memAccess ioMemInfo = { CONSOLE_GET_IO_INFO, NULL, NULL, static Bool useDevMem = FALSE; 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); diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c index 844617980..b58d6a790 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c @@ -710,7 +710,6 @@ xf86UseMsg() { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) ErrorF("vtXX use the specified VT number (1-12)\n"); - ErrorF("-sharevts share VTs with another X server\n"); #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ ErrorF("-keeptty "); ErrorF("don't detach controlling tty (for debugging only)\n"); diff --git a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c index 20dbde86a..35e00fce7 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c @@ -64,10 +64,6 @@ #define MAP_FLAGS (MAP_FILE | MAP_SHARED) #endif -#ifndef MAP_FAILED -#define MAP_FAILED ((caddr_t)-1) -#endif - #ifdef __OpenBSD__ #define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\ "\tin /etc/sysctl.conf and reboot your machine\n" \ @@ -88,7 +84,6 @@ static int devMemFd = -1; #ifdef HAS_APERTURE_DRV #define DEV_APERTURE "/dev/xf86" #endif -#define DEV_MEM "/dev/mem" static pointer mapVidMem(int, unsigned long, unsigned long, int); static void unmapVidMem(int, pointer, unsigned long); diff --git a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c index aeaf18305..e5d832eed 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c @@ -36,18 +36,11 @@ #include "bus/Pci.h" -#ifndef MAP_FAILED -#define MAP_FAILED ((caddr_t)-1) -#endif - - /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ -#ifndef __OpenBSD__ -#define DEV_MEM "/dev/mem" -#else +#ifdef __OpenBSD__ #define DEV_MEM "/dev/xf86" #endif diff --git a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c index a2a30c9d7..960c850a8 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c @@ -34,10 +34,6 @@ #include "xf86_OSlib.h" #include "xf86OSpriv.h" -#ifndef MAP_FAILED -#define MAP_FAILED ((caddr_t)-1) -#endif - /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ |