From 67b353c9ce039b254ba2e92cd6f842c505a8bd21 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 24 Sep 2009 10:49:08 +0000 Subject: Update following packages: - xproto-7.0.16 - libXdmcp-1.0.3 - bdftopcf-1.0.2 - xorg-server-1.6.99.902 --- xorg-server/hw/xfree86/common/xf86AutoConfig.c | 4 +- xorg-server/hw/xfree86/common/xf86Bus.c | 19 +---- xorg-server/hw/xfree86/common/xf86Config.c | 45 +++++----- xorg-server/hw/xfree86/common/xf86DGA.c | 2 +- xorg-server/hw/xfree86/common/xf86Helper.c | 2 +- xorg-server/hw/xfree86/common/xf86Init.c | 4 +- xorg-server/hw/xfree86/common/xf86Privstr.h | 2 + xorg-server/hw/xfree86/common/xf86VGAarbiter.c | 109 +++++++++++++++---------- xorg-server/hw/xfree86/common/xf86VGAarbiter.h | 2 +- xorg-server/hw/xfree86/common/xf86Xinput.c | 21 +---- xorg-server/hw/xfree86/common/xf86pciBus.c | 3 +- 11 files changed, 106 insertions(+), 107 deletions(-) (limited to 'xorg-server/hw/xfree86/common') diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c index 5667e1a87..a6199b0e8 100644 --- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c +++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c @@ -159,13 +159,13 @@ videoPtrToDriverList(struct pci_device *dev, /* older Geode products acquired by AMD still carry an NSC vendor_id */ case 0x100b: if (dev->device_id == 0x0030) { - /* NSC Geode GX2 specifically ... */ + /* NSC Geode GX2 specifically */ driverList[0] = "geode"; /* GX2 support started its life in the NSC tree and was later forked by AMD for GEODE so we keep it as a backup */ driverList[1] = "nsc"; } else - /* ... any other NSC Geode SC variant e.g. 0x0504 for SCx200 */ + /* other NSC variant e.g. 0x0104 (SC1400), 0x0504 (SCx200) */ driverList[0] = "nsc"; break; /* Cyrix Geode GX1 */ diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c index f0a0723f9..9d243c172 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.c +++ b/xorg-server/hw/xfree86/common/xf86Bus.c @@ -521,30 +521,15 @@ xf86PostProbe(void) void xf86PostScreenInit(void) { -#ifdef HAVE_PCI_DEVICE_VGAARB_INIT - int vga_count; -#endif if (doFramebufferMode) { SetSIGIOForState(OPERATING); return; } - /* - * we need to wrap the arbiter if we have more than - * one VGA card - hotplug cries. - */ -#ifdef HAVE_PCI_DEVICE_VGAARB_INIT - pci_device_vgaarb_get_info(NULL, &vga_count, NULL); - if (vga_count > 1 && xf86Screens) { - int i; - xf86Msg(X_INFO,"Number of VGA devices: %d: arbiter wrapping enabled\n", vga_count); - for (i = 0; i < xf86NumScreens; i++) - xf86VGAarbiterWrapFunctions(xf86Screens[i]->pScreen); - } -#endif + xf86VGAarbiterWrapFunctions(); + DebugF("PostScreenInit generation: %i\n",serverGeneration); xf86EnterServerState(OPERATING); - } /* diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index e81eb0f63..40f65bdbf 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -614,22 +614,6 @@ configFiles(XF86ConfFilesPtr fileconf) pathFrom = X_DEFAULT; temp_path = defaultFontPath ? defaultFontPath : ""; - /* ensure defaultFontPath contains "built-ins" */ - start = strstr(temp_path, "built-ins"); - end = start + strlen("built-ins"); - if (start == NULL || - !((start == temp_path || start[-1] == ',') && (!*end || *end == ','))) { - defaultFontPath = Xprintf("%s%sbuilt-ins", - temp_path, *temp_path ? "," : ""); - if (must_copy == TRUE) { - if (defaultFontPath != NULL) { - must_copy = FALSE; - } - } else { - /* already made a copy of the font path */ - xfree(temp_path); - } - } /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath; defaultFontPath = xf86ValidateFontPath(temp_path); @@ -724,8 +708,13 @@ typedef enum { FLAG_AUTO_ENABLE_DEVICES, FLAG_GLX_VISUALS, FLAG_DRI2, + FLAG_USE_SIGIO } FlagValues; - + +/** + * NOTE: the last value for each entry is NOT the default. It is set to TRUE + * if the parser found the option in the config file. + */ static OptionInfoRec FlagOptions[] = { { FLAG_NOTRAPSIGNALS, "NoTrapSignals", OPTV_BOOLEAN, {0}, FALSE }, @@ -774,13 +763,15 @@ static OptionInfoRec FlagOptions[] = { { FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_AUTO_ADD_DEVICES, "AutoAddDevices", OPTV_BOOLEAN, - {0}, TRUE }, + {0}, FALSE }, { FLAG_AUTO_ENABLE_DEVICES, "AutoEnableDevices", OPTV_BOOLEAN, - {0}, TRUE }, + {0}, FALSE }, { FLAG_GLX_VISUALS, "GlxVisuals", OPTV_STRING, {0}, FALSE }, { FLAG_DRI2, "DRI2", OPTV_BOOLEAN, {0}, FALSE }, + { FLAG_USE_SIGIO, "UseSIGIO", OPTV_BOOLEAN, + {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -848,6 +839,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Msg(X_CONFIG, "Ignoring ABI Version\n"); } + if (xf86SIGIOSupported()) { + xf86Info.useSIGIO = xf86ReturnOptValBool(FlagOptions, FLAG_USE_SIGIO, USE_SIGIO_BY_DEFAULT); + if (xf86IsOptionSet(FlagOptions, FLAG_USE_SIGIO)) { + from = X_CONFIG; + } else { + from = X_DEFAULT; + } + if (!xf86Info.useSIGIO) { + xf86Msg(from, "Disabling SIGIO handlers for input devices\n"); + } else if (from == X_CONFIG) { + xf86Msg(from, "Enabling SIGIO handlers for input devices\n"); + } + } else { + xf86Info.useSIGIO = FALSE; + } + if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES, &xf86Info.autoAddDevices); diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c index 8328f5875..42b7c5805 100644 --- a/xorg-server/hw/xfree86/common/xf86DGA.c +++ b/xorg-server/hw/xfree86/common/xf86DGA.c @@ -1193,7 +1193,7 @@ DGAGetOldDGAMode(int index) static void DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device) { - DGAEvent *event= (DGAEvent*)ev; + DGAEvent *event= &ev->dga_event; ScreenPtr pScreen = screenInfo.screens[screen_num]; DGAScreenPtr pScreenPriv; diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c index 9a2468dd3..56ab266ae 100644 --- a/xorg-server/hw/xfree86/common/xf86Helper.c +++ b/xorg-server/hw/xfree86/common/xf86Helper.c @@ -2312,7 +2312,7 @@ xf86SetSilkenMouse (ScreenPtr pScreen) * yet. Should handle this differently so that alternate async methods * work correctly with this too. */ - pScrn->silkenMouse = useSM && xf86SIGIOSupported(); + pScrn->silkenMouse = useSM && xf86Info.useSIGIO && xf86SIGIOSupported(); if (serverGeneration == 1) xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n", pScrn->silkenMouse ? "enabled" : "disabled"); diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c index 8f2cdf6aa..c9baff3ef 100644 --- a/xorg-server/hw/xfree86/common/xf86Init.c +++ b/xorg-server/hw/xfree86/common/xf86Init.c @@ -439,7 +439,7 @@ probe_devices_from_device_sections(DriverPtr drvp) } } } - + xfree(devList); return foundScreen; } @@ -1112,6 +1112,8 @@ InitInput(int argc, char **argv) mieqInit(); + GetEventList(&xf86Events); + /* Call the PreInit function for each input device instance. */ for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) { /* Replace obsolete keyboard driver with kbd */ diff --git a/xorg-server/hw/xfree86/common/xf86Privstr.h b/xorg-server/hw/xfree86/common/xf86Privstr.h index 26f822dc4..998260142 100644 --- a/xorg-server/hw/xfree86/common/xf86Privstr.h +++ b/xorg-server/hw/xfree86/common/xf86Privstr.h @@ -87,6 +87,8 @@ typedef struct { Bool miscModInDevEnabled; /* Allow input devices to be * changed */ Bool miscModInDevAllowNonLocal; + Bool useSIGIO; /* Use SIGIO for handling + input device events */ Pix24Flags pixmap24; MessageType pix24From; #ifdef __i386__ diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c index c38973933..b24099811 100644 --- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c @@ -35,6 +35,7 @@ #ifdef HAVE_PCI_DEVICE_VGAARB_INIT #include "xf86VGAarbiterPriv.h" #include "xf86Bus.h" +#include "xf86Priv.h" #include "pciaccess.h" #ifdef DEBUG @@ -153,59 +154,79 @@ xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) } Bool -xf86VGAarbiterWrapFunctions(ScreenPtr pScreen) +xf86VGAarbiterWrapFunctions(void) { ScrnInfoPtr pScrn; VGAarbiterScreenPtr pScreenPriv; miPointerScreenPtr PointPriv; #ifdef RENDER - PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); + PictureScreenPtr ps; #endif + ScreenPtr pScreen; + int vga_count, i; if (vga_no_arb) - return FALSE; - - pScrn = xf86Screens[pScreen->myNum]; - PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); - - DPRINT_S("VGAarbiterWrapFunctions",pScreen->myNum); - - if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec))) - return FALSE; - - if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec)))) - return FALSE; - - dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv); - - WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen); - WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen); - WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler); - WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler); - WRAP_SCREEN(CreateGC, VGAarbiterCreateGC); - WRAP_SCREEN(GetImage, VGAarbiterGetImage); - WRAP_SCREEN(GetSpans, VGAarbiterGetSpans); - WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate); - WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow); - WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground); - WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap); - WRAP_SCREEN(StoreColors, VGAarbiterStoreColors); - WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor); - WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor); - WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor); - WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor); - WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition); + return FALSE; + + /* + * we need to wrap the arbiter if we have more than + * one VGA card - hotplug cries. + */ + pci_device_vgaarb_get_info(NULL, &vga_count, NULL); + if (vga_count < 2 || !xf86Screens) + return FALSE; + + xf86Msg(X_INFO,"Found %d VGA devices: arbiter wrapping enabled\n", + vga_count); + + for (i = 0; i < xf86NumScreens; i++) { + pScreen = xf86Screens[i]->pScreen; +#ifdef RENDER + ps = GetPictureScreenIfSet(pScreen); +#endif + pScrn = xf86Screens[pScreen->myNum]; + PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); + + DPRINT_S("VGAarbiterWrapFunctions",pScreen->myNum); + + if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec))) + return FALSE; + + if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec)))) + return FALSE; + + dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv); + + WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen); + WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen); + WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler); + WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler); + WRAP_SCREEN(CreateGC, VGAarbiterCreateGC); + WRAP_SCREEN(GetImage, VGAarbiterGetImage); + WRAP_SCREEN(GetSpans, VGAarbiterGetSpans); + WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate); + WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow); + WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground); + WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap); + WRAP_SCREEN(StoreColors, VGAarbiterStoreColors); + WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor); + WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor); + WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor); + WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor); + WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition); #ifdef RENDER - WRAP_PICT(Composite,VGAarbiterComposite); - WRAP_PICT(Glyphs,VGAarbiterGlyphs); - WRAP_PICT(CompositeRects,VGAarbiterCompositeRects); + WRAP_PICT(Composite,VGAarbiterComposite); + WRAP_PICT(Glyphs,VGAarbiterGlyphs); + WRAP_PICT(CompositeRects,VGAarbiterCompositeRects); #endif - WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame); - WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode); - WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT); - WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT); - WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen); - WRAP_SPRITE; + WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame); + WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode); + WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT); + WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT); + WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen); + WRAP_SPRITE; + } + return TRUE; } @@ -1152,6 +1173,6 @@ void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) {} Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) { return TRUE; } void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) {} void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) {} -Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen) { return FALSE; } +Bool xf86VGAarbiterWrapFunctions(void) { return FALSE; } #endif diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h index 145d31c78..904b6b079 100644 --- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h @@ -34,7 +34,7 @@ extern void xf86VGAarbiterInit(void); extern void xf86VGAarbiterFini(void); void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn); -extern Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen); +extern Bool xf86VGAarbiterWrapFunctions(void); extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn); extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn); diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index 3543811db..b36953700 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -283,11 +283,6 @@ xf86ProcessCommonOptions(LocalDevicePtr local, /* Backwards compatibility. */ local->history_size = GetMotionHistorySize(); - /* Preallocate xEvent store */ - if (!xf86Events) - GetEventList(&xf86Events); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); } /*********************************************************************** @@ -769,7 +764,6 @@ xf86PostMotionEventP(DeviceIntPtr device, } #endif - GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, MotionNotify, 0, flags, first_valuator, num_valuators, valuators); @@ -819,7 +813,6 @@ xf86PostProximityEventP(DeviceIntPtr device, XI_VERIFY_VALUATORS(num_valuators); - GetEventList(&xf86Events); nevents = GetProximityEvents(xf86Events, device, is_in ? ProximityIn : ProximityOut, first_valuator, num_valuators, valuators); @@ -881,7 +874,6 @@ xf86PostButtonEventP(DeviceIntPtr device, } #endif - GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, is_down ? ButtonPress : ButtonRelease, button, flags, first_valuator, num_valuators, valuators); @@ -940,7 +932,6 @@ xf86PostKeyEventP(DeviceIntPtr device, XI_VERIFY_VALUATORS(num_valuators); if (is_absolute) { - GetEventList(&xf86Events); nevents = GetKeyboardValuatorEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, key_code, first_valuator, @@ -1074,22 +1065,12 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) void xf86DisableDevice(DeviceIntPtr dev, Bool panic) { - devicePresenceNotify ev; - DeviceIntRec dummyDev; - if(!panic) { DisableDevice(dev, TRUE); } else { - ev.type = DevicePresenceNotify; - ev.time = currentTime.milliseconds; - ev.devchange = DeviceUnrecoverable; - ev.deviceid = dev->id; - dummyDev.id = 0; - SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, - (xEvent *) &ev, 1); - + SendDevicePresenceEvent(dev->id, DeviceUnrecoverable); DeleteInputDeviceRequest(dev); } } diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c index df62e0766..ac018e739 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.c +++ b/xorg-server/hw/xfree86/common/xf86pciBus.c @@ -124,7 +124,7 @@ xf86PciProbe(void) info->user_data = 0; } } - + free(iter); /* If we haven't found a primary device try a different heuristic */ if (primaryBus.type == BUS_NONE && num) { @@ -212,6 +212,7 @@ xf86PciProbe(void) xf86ErrorF("\n"); } + xfree(xf86PciVideoInfo); } /* -- cgit v1.2.3