diff options
Diffstat (limited to 'xserver/hw/xfree86')
-rw-r--r-- | xserver/hw/xfree86/common/xf86AutoConfig.c | 9 | ||||
-rw-r--r-- | xserver/hw/xfree86/common/xf86Priv.h | 24 | ||||
-rw-r--r-- | xserver/hw/xfree86/common/xf86Xinput.c | 2 | ||||
-rw-r--r-- | xserver/hw/xfree86/loader/os.c | 4 | ||||
-rw-r--r-- | xserver/hw/xfree86/modes/xf86Cursors.c | 3 | ||||
-rw-r--r-- | xserver/hw/xfree86/modes/xf86EdidModes.c | 6 | ||||
-rw-r--r-- | xserver/hw/xfree86/modes/xf86Rotate.c | 2 | ||||
-rw-r--r-- | xserver/hw/xfree86/os-support/bus/Pci.h | 2 | ||||
-rw-r--r-- | xserver/hw/xfree86/os-support/bus/freebsdPci.c | 2 | ||||
-rw-r--r-- | xserver/hw/xfree86/xaa/xaaGC.c | 11 |
10 files changed, 31 insertions, 34 deletions
diff --git a/xserver/hw/xfree86/common/xf86AutoConfig.c b/xserver/hw/xfree86/common/xf86AutoConfig.c index a2c9c5d0e..daf28d9d7 100644 --- a/xserver/hw/xfree86/common/xf86AutoConfig.c +++ b/xserver/hw/xfree86/common/xf86AutoConfig.c @@ -160,12 +160,17 @@ videoPtrToDriverName(pciVideoPtr info) { /* * things not handled yet: - * amd/cyrix/nsc - * xgi + * cyrix/nsc. should be merged into geode anyway. + * xgi. */ switch (info->vendor) { + case 0x1022: + if (info->chipType == 0x2081) + return "amd"; + else + return NULL; case 0x1142: return "apm"; case 0xedd8: return "ark"; case 0x1a03: return "ast"; diff --git a/xserver/hw/xfree86/common/xf86Priv.h b/xserver/hw/xfree86/common/xf86Priv.h index e7c0a9f67..5a3cba38f 100644 --- a/xserver/hw/xfree86/common/xf86Priv.h +++ b/xserver/hw/xfree86/common/xf86Priv.h @@ -100,7 +100,6 @@ extern int xf86NumModuleInfos; extern int xf86NumDrivers; extern Bool xf86Resetting; extern Bool xf86Initialising; -extern Bool xf86ProbeFailed; extern int xf86NumScreens; extern pciVideoPtr *xf86PciVideoInfo; extern xf86CurrentAccessRec xf86CurrentAccess; @@ -120,7 +119,7 @@ extern RootWinPropPtr *xf86RegisteredPropertiesTable; #define DEFAULT_LOG_VERBOSE 3 #endif #ifndef DEFAULT_DPI -#define DEFAULT_DPI 75 +#define DEFAULT_DPI 96 #endif #define DEFAULT_UNRESOLVED TRUE @@ -155,7 +154,6 @@ extern int pciTestMultiDeviceCard(int bus, int dev, int func, PCITAG** pTag); /* xf86Config.c */ -Bool xf86PathIsAbsolute(const char *path); Bool xf86PathIsSafe(const char *path); /* xf86DefaultModes */ @@ -176,9 +174,6 @@ void xf86PostKbdEvent(unsigned key); void xf86PostMseEvent(DeviceIntPtr device, int buttons, int dx, int dy); void xf86Wakeup(pointer blockData, int err, pointer pReadmask); void xf86SigHandler(int signo); -#ifdef MEMDEBUG -void xf86SigMemDebug(int signo); -#endif void xf86HandlePMEvents(int fd, pointer data); extern int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num); extern pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event); @@ -193,20 +188,6 @@ Bool xf86LoadModules(char **list, pointer *optlist); int xf86SetVerbosity(int verb); int xf86SetLogVerbosity(int verb); -/* xf86Io.c */ - -void xf86KbdBell(int percent, DeviceIntPtr pKeyboard, pointer ctrl, - int unused); -void xf86KbdLeds(void); -void xf86UpdateKbdLeds(void); -void xf86KbdCtrl(DevicePtr pKeyboard, KeybdCtrl *ctrl); -void xf86InitKBD(Bool init); -int xf86KbdProc(DeviceIntPtr pKeyboard, int what); - -/* xf86Kbd.c */ - -void xf86KbdGetMapping(KeySymsPtr pKeySyms, CARD8 *pModMap); - /* xf86Lock.c */ #ifdef USE_XF86_SERVERLOCK @@ -217,6 +198,9 @@ void xf86UnlockServer(void); void xf86InitXkb(void); +/* xf86Xinput.c */ +extern xEvent *xf86Events; + #endif /* _NO_XF86_PROTOTYPES */ diff --git a/xserver/hw/xfree86/common/xf86Xinput.c b/xserver/hw/xfree86/common/xf86Xinput.c index 9dd185f94..36a408e12 100644 --- a/xserver/hw/xfree86/common/xf86Xinput.c +++ b/xserver/hw/xfree86/common/xf86Xinput.c @@ -116,7 +116,7 @@ _X_EXPORT void xf86ProcessCommonOptions(LocalDevicePtr local, pointer list) { - if (xf86SetBoolOption(list, "AlwaysCore", 0) || + if (!xf86SetBoolOption(list, "AlwaysCore", 1) || !xf86SetBoolOption(list, "SendCoreEvents", 1) || !xf86SetBoolOption(list, "CorePointer", 1) || !xf86SetBoolOption(list, "CoreKeyboard", 1)) { diff --git a/xserver/hw/xfree86/loader/os.c b/xserver/hw/xfree86/loader/os.c index 83fd24787..12cf3d859 100644 --- a/xserver/hw/xfree86/loader/os.c +++ b/xserver/hw/xfree86/loader/os.c @@ -42,6 +42,8 @@ #define OSNAME "linux" #elif defined(__FreeBSD__) #define OSNAME "freebsd" +#elif defined(__DragonFly__) +#define OSNAME "dragonfly" #elif defined(__NetBSD__) #define OSNAME "netbsd" #elif defined(__OpenBSD__) @@ -62,8 +64,6 @@ #define OSNAME "svr5" #elif defined(SVR4) #define OSNAME "svr4" -#elif defined(__UNIXOS2__) -#define OSNAME "os2" #else #define OSNAME "unknown" #endif diff --git a/xserver/hw/xfree86/modes/xf86Cursors.c b/xserver/hw/xfree86/modes/xf86Cursors.c index b5101642b..a7616e0e5 100644 --- a/xserver/hw/xfree86/modes/xf86Cursors.c +++ b/xserver/hw/xfree86/modes/xf86Cursors.c @@ -137,7 +137,8 @@ cursor_bitpos (int flags, int x, Bool mask) mask = !mask; if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED) x = (x & ~3) | (3 - (x & 3)); - if (flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) + if (((flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) == 0) == + (X_BYTE_ORDER == X_BIG_ENDIAN)) x = (x & ~7) | (7 - (x & 7)); if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1) x = (x << 1) + mask; diff --git a/xserver/hw/xfree86/modes/xf86EdidModes.c b/xserver/hw/xfree86/modes/xf86EdidModes.c index 8b5e69d9a..e2ae66567 100644 --- a/xserver/hw/xfree86/modes/xf86EdidModes.c +++ b/xserver/hw/xfree86/modes/xf86EdidModes.c @@ -239,6 +239,12 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, Mode->VSyncEnd = Mode->VSyncStart + timing->v_sync_width; Mode->VTotal = timing->v_active + timing->v_blanking; + /* perform basic check on the detail timing */ + if (Mode->HSyncEnd > Mode->HTotal || Mode->VSyncEnd > Mode->VTotal) { + xfree(Mode); + return NULL; + } + xf86SetModeDefaultName(Mode); /* We ignore h/v_size and h/v_border for now. */ diff --git a/xserver/hw/xfree86/modes/xf86Rotate.c b/xserver/hw/xfree86/modes/xf86Rotate.c index cbef1351d..f442d92dd 100644 --- a/xserver/hw/xfree86/modes/xf86Rotate.c +++ b/xserver/hw/xfree86/modes/xf86Rotate.c @@ -582,7 +582,7 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) int width, height, old_width, old_height; void *shadowData; PixmapPtr shadow; - PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, crtc->x, crtc->y); + PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y)); PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc); /* diff --git a/xserver/hw/xfree86/os-support/bus/Pci.h b/xserver/hw/xfree86/os-support/bus/Pci.h index c9098b1b5..a6655bf57 100644 --- a/xserver/hw/xfree86/os-support/bus/Pci.h +++ b/xserver/hw/xfree86/os-support/bus/Pci.h @@ -235,7 +235,7 @@ # if defined(linux) # define ARCH_PCI_INIT axpPciInit # define INCLUDE_XF86_MAP_PCI_MEM -# elif defined(__FreeBSD__) || defined(__OpenBSD__) +# elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) # define ARCH_PCI_INIT freebsdPciInit # define INCLUDE_XF86_MAP_PCI_MEM # define INCLUDE_XF86_NO_DOMAIN diff --git a/xserver/hw/xfree86/os-support/bus/freebsdPci.c b/xserver/hw/xfree86/os-support/bus/freebsdPci.c index 97782f296..062f9b5a1 100644 --- a/xserver/hw/xfree86/os-support/bus/freebsdPci.c +++ b/xserver/hw/xfree86/os-support/bus/freebsdPci.c @@ -83,7 +83,7 @@ static pciBusInfo_t freebsdPci0 = { /* bridge */ NULL }; -#if !defined(__OpenBSD__) && !defined(__FreeBSD__) +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) #if X_BYTE_ORDER == X_BIG_ENDIAN #ifdef __sparc__ #ifndef ASI_PL diff --git a/xserver/hw/xfree86/xaa/xaaGC.c b/xserver/hw/xfree86/xaa/xaaGC.c index e22081103..b3dc83ada 100644 --- a/xserver/hw/xfree86/xaa/xaaGC.c +++ b/xserver/hw/xfree86/xaa/xaaGC.c @@ -38,7 +38,7 @@ Bool XAACreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; - XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGCIndex].ptr); + XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr); Bool ret; XAA_SCREEN_PROLOGUE(pScreen,CreateGC); @@ -80,10 +80,11 @@ XAAValidateGC( } if(pGC->depth != 32) { - if(pGC->bgPixel == -1) /* -1 is reserved for transparency */ - pGC->bgPixel = 0x7fffffff; - if(pGC->fgPixel == -1) /* -1 is reserved for transparency */ - pGC->fgPixel = 0x7fffffff; + /* 0xffffffff is reserved for transparency */ + if(pGC->bgPixel == 0xffffffff) + pGC->bgPixel = 0x7fffffff; + if(pGC->fgPixel == 0xffffffff) + pGC->fgPixel = 0x7fffffff; } if((pDraw->type == DRAWABLE_PIXMAP) && !IS_OFFSCREEN_PIXMAP(pDraw)){ |