diff -u XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile Sun Dec 19 01:15:44 2004 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile Tue Apr 19 16:59:06 2005 @@ -25,6 +25,7 @@ SNPRINTFOBJS = snprintf.o #endif +#if HasDlopen SRCS =\ accessx.c\ card-cfg.c\ @@ -46,8 +47,34 @@ stubs.c\ $(TEXTSRC)\ vidmode.c\ + xf86config.c\ + dummy.c +#else +SRCS =\ + accessx.c\ + card-cfg.c\ + cards.c\ + config.c\ + expert.c\ + help.c\ + interface.c\ + keyboard-cfg.c\ + $(LDSRCS) \ + monitor-cfg.c\ + mouse-cfg.c\ + options.c\ + screen-cfg.c\ + screen.c\ + $(SNPRINTFSRCS)\ + startx.c\ + $(STRLSRCS)\ + stubs.c\ + $(TEXTSRC)\ + vidmode.c\ xf86config.c +#endif +#if HasDlopen OBJS =\ accessx.o\ cards.o\ @@ -69,10 +96,40 @@ stubs.o\ $(TEXTOBJ)\ vidmode.o\ + xf86config.o\ + dummy.o +#else +OBJS =\ + accessx.o\ + cards.o\ + config.o\ + card-cfg.o\ + expert.o\ + help.o\ + interface.o\ + keyboard-cfg.o\ + $(LDOBJS) \ + monitor-cfg.o\ + mouse-cfg.o\ + options.o\ + screen-cfg.o\ + screen.o\ + $(SNPRINTFOBJS)\ + startx.o\ + $(STRLOBJS)\ + stubs.o\ + $(TEXTOBJ)\ + vidmode.o\ xf86config.o +#endif PROG = xorgcfg +#if HasDlopen +DUMMYGENSRC = dummygen.c +DUMMYGENTOOL = dummygen +#endif + XBMPICS =\ card.xbm\ keyboard.xbm\ @@ -94,6 +151,14 @@ monitor.xpm\ mouse.xpm +#if HasDlopen +dummy.c :: $(DUMMYGENTOOL) $(DUMMYGENSRC) + ./$(DUMMYGENTOOL) + +clean:: + RemoveFiles($(DUMMYGENTOOL) dummy.c) +#endif + AllTarget(ProgramTargetName($(PROG))) #if DoLoadableServer diff -u XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/XOrgCfg.cpp sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/XOrgCfg.cpp --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/XOrgCfg.cpp Sun Dec 19 01:15:44 2004 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/XOrgCfg.cpp Mon Jun 13 17:21:28 2005 @@ -26,7 +26,7 @@ !! !! Author: Paulo César Pereira de Andrade !! -!! $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad,v 1.13 2001/05/15 18:22:23 paulo Exp $ +!! $XFree86: xc/programs/Xserver/hw/xfree86/xorgcfg/XF86Cfg.ad,v 1.13 2001/05/15 18:22:23 paulo Exp $ !! *Form.background: gray85 @@ -108,17 +108,17 @@ *Viewport.allowVert: True *Viewport.useRight: True -.xf86cfg.geometry: 320x400 -.xf86cfg.minWidth: 320 -.xf86cfg.minHeight: 400 -.xf86cfg.maxWidth: 320 -.xf86cfg.maxHeight: 400 +.xorgcfg.geometry: 396x454 +.xorgcfg.minWidth: 396 +.xorgcfg.minHeight: 454 +.xorgcfg.maxWidth: 396 +.xorgcfg.maxHeight: 454 -.xf86cfg.config.geometry: 320x369 -.xf86cfg.config.minWidth: 320 -.xf86cfg.config.maxWidth: 320 -.xf86cfg.config.minHeight: 369 -.xf86cfg.config.maxHeight: 369 +.xorgcfg.config.geometry: 370x400 +.xorgcfg.config.minWidth: 370 +.xorgcfg.config.maxWidth: 370 +.xorgcfg.config.minHeight: 400 +.xorgcfg.config.maxHeight: 400 *work.width: 320 *work.height: 240 @@ -268,9 +268,9 @@ Return: rename-layout() *bottom.layout.label: New server layout *bottom.layout.tip: Type a text and press Return to rename this layout -*bottom.Command.height: 19 -*bottom.Text.height: 19 -*bottom.MenuButton.height: 19 +*bottom.Command.height: 25 +*bottom.Text.height: 25 +*bottom.MenuButton.height: 25 *bottom*new.label: New server layout *layout.fromHoriz: select *help.fromHoriz: layout @@ -306,10 +306,10 @@ *mouseDP.labelD.label: Select mouse device *mouseDP.device.fromVert: labelD *mouseDP.viewportD.fromVert: device -*mouseDP.device.width: 302 +*mouseDP.device.width: 332 *mouseDP.viewportD.vertDistance: 2 *mouseDP.viewportD.listD.longest: 135 -*mouseDP.viewportD.width: 302 +*mouseDP.viewportD.width: 330 *mouseDP.viewportD.height: 87 *mouseDP.labelP.label: Select mouse protocol *mouseDP.labelP.vertDistance: 10 @@ -318,8 +318,8 @@ *mouseDP.viewportP.forceBars: True *mouseDP.viewportP.allowVert: True *mouseDP.viewportP.useRight: True -*mouseDP.viewportP.listP.longest: 135 -*mouseDP.viewportP.width: 302 +*mouseDP.viewportP.listP.longest: 172 +*mouseDP.viewportP.width: 330 *mouseDP.viewportP.height: 110 *mouseDP.viewportP.vertDistance: 6 *mouseDP*List.verticalList: True @@ -389,9 +389,9 @@ *cardModel.viewport.vertDistance: 2 *cardModel.viewport.fromVert: filter *cardModel.filter.fromHoriz: label -*cardModel.filter.width: 171 -*cardModel.viewport.width: 302 -*cardModel.viewport.height: 212 +*cardModel.filter.width: 90 +*cardModel.viewport.width: 340 +*cardModel.viewport.height: 218 *cardModel.driver.justify: left *cardModel.driverL.label: Driver *cardModel.driverL.fromVert: viewport @@ -414,7 +414,7 @@ *cardModel.viewport.forceBars: True *cardModel.viewport.allowVert: True *cardModel.viewport.useRight: True -*cardModel.viewport.list.longest: 277 +*cardModel.viewport.list.longest: 350 *cardModel.filter.tip: Type name or vendor of your card and press enter *cardModel.filter.translations: #override \ Return: filter-card() @@ -442,8 +442,8 @@ *work.monitor.width: 47 *work.monitor.height: 40 -.xf86cfg.pane.work.Simple.borderWidth: 1 -.xf86cfg.pane.work.Simple.translations:\ +.xorgcfg.pane.work.Simple.borderWidth: 1 +.xorgcfg.pane.work.Simple.translations:\ Any: select-device()\n\ Any: move-device()\n\ Any: unselect-device()\n\ @@ -450,7 +450,7 @@ Any: device-popup()\n\ Any: device-popdown() -.xf86cfg.pane.work.screen.translations:\ +.xorgcfg.pane.work.screen.translations:\ Any: select-device()\n\ Any: move-device()\n\ Any: unselect-device()\n\ @@ -459,25 +459,25 @@ XF86Cfg.translations: #override \ WM_PROTOCOLS: quit() -.xf86cfg.config.translations: #override \ +.xorgcfg.config.translations: #override \ WM_PROTOCOLS: config-cancel() -.xf86cfg.options.translations: #override \ +.xorgcfg.options.translations: #override \ WM_PROTOCOLS: options-cancel() -.xf86cfg.quit.translations: #override \ +.xorgcfg.quit.translations: #override \ WM_PROTOCOLS: quit-cancel() -.xf86cfg.error.translations: #override \ +.xorgcfg.error.translations: #override \ WM_PROTOCOLS: error-cancel() -.xf86cfg.force.translations: #override \ +.xorgcfg.force.translations: #override \ WM_PROTOCOLS: addmode-cancel() -.xf86cfg.addMode.translations: #override \ +.xorgcfg.addMode.translations: #override \ WM_PROTOCOLS: addmode-cancel() -.xf86cfg.accessx.translations: #override \ +.xorgcfg.accessx.translations: #override \ WM_PROTOCOLS: accessx-close() -.xf86cfg.test.translations: #override \ +.xorgcfg.test.translations: #override \ WM_PROTOCOLS: testmode-cancel() -.xf86cfg.Expert.translations: #override \ +.xorgcfg.Expert.translations: #override \ WM_PROTOCOLS: expert-close() -.xf86cfg.options.moduleOptions.translations: #override \ +.xorgcfg.options.moduleOptions.translations: #override \ WM_PROTOCOLS: module-options-close() @@ -484,11 +484,11 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Options !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.xf86cfg.options.geometry: 400x176 -.xf86cfg.options.minWidth: 400 -.xf86cfg.options.maxWidth: 400 -.xf86cfg.options.minHeight: 176 -.xf86cfg.options.maxHeight: 176 +.xorgcfg.options.geometry: 400x176 +.xorgcfg.options.minWidth: 400 +.xorgcfg.options.maxWidth: 400 +.xorgcfg.options.minHeight: 176 +.xorgcfg.options.maxHeight: 176 *options*commands.remove.fromHoriz: add *options*commands.update.fromHoriz: remove @@ -535,11 +535,11 @@ o option name\n\ o option type -.xf86cfg*options.moduleOptions.geometry: 360x245 -.xf86cfg*options.moduleOptions.minWidth: 360 -.xf86cfg*options.moduleOptions.maxWidth: 360 -.xf86cfg*options.moduleOptions.minHeight: 245 -.xf86cfg*options.moduleOptions.maxHeight: 245 +.xorgcfg*options.moduleOptions.geometry: 360x245 +.xorgcfg*options.moduleOptions.minWidth: 360 +.xorgcfg*options.moduleOptions.maxWidth: 360 +.xorgcfg*options.moduleOptions.minHeight: 245 +.xorgcfg*options.moduleOptions.maxHeight: 245 *options.moduleOptions*descriptions*labelType.label: Select option *options.moduleOptions*descriptions*labelType.width: 348 *options.moduleOptions*descriptions*module.fromVert: labelType @@ -572,22 +572,23 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! monitor !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -*monitorl*Viewport.width: 302 -*monitorl*Text.width: 160 +*monitorl*Viewport.width: 320 +*monitorl*Text.width: 200 *monitorl*Text.tip:\ Select standard value from the list\n\ below, or enter specific value here. -*monitorl*hlabel.justify: right -*monitorl*hlabel.width: 138 +*monitorl*hlabel.justify: left +*monitorl*hlabel.width: 134 *monitorl*hlabel.label: Horizontal sync *monitorl*hsync.fromHoriz: hlabel *monitorl*hviewport.fromVert: hsync +*monitorl*hviewport.width: 354 *monitorl*hviewport.height: 156 -*monitorl*hlist.longest: 288 +*monitorl*hlist.longest: 386 -*monitorl*vlabel.justify: right -*monitorl*vlabel.width: 138 +*monitorl*vlabel.justify: left +*monitorl*vlabel.width: 134 *monitorl*vlabel.vertDistance: 12 *monitorl*vsync.vertDistance: 12 *monitorl*vlabel.fromVert: hviewport @@ -595,8 +596,9 @@ *monitorl*vlabel.label: Vertical sync *monitorl*vsync.fromHoriz: vlabel *monitorl*vviewport.fromVert: vsync +*monitorl*vviewport.width: 354 *monitorl*vviewport.height: 20 -*monitorl*vlist.longest: 64 +*monitorl*vlist.longest: 80 *monitorl*clabel.vertDistance: 12 *monitorl*clabel.fromVert: vviewport @@ -640,7 +642,7 @@ *vidtune.taller.bitmap: taller.xbm *vidtune.vesaB.label: Add standard VESA mode to current screen -*vidtune.vesaB.width: 312 +*vidtune.vesaB.width: 384 *vidtune.screenB.fromVert: mode *vidtune.screenB.width: 160 @@ -809,34 +811,34 @@ *vidtune.text.horizDistance: 0 *vidtune.text.fromVert: form *vidtune.text.fromHoriz: as -*vidtune.text.width: 98 +*vidtune.text.width: 136 *vidtune.add.vertDistance: 4 *vidtune.add.fromVert: form *vidtune.add.label: Add -.xf86cfg.force.geometry: 268x58 -.xf86cfg.force.minWidth: 268 -.xf86cfg.force.maxWidth: 268 -.xf86cfg.force.minHeight: 58 -.xf86cfg.force.maxHeight: 58 -.xf86cfg.force.?.label: There is already a modeline with the\n\ +.xorgcfg.force.geometry: 308x58 +.xorgcfg.force.minWidth: 308 +.xorgcfg.force.maxWidth: 308 +.xorgcfg.force.minHeight: 58 +.xorgcfg.force.maxHeight: 58 +.xorgcfg.force.?.label: There is already a modeline with the\n\ specified identifier. Add anyway? -.xf86cfg.addMode.geometry: 350x80 -.xf86cfg.addMode.minWidth: 350 -.xf86cfg.addMode.maxWidth: 350 -.xf86cfg.addMode.minHeight: 80 -.xf86cfg.addMode.maxHeight: 80 -.xf86cfg.addMode.?.label: XF86VidModeAddModeLine returned True,\n\ +.xorgcfg.addMode.geometry: 460x80 +.xorgcfg.addMode.minWidth: 460 +.xorgcfg.addMode.maxWidth: 460 +.xorgcfg.addMode.minHeight: 80 +.xorgcfg.addMode.maxHeight: 80 +.xorgcfg.addMode.?.label: XF86VidModeAddModeLine returned True,\n\ but no modeline was added to the current Screen.\n\ Do you want to add it to the Monitor section? -.xf86cfg.test.?.label: \ Testing modeline...\n\n\ +.xorgcfg.test.?.label: \ Testing modeline...\n\n\ Press ESC or stop button to quit. -.xf86cfg.test.geometry: 250x72 -.xf86cfg.test.minWidth: 250 -.xf86cfg.test.maxWidth: 250 -.xf86cfg.test.minHeight: 72 -.xf86cfg.test.maxHeight: 72 +.xorgcfg.test.geometry: 308x72 +.xorgcfg.test.minWidth: 308 +.xorgcfg.test.maxWidth: 308 +.xorgcfg.test.minHeight: 72 +.xorgcfg.test.maxHeight: 72 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! screen @@ -876,10 +878,10 @@ *screenD*unselect.bitmap: left.xbm *screenD*up.bitmap: up.xbm *screenD*down.bitmap: down.xbm -*screenD*viewL.width: 133 -*screenD*viewR.width: 133 -*screenD*viewL.height: 184 -*screenD*viewR.height: 184 +*screenD*viewL.width: 155 +*screenD*viewR.width: 155 +*screenD*viewL.height: 188 +*screenD*viewR.height: 188 *screenD*listLeft.longest: 128 *screenD*listRight.longest: 128 *screenD*rotate.tip: Don't select any option if\n\ @@ -909,20 +911,20 @@ *quit.ask.value.translations: #override \ Return: write-config() *quit.ask.label.justify: left -*quit.ask.value.width: 222 +*quit.ask.value.width: 250 *quit.ask.icon: Excl -.xf86cfg.quit.geometry: 230x92 -.xf86cfg.quit.minWidth: 230 -.xf86cfg.quit.maxWidth: 230 -.xf86cfg.quit.minHeight: 92 -.xf86cfg.quit.maxHeight: 92 +.xorgcfg.quit.geometry: 280x100 +.xorgcfg.quit.minWidth: 280 +.xorgcfg.quit.maxWidth: 280 +.xorgcfg.quit.minHeight: 100 +.xorgcfg.quit.maxHeight: 100 *error.notice.label: Failed to write configuration file. -.xf86cfg.error.geometry: 280x50 -.xf86cfg.error.minWidth: 260 -.xf86cfg.error.maxWidth: 260 -.xf86cfg.error.minHeight: 50 -.xf86cfg.error.maxHeight: 50 +.xorgcfg.error.geometry: 280x50 +.xorgcfg.error.minWidth: 260 +.xorgcfg.error.maxWidth: 260 +.xorgcfg.error.minHeight: 50 +.xorgcfg.error.maxHeight: 50 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! accessx @@ -1354,12 +1356,12 @@ *help*commands.showGrip:False *help*wrap: word *help*commands.close.label: Close -.xf86cfg.help.geometry: 320x369 -.xf86cfg.help.minWidth: 320 -.xf86cfg.help.maxWidth: 320 -.xf86cfg.help.minHeight: 369 -.xf86cfg.help.maxHeight: 369 -.xf86cfg.help.translations: #override \ +.xorgcfg.help.geometry: 320x369 +.xorgcfg.help.minWidth: 320 +.xorgcfg.help.maxWidth: 320 +.xorgcfg.help.minHeight: 369 +.xorgcfg.help.maxHeight: 369 +.xorgcfg.help.translations: #override \ WM_PROTOCOLS: help-close() *help*text.translations:\ Up: scroll-one-line-down()\n\ diff -u XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/loader.c sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/loader.c --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/loader.c Sun Dec 19 01:15:44 2004 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/loader.c Fri May 6 18:13:20 2005 @@ -254,6 +254,7 @@ InitializePciInfo(); } + for (i = 0; module_types[i] != NullModule; i++) { xf86cfgLoaderInitList(module_types[i]); if (!noverify) @@ -275,7 +276,7 @@ nfont_modules = numFontModules; error_level = 0; ErrorF("CHECK MODULE %s\n", *ploaderList); - if ((ok = xf86cfgCheckModule()) == 0) { + if ((ok = xf86cfgCheckModule(module_types[i])) == 0) { CheckMsg(CHECKER_LOAD_FAILED, "ERROR Failed to load module.\n"); error_level += 50; @@ -373,7 +374,7 @@ ErrorF(" SUMMARY error_level set to %d.\n\n", error_level); } else - (void)xf86cfgCheckModule(); + (void)xf86cfgCheckModule(module_types[i]); } signal(SIGTRAP, SIG_DFL); signal(SIGBUS, SIG_DFL); diff -u XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/loader.h sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/loader.h --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/loader.h Mon Dec 20 19:54:07 2004 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/loader.h Fri May 6 18:13:20 2005 @@ -62,7 +62,6 @@ void xf86cfgLoaderInit(void); void xf86cfgLoaderInitList(int); void xf86cfgLoaderFreeList(void); -int xf86cfgCheckModule(void); #ifndef LOADER_PRIVATE /* common/xf86Opt.h */ @@ -128,6 +127,8 @@ FontRendererModule } ModuleType; +int xf86cfgCheckModule(ModuleType); + typedef struct _xf86cfgModuleOptions { char *name; ModuleType type; diff -u XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/loadmod.c sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/loadmod.c --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/loadmod.c Sun Dec 19 01:15:44 2004 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/loadmod.c Fri May 6 18:13:20 2005 @@ -42,6 +42,7 @@ #define LOADER_PRIVATE #include "loader.h" +#include "xf86PciInfo.h" #define True 1 #define False 0 @@ -323,6 +324,51 @@ {0,0} }; +static SymTabRec ATIChipsets[] = { + { PCI_CHIP_MACH64CT, "Mach 64 CT" }, + { PCI_CHIP_MACH64CX, "Mach 64 CX" }, + { PCI_CHIP_MACH64ET, "Mach 64 ET" }, + { PCI_CHIP_MACH64GB, "Mach 64 GB" }, + { PCI_CHIP_MACH64GD, "Mach 64 GD" }, + { PCI_CHIP_MACH64GI, "Mach 64 GI" }, + { PCI_CHIP_MACH64GL, "Mach 64 GL" }, + { PCI_CHIP_MACH64GM, "Mach 64 GM" }, + { PCI_CHIP_MACH64GN, "Mach 64 GN" }, + { PCI_CHIP_MACH64GO, "Mach 64 GO" }, + { PCI_CHIP_MACH64GP, "Mach 64 GP" }, + { PCI_CHIP_MACH64GQ, "Mach 64 GQ" }, + { PCI_CHIP_MACH64GR, "Mach 64 GR" }, + { PCI_CHIP_MACH64GS, "Mach 64 GS" }, + { PCI_CHIP_MACH64GT, "Mach 64 GT" }, + { PCI_CHIP_MACH64GU, "Mach 64 GU" }, + { PCI_CHIP_MACH64GV, "Mach 64 GV" }, + { PCI_CHIP_MACH64GW, "Mach 64 GW" }, + { PCI_CHIP_MACH64GX, "Mach 64 GX" }, + { PCI_CHIP_MACH64GY, "Mach 64 GY" }, + { PCI_CHIP_MACH64GZ, "Mach 64 GZ" }, + { PCI_CHIP_MACH64LB, "Mach 64 LB" }, + { PCI_CHIP_MACH64LD, "Mach 64 LD" }, + { PCI_CHIP_MACH64LG, "Mach 64 LG" }, + { PCI_CHIP_MACH64LI, "Mach 64 LI" }, + { PCI_CHIP_MACH64LM, "Mach 64 LM" }, + { PCI_CHIP_MACH64LN, "Mach 64 LN" }, + { PCI_CHIP_MACH64LP, "Mach 64 LP" }, + { PCI_CHIP_MACH64LQ, "Mach 64 LQ" }, + { PCI_CHIP_MACH64LR, "Mach 64 LR" }, + { PCI_CHIP_MACH64LS, "Mach 64 LS" }, + { PCI_CHIP_MACH64VT, "Mach 64 VT" }, + { PCI_CHIP_MACH64VU, "Mach 64 VU" }, + { PCI_CHIP_MACH64VV, "Mach 64 VV" }, + { PCI_CHIP_R200_QI, "R200 QI" }, + { PCI_CHIP_R200_QJ, "R200 QJ" }, + { PCI_CHIP_R200_QK, "R200 QK" }, + { PCI_CHIP_RS300_5836, "R300 5836" }, + { PCI_CHIP_RS300_5837, "R300 5837" }, + { PCI_CHIP_RV250_Le, "RV250 Le" }, + { PCI_CHIP_RV250_Ln, "RV250 Ln" }, + {-1, NULL} +}; + static DriverPtr driver; static ModuleInfoPtr info; static SymTabPtr chips; @@ -336,6 +382,7 @@ const OptionInfoRec *tmp; SymTabPtr ctmp; int count; + SymTabRec *symptr; /* XXX If the module is already in the list, then it means that * it is now being properly loaded by xf86cfg and the "fake" entry @@ -365,6 +412,13 @@ } else ptr->option = NULL; + + /* Exception handling: ati driver does not call xf86MatchPciInstances(), + below is workaround */ + if ((vendor == -1 || !chips) && (!strcmp(name, "ati"))) { + vendor = PCI_VENDOR_ATI; + chips = ATIChipsets; + } if (vendor != -1 && chips) { ptr->vendor = vendor; for (count = 0, ctmp = chips; ctmp->name; ctmp++, count++) @@ -437,6 +491,9 @@ /* XXX Xf86cfg isn't able to provide enough wrapper functions * to these drivers. Maybe the drivers could also be changed * to work better when being loaded "just for testing" */ + /* Workaround for ati is in place, and vmware no longer causes problem, + * do not need to do the following to make ati/vmware duplicate */ + /* if (type == VideoModule) { module_type = VideoModule; AddModuleOptions("vmware", NULL); @@ -443,6 +500,7 @@ AddModuleOptions("ati", NULL); module_type = NullModule; } + */ } void @@ -452,12 +510,16 @@ } int -xf86cfgCheckModule(void) +xf86cfgCheckModule(ModuleType modtype) { int errmaj, errmin; ModuleDescPtr module; int nfonts; FontModule *fonts, *pfont_module; + char name[64]; + int i = 0; + void (*Identify)(); + Bool (*Probe)(); driver = NULL; chips = NULL; @@ -473,14 +535,35 @@ } else if (driver && driver->AvailableOptions) { /* at least fbdev does not call xf86MatchPciInstances in Probe */ + /* ati driver is known to fail in probing, but we still need to + load it because it loads r128 and radeon symbles */ + if (!strcmp(*ploaderList, "ati")) + AddModuleOptions(*ploaderList, NULL); if (driver->Identify) - (*driver->Identify)(-1); + (*driver->Identify)(-1); if (driver->Probe) - (*driver->Probe)(driver, PROBE_DETECT); + (*driver->Probe)(driver, PROBE_DETECT); AddModuleOptions(*ploaderList, (*driver->AvailableOptions)(-1, -1)); } else if (info && info->AvailableOptions) AddModuleOptions(*ploaderList, (*info->AvailableOptions)(NULL)); + /* Exception handling: some video drivers (radeon, r128) do not call + xf86AddDriver(), therefore driver is NULL. Below is workaround */ + else if (!driver && (modtype == VideoModule)) { + for (i = 0; i < strlen(ploaderList[0]); i++) + name[i] = (char) toupper(ploaderList[0][i]); + name[i] = '\0'; + driver = (DriverPtr) LoaderSymbol(name); + strncpy(&name[i], "Identify", strlen("Identify") + 1); + Identify = (void (*) ()) LoaderSymbol(name); + if (Identify) + (*Identify)(-1); + strncpy(&name[i], "Probe", strlen("Probe") + 1); + Probe = (Bool (*) ()) LoaderSymbol(name); + if (Probe) + (*Probe)(driver, PROBE_DETECT); + AddModuleOptions(*ploaderList, NULL); + } if (!noverify) { XF86ModuleData *initdata = NULL; diff -u XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c Sun Dec 19 01:15:44 2004 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c Tue Apr 19 16:59:06 2005 @@ -59,20 +59,20 @@ * Initialization */ static char *hmodes[] = { - "Standard VGA, 640x480 @ 60 Hz", - "Super VGA, 800x600 @ 56 Hz", - "1024x768 @ 87 Hz int. (no 800x600)", - "1024x768 @ 87 Hz int., 800x600 @ 56 Hz", - "800x600 @ 60 Hz, 640x480 @ 72 Hz", - "1024x768 @ 60 Hz, 800x600 @ 72 Hz", - "High Frequency SVGA, 1024x768 @ 70 Hz", - "Monitor that can do 1280x1024 @ 60 Hz", - "Monitor that can do 1280x1024 @ 74 Hz", - "Monitor that can do 1280x1024 @ 76 Hz", - "Monitor that can do 1280x1024 @ 85 Hz", - "Monitor that can do 1600x1200 @ 85 Hz", - "Monitor that can do 1920x1440 @ 85 Hz", - "Monitor that can do 2048x1536 @ 85 Hz" + "Standard VGA, 640x480 @60 Hz", + "Super VGA, 800x600 @56 Hz", + "1024x768 @87 Hz int. (no 800x600)", + "1024x768 @87 Hz int., 800x600 @56 Hz", + "800x600 @60 Hz, 640x480 @72 Hz", + "1024x768 @60 Hz, 800x600 @72 Hz", + "High Frequency SVGA, 1024x768 @70 Hz", + "Monitor that can do 1280x1024 @60 Hz", + "Monitor that can do 1280x1024 @74 Hz", + "Monitor that can do 1280x1024 @76 Hz", + "Monitor that can do 1280x1024 @85 Hz", + "Monitor that can do 1600x1200 @85 Hz", + "Monitor that can do 1920x1440 @85 Hz", + "Monitor that can do 2048x1536 @85 Hz" }; static char *hmodes_trans[] = { @@ -382,25 +382,25 @@ XtCreateManagedWidget("hlabel", labelWidgetClass, layout, NULL, 0); hsync = XtVaCreateManagedWidget("hsync", asciiTextWidgetClass, layout, XtNeditType, XawtextEdit, - NULL, 0); + NULL); viewport = XtCreateManagedWidget("hviewport", viewportWidgetClass, layout, NULL, 0); hlist = XtVaCreateManagedWidget("hlist", listWidgetClass, viewport, XtNlist, hmodes, XtNnumberStrings, sizeof(hmodes) / - sizeof(hmodes[0]), NULL, 0); + sizeof(hmodes[0]), NULL); XtAddCallback(hlist, XtNcallback, MonitorHsyncCallback, NULL); XtCreateManagedWidget("vlabel", labelWidgetClass, layout, NULL, 0); vsync = XtVaCreateManagedWidget("vsync", asciiTextWidgetClass, layout, XtNeditType, XawtextEdit, - NULL, 0); + NULL); viewport = XtCreateManagedWidget("vviewport", viewportWidgetClass, layout, NULL, 0); vlist = XtVaCreateManagedWidget("vlist", listWidgetClass, viewport, XtNlist, vmodes, XtNnumberStrings, sizeof(vmodes) / - sizeof(vmodes[0]), NULL, 0); + sizeof(vmodes[0]), NULL); XtAddCallback(vlist, XtNcallback, MonitorVsyncCallback, NULL); XtCreateManagedWidget("clabel", labelWidgetClass, layout, NULL, 0); @@ -424,7 +424,7 @@ XtSetValues(cmenu, args, 1); ++men; sme = XtVaCreateManagedWidget("none", smeBSBObjectClass, menu, - NULL, 0); + NULL); XtAddCallback(sme, XtNcallback, MonitorSelectCardCallback, NULL); while (device != NULL) { diff -u XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c Sun Dec 19 01:15:44 2004 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c Tue Apr 19 16:59:06 2005 @@ -74,6 +74,7 @@ "512x384", "1400x1050", "2048x1536", + "1920x1200", "1920x1440", }; @@ -444,16 +445,16 @@ d1 = XtCreateManagedWidget("1", toggleWidgetClass, dialog, NULL, 0); XtAddCallback(d1, XtNcallback, DepthCallback, (XtPointer)1); d4 = XtVaCreateManagedWidget("4", toggleWidgetClass, dialog, - XtNradioGroup, d1, NULL, 0); + XtNradioGroup, d1, NULL); XtAddCallback(d4, XtNcallback, DepthCallback, (XtPointer)4); d8 = XtVaCreateManagedWidget("8", toggleWidgetClass, dialog, - XtNradioGroup, d4, NULL, 0); + XtNradioGroup, d4, NULL); XtAddCallback(d8, XtNcallback, DepthCallback, (XtPointer)8); d16 = XtVaCreateManagedWidget("16", toggleWidgetClass, dialog, - XtNradioGroup, d8, NULL, 0); + XtNradioGroup, d8, NULL); XtAddCallback(d16, XtNcallback, DepthCallback, (XtPointer)16); d24 = XtVaCreateManagedWidget("24", toggleWidgetClass, dialog, - XtNradioGroup, d16, NULL, 0); + XtNradioGroup, d16, NULL); XtAddCallback(d24, XtNcallback, DepthCallback, (XtPointer)24); XtCreateManagedWidget("modeL", labelWidgetClass, dialog, NULL, 0); @@ -485,7 +486,7 @@ cw = XtCreateManagedWidget("CW", toggleWidgetClass, dialog, NULL, 0); XtAddCallback(cw, XtNcallback, RotateCallback, (XtPointer)CW); ccw = XtVaCreateManagedWidget("CCW", toggleWidgetClass, dialog, - XtNradioGroup, cw, NULL, 0); + XtNradioGroup, cw, NULL); XtAddCallback(ccw, XtNcallback, RotateCallback, (XtPointer)CCW); XtRealizeWidget(dialog); @@ -525,16 +526,16 @@ (void)labelRotate; #endif if (rotate == CW) { - XtVaSetValues(cw, XtNstate, True, NULL, 0); - XtVaSetValues(ccw, XtNstate, False, NULL, 0); + XtVaSetValues(cw, XtNstate, True, NULL); + XtVaSetValues(ccw, XtNstate, False, NULL); } else if (rotate == CCW) { - XtVaSetValues(cw, XtNstate, False, NULL, 0); - XtVaSetValues(ccw, XtNstate, True, NULL, 0); + XtVaSetValues(cw, XtNstate, False, NULL); + XtVaSetValues(ccw, XtNstate, True, NULL); } else { - XtVaSetValues(cw, XtNstate, False, NULL, 0); - XtVaSetValues(ccw, XtNstate, False, NULL, 0); + XtVaSetValues(cw, XtNstate, False, NULL); + XtVaSetValues(ccw, XtNstate, False, NULL); } XtSetArg(args[0], XtNlist, modes); diff -u XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c Sun Dec 19 01:15:44 2004 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c Tue Apr 19 16:59:06 2005 @@ -695,7 +695,7 @@ if (lefscr == NULL && rigscr == NULL && topscr == NULL && lefscr == NULL) { XF86ConfScreenPtr s; - if (adj->adj_where >= CONF_ADJ_RIGHTOF < adj->adj_where <= CONF_ADJ_BELOW) { + if (adj->adj_where >= CONF_ADJ_RIGHTOF && adj->adj_where <= CONF_ADJ_BELOW) { s = xf86findScreen(adj->adj_refscreen, XF86Config->conf_screen_lst); for (i = 0; i < computer.num_screens; i++) if (computer.screens[i]->screen == s) diff -u XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/text-mode.c sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/text-mode.c --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/text-mode.c Sun Dec 19 01:15:45 2004 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/text-mode.c Tue Apr 19 16:59:06 2005 @@ -35,9 +35,13 @@ #ifdef _SCO_DS #include #else +#ifdef sun +#include +#else #include #endif +#endif #include #include #include --- XORG-X11R6.8.2/xc/programs/Xserver/hw/xfree86/xf86cfg/dummygen.c 1969-12-31 16:00:00.000000000 -0800 +++ sun-src/xc/programs/Xserver/hw/xfree86/xf86cfg/dummygen.c 2005-06-27 18:27:03.249551000 -0700 @@ -0,0 +1,280 @@ +/* $XdotOrg: $ */ +/* Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ + +#include +#include +#include + +#define MAXSYMS 256 +#define MAXLINE 512 + +static char *dixsymfile = "../loader/dixsym.c"; +static char *misymfile = "../loader/misym.c"; +static char *fontsymfile = "../loader/fontsym.c"; +static char *extsymfile = "../loader/extsym.c"; +static char *xf86symfile = "../loader/xf86sym.c"; +static char *xorgsymfile = "loadmod.c"; +static char *outputfile = "dummy.c"; + +static char *xf86excludesyms[MAXSYMS]; +static char line[MAXLINE]; +static int endfile; +static FILE *ofp; + +static char *dixexcludesyms[ ] = { + "Xstrdup", + "XNFstrdup", + "LogVWrite", + "FatalError", + "ErrorF", + "VErrorF", + "Error", + "kNFalloc", + "XNFalloc", + "XNFcalloc", + "XNFrealloc", + "Xalloc", + "Xcalloc", + "Xfree", + "Xrealloc", + NULL +}; + +static char *xf86initexcludesyms[ ] = { + "xf86GetErrno", + "xf86ErrorF", + "xf86strlcat", + "xf86strlcpy", + "xf86strncat", + "xf86HUGE_VAL", + NULL +}; + +typedef enum { + RET_EOF = 0, + RET_DEF, + RET_FUNC, + RET_VAR, + RET_COM, + RET_OTHER +} rettype; + +static void +errexit(char *format, char *str) { + int i; + char *p; + + if (str) + fprintf (stderr, format, str); + else + fprintf (stderr, format); + + i = 0; + while (xf86excludesyms[i]) + free(xf86excludesyms[i++]); + exit (1); +} + +static rettype +readline(FILE *fp) { + char ch; + int i = 0; + + endfile = 0; + + /* skip leading spaces */ + while ((ch = fgetc(fp)) == ' '); + + line[i] = ch; + while (((line[i] != '\n') && (line[i] != EOF)) || + ((line[i] == '\n') && (line[i-1] == '\\'))) { + if ((line[i] == '\n') && (line[i-1] == '\\')) + i--; + else + if (++i >= MAXLINE) + errexit("Line exceeds maximum.\n", NULL); + line[i] = fgetc(fp); + } + + if (line[i] == '\n') + line[i] = '\0'; + else + if (line[i] == EOF) { + if (i == 0) + return (RET_EOF); + else + endfile = 1; + } + + /* Processing line */ + if ((line[0] == '/' && line[1] == '*') || (line[0] == '*')) + return (RET_COM); + if (!strncmp(line, "#if", 3) || !strncmp(line, "#else", 5) || + !strncmp(line, "#endif", 6) || !strncmp(line, "# if", 4) || + !strncmp(line, "# else", 6) || !strncmp(line, "# endif", 7)) + return (RET_DEF); + if (!strncmp(line, "SYMFUNC", 7) && strncmp(line, "SYMFUNCALIAS", 12)) + return (RET_FUNC); + if (!strncmp(line, "SYMVAR", 6)) + return (RET_VAR); + + return (RET_OTHER); +} + +void +processsyms(char *file, char **exclude) { + FILE *fp; + int i; + int skip; + rettype ret; + char *p, *q; + + if (!(fp = fopen(file, "r"))) + errexit("Open %s failed\n", file); + + fprintf(ofp, "\n/* Functions and variable from %s */\n", file); + + while ((ret = readline(fp)) != RET_EOF) { + if ((ret == RET_COM) || (ret == RET_OTHER)) + continue; + + if (ret == RET_DEF) + fprintf(ofp, "%s\n", line); + + if ((ret == RET_FUNC) || (ret == RET_VAR)) { + if (!(p = strchr(line, '('))) + errexit("Format error: %s\n", line); + if (!(q = strchr(p, ')'))) + errexit("Format error: %s\n", line); + *q = '\0'; + p++; + if (exclude) { + i = 0; + skip = 0; + while (exclude[i]) { + if (!strcmp(p, exclude[i])) { + skip = 1; + break; + } + i++; + } + if (skip) + continue; + } + + if (ret == RET_FUNC) + fprintf(ofp, " void %s( ) { }\n", p); + else + fprintf(ofp, " int %s;\n", p); + + if (endfile) { + fclose(fp); + return; + } + } + } + + fclose(fp); + return; +} + +int +main(int argc, char *argv[]) { + int i, len; + rettype ret; + char *p, *q; + FILE *fp; + + /* Initialize xf86excludesyms[] */ + for (i = 0; i < MAXSYMS; i++) + xf86excludesyms[i] = 0; + + /* Create xf86excludesyms[] */ + i = 0; + while (xf86initexcludesyms[i]) { + if (i >= MAXSYMS) + errexit("Error: xf86 exclude symbols exceeds MAXSYMS\n", NULL); + len = strlen(xf86initexcludesyms[i]); + if (xf86excludesyms[i] = malloc(len + 1)) { + memcpy((void *)xf86excludesyms[i], + (void *)xf86initexcludesyms[i], len); + xf86excludesyms[i][len] = '\0'; + i++; + } + else + errexit("Error: malloc failed\n", NULL); + } + + if (!(fp = fopen(xorgsymfile, "r"))) + errexit("Open %s failed\n", xorgsymfile); + + while ((ret = readline(fp)) != RET_EOF) { + if (i >= MAXSYMS) + errexit("Error: xf86 exclude symbols exceeds MAXSYMS\n", NULL); + if ((ret == RET_COM) || (ret == RET_OTHER)) + continue; + + if ((ret == RET_FUNC) || (ret == RET_VAR)) { + if (!(p = strchr(line, '('))) + errexit("Format error: %s\n", line); + if (!(q = strchr(p, ')'))) + errexit("Format error: %s\n", line); + *q = '\0'; + p++; + len = strlen(p); + if (xf86excludesyms[i] = malloc(len + 1)) { + memcpy((void *)xf86excludesyms[i], p, len); + xf86excludesyms[i][len] = '\0'; + i++; + } + else + errexit("Error: malloc failed\n", NULL); + } + if (endfile) + break; + } + + + if (!(ofp = fopen(outputfile, "w"))) + errexit("Open %s failed\n", outputfile); + + processsyms(dixsymfile, dixexcludesyms); + processsyms(misymfile, NULL); + processsyms(fontsymfile, NULL); + processsyms(extsymfile, NULL); + processsyms(xf86symfile, xf86excludesyms); + + fclose(ofp); + + i = 0; + while (xf86excludesyms[i]) + free(xf86excludesyms[i++]); + + return (0); +}