libxft lcd patches?
Anyone know if libxft will ever have quality LCD rendering like the patches that ubuntu uses? I'm considering implementing these for Frugalware, but we don't like to use patches like this, preferring to have upstream implement them. So whats the status? The only vague indicator I could find was this: http://freedesktop.org/wiki/ScreenFontSettings ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] config: remove --with-dri-driver-path option, use dri.pc #29740
The trusted location of the dri driver directory can be obtained from the mesa dri.pc pkg-config file. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- configure.ac |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 9884fa7..13ff8eb 100644 --- a/configure.ac +++ b/configure.ac @@ -601,9 +601,6 @@ AC_ARG_ENABLE(pc98, AC_HELP_STRING([--enable-pc98], [Enable PC98 support in [SUPPORT_PC98=auto]) dnl GLX build options -AC_ARG_WITH(dri-driver-path, AS_HELP_STRING([--with-dri-driver-path=PATH], [Path to DRI drivers (default: ${libdir}/dri)]), - [ DRI_DRIVER_PATH=$withval ], - [ DRI_DRIVER_PATH=${libdir}/dri ]) AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerated indirect GLX (default: enabled)]), [AIGLX=$enableval], [AIGLX=yes]) @@ -1258,7 +1255,8 @@ AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path]) AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path]) AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path]) AC_DEFINE_DIR(BASE_FONT_PATH, FONTROOTDIR, [Default base font path]) -AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path]) +dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri` +AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default DRI driver path]) AC_DEFINE_UNQUOTED(XVENDORNAME, [$VENDOR_NAME], [Vendor name]) AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, [$VENDOR_NAME_SHORT], [Short vendor name]) AC_DEFINE_UNQUOTED(XORG_DATE, [$RELEASE_DATE], [Vendor release]) -- 1.6.0.4 Testing was limited. DRI_DRIVER_PATH is the interface to the code and has not changed. If dri.pc is missing, DRI_DRIVER_PATH is blank. Before the patch it was set to $libdir/dri. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: Are we ready for X server 1.9?
On Fri, 2010-08-20 at 17:08 -0700, Keith Packard wrote: As for the midispcur bugs, I'd like to suggest that damage records lose their ability to hold private storage; it's not currently used anywhere. That's an ABI change though, so not suitable for 1.9 (or 1.9.1). In the absence of XACE, Damages seem like Regions; I can't imagine anything interesting a DDX subsystem would want to attach to a Damage. As a security question it's a little weirder. The thing you could do there is selectively control which bits of damage are reported to the listening client. I'm not sure that's a useful thing to constrain? Maybe you want a more-secure app to be able to render over less-secure apps without them knowing, but that's just a race you're going to lose the next time the less-secure app redraws. Seems like what you really want there is preventing rendering, not preventing knowing about rendering; in which case all the information you need about whether to allow a Damage to be created is there up-front and doesn't need a devprivate. - ajax signature.asc Description: This is a digitally signed message part ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: X server 1.9 stable release manager
On Sun, 2010-08-22 at 17:55 -0700, Keith Packard wrote: On Mon, 23 Aug 2010 09:45:57 +1000, Peter Hutterer peter.hutte...@who-t.net wrote: You got my vote, anyway. And given the amount of candidates and how tight the race is, that vote may just give you the edge ;) Sounds like we have a winner! Managing the stable branch (and the master branch, for that matter) is largely a mechanical process of watching the incoming patches, waiting for them to be adequately reviewed and then applying them. If Ajax can check the hw/xfree86 patches and provided 'Acked-by:' lines, I think we'll be in good shape here. I'm happy to manage the xf86 ddx bits of 1.9.x. - ajax signature.asc Description: This is a digitally signed message part ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] xfree86: use a thread for the generation of input events
On Mon, 2010-08-23 at 11:17 +0300, Tiago Vignatti wrote: Thanks for posting this, I'm eager to see this land for 1.10. @@ -260,6 +266,9 @@ int main(int argc, char *argv[], char *envp[]) InitRootWindow(screenInfo.screens[i]-root); InitCoreDevices(); + + threaded_input_pre_init(); + InitInput(argc, argv); InitAndStartDevices(); Style nit, would be nice to see that in InitInput() instead. main()'s already unreadable. @@ -311,6 +322,8 @@ int main(int argc, char *argv[], char *envp[]) CloseInput(); + threaded_input_fini(); + for (i = 0; i screenInfo.numScreens; i++) screenInfo.screens[i]-root = NullWindow; CloseDownDevices(); Ditto. @@ -307,9 +321,14 @@ xf86SigioReadInput(int fd, void *closure) void xf86AddEnabledDevice(InputInfoPtr pInfo) { +#ifdef INPUT_THREAD +threaded_input_register_device(pInfo-fd, xf86ThreadReadInput, pInfo); +#else + if (!xf86InstallSIGIOHandler (pInfo-fd, xf86SigioReadInput, pInfo)) { AddEnabledDevice(pInfo-fd); } +#endif } I feel like this should follow the same pattern: if (!threaded_input_register_device(pInfo-fd, xf86ThreadReadInput, pInfo) !xf86InstallSIGIOHandler(pInfo-fd, xf86SigioReadInput, pInfo)) AddEnabledDevice(pInfo-fd); And then you'd build the server such that either or both of those two functions is #define'd to 0. Which we kind of already do for SIGIO except it's a stub function instead of a #define. If you do that then you can make the malloc failure in t_i_r_d not a FatalError, although you'd need to make any input from main thread take the mutex. xf86ThreadReadInput is redundant here, I think you can just pass in pInfo-read_input directly. Unless you expect the input driver to modify that function pointer at runtime, but forbidding that seems like a perfectly reasonable invariant. @@ -319,9 +338,13 @@ xf86AddEnabledDevice(InputInfoPtr pInfo) void xf86RemoveEnabledDevice(InputInfoPtr pInfo) { +#ifdef INPUT_THREAD +threaded_input_unregister_device(pInfo-fd); +#else if (!xf86RemoveSIGIOHandler (pInfo-fd)) { RemoveEnabledDevice(pInfo-fd); } +#endif } Ditto. diff --git a/include/os.h b/include/os.h index efa202c..0b0113e 100644 --- a/include/os.h +++ b/include/os.h @@ -165,6 +165,24 @@ extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client*/); extern void ListenOnOpenFD(int /* fd */, int /* noxauth */); #endif +#ifdef INPUT_THREAD +typedef void (*read_input)(void*); read_input_proc please? read_input is likely to be a function name, it's not going to confuse the compiler but it may confuse the reader. @@ -226,6 +230,7 @@ WaitForSomething(int *pClientsReady) } else { + threaded_input_drain_pipe(); i = Select (MaxClients, LastSelectMask, NULL, NULL, wt); } selecterr = GetErrno(); Don't do this. Use a WakeupHandler to pick up events on the input event pipe. Otherwise you're slowing down every run through the dispatch loop by a syscall. (Actually, you should lift the xf86AddGeneralHandler stuff to the dix level, and register the input pipe with that, so we can pull all the knowledge of fd_sets out of Wakeup/BlockHandler, so we can switch the main loop to poll too.) And then once you do, fix thread_input_drain_pipe() to read in chunks until EAGAIN or short read instead of just pulling 10 events at a time. Not that it's super likely, but you might as well. diff --git a/os/connection.c b/os/connection.c index 77910be..81340b6 100644 --- a/os/connection.c +++ b/os/connection.c @@ -145,6 +145,10 @@ int MaxClients = 0; Bool NewOutputPending; /* not yet attempted to write some new output */ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */ +#ifdef INPUT_THREAD +int MaxInputDevices = 0; +#endif + static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ Bool PartialNetwork; /* continue even if unable to bind all addrs */ static Pid_t ParentProcess; @@ -302,6 +306,10 @@ InitConnectionLimits(void) if (lastfdesc MAXSELECT) lastfdesc = MAXSELECT; +#ifdef INPUT_THREAD +MaxInputDevices = lastfdesc; +#endif + if (lastfdesc MAXCLIENTS) { lastfdesc = MAXCLIENTS; Ew. You're only doing this as an artifact of using select(). We still haven't switched the main loop to poll() because a) ABI and b) win32, but there's no reason to be that broken here. +/* By making read head non-blocking, we ensure that while the main thread + * is busy servicing client requests, the dedicated input thread can work + * in parallel. + */ +threaded_input-read_pipe = fds[0]; +fcntl(threaded_input-read_pipe, F_SETFL, O_NONBLOCK); +AddGeneralSocket(threaded_input-read_pipe); +threaded_input-write_pipe = fds[1]; + +hotplugPipeRead = hotplugPipe[0]; +
Re: Are we ready for X server 1.9?
On 08/23/2010 11:22 AM, Adam Jackson wrote: On Fri, 2010-08-20 at 17:08 -0700, Keith Packard wrote: As for the midispcur bugs, I'd like to suggest that damage records lose their ability to hold private storage; it's not currently used anywhere. That's an ABI change though, so not suitable for 1.9 (or 1.9.1). In the absence of XACE, Damages seem like Regions; I can't imagine anything interesting a DDX subsystem would want to attach to a Damage. As a security question it's a little weirder. The thing you could do there is selectively control which bits of damage are reported to the listening client. I'm not sure that's a useful thing to constrain? Maybe you want a more-secure app to be able to render over less-secure apps without them knowing, but that's just a race you're going to lose the next time the less-secure app redraws. Seems like what you really want there is preventing rendering, not preventing knowing about rendering; in which case all the information you need about whether to allow a Damage to be created is there up-front and doesn't need a devprivate. - ajax I'm OK with taking out the damage devprivates. The dixLookupDrawable() calls in ProcDamageCreate and ProcDamageAdd check for client permission to touch the drawable (although not sure if the read and write access modes currently used are appropriate since it's not really reading or writing the drawable contents, as you note). The SELinux code doesn't even use the damage devPrivates right now because there is no offset registered in dix/privates.c for the damage type. dixLookupPrivateOffset() returns -1 which causes SELinux to fall back on the owning client's devPrivates instead. You don't want this for things like windows where you'd like to be able to have the window's security context be different from the client itself, but for damage resources it should be fine. -- Eamon Walsh National Security Agency ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] [loader] Tag sdksyms.c entries with source file and line number
--- This isn't 100% accurate... sometimes it's off by a line or two, but it's still helpful. I attached a generated sdksyms.c so you can see what it looks like. hw/xfree86/loader/sdksyms.sh |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh index 13c5ae5..700879c 100755 --- a/hw/xfree86/loader/sdksyms.sh +++ b/hw/xfree86/loader/sdksyms.sh @@ -345,11 +345,14 @@ BEGIN { if (sdk $3 ~ /\.h$/) { # remove quotes gsub(//, , $3); + line = $2; + header = $3; if (! headers[$3]) { printf( \\\n %s, $3) sdksyms.dep; headers[$3] = 1; } } +next; } /^extern[ ]/ { @@ -398,10 +401,14 @@ BEGIN { sub(/[^a-zA-Z0-9_].*/, , symbol); #print; - printf((void *) %s,\n, symbol); + printf((void *) %-50s /* %s:%s */\n, symbol ,, header, line); } } +{ +line++; +} + END { print(};); -- 1.7.0.4 sdksyms.c.gz Description: Binary data ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] Fix property and selection devPrivate allocation.
Selection objects were not being allocated with privates, and both objects had a stray statement that zeroed out the devPrivates field. Signed-off-by: Eamon Walsh ewa...@tycho.nsa.gov Reported-by: Justin Mattock justinmatt...@gmail.com --- dix/property.c |1 - dix/selection.c |3 +-- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dix/property.c b/dix/property.c index 87e5c2d..1d4332a 100644 --- a/dix/property.c +++ b/dix/property.c @@ -284,7 +284,6 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, pProp-format = format; pProp-data = data; pProp-size = len; - pProp-devPrivates = NULL; rc = XaceHookPropertyAccess(pClient, pWin, pProp, DixCreateAccess|DixWriteAccess); if (rc != Success) { diff --git a/dix/selection.c b/dix/selection.c index bae3a30..87ed1ab 100644 --- a/dix/selection.c +++ b/dix/selection.c @@ -196,12 +196,11 @@ ProcSetSelectionOwner(ClientPtr client) /* * It doesn't exist, so add it... */ - pSel = malloc(sizeof(Selection)); + pSel = dixAllocateObjectWithPrivates(Selection, PRIVATE_SELECTION); if (!pSel) return BadAlloc; pSel-selection = stuff-selection; - pSel-devPrivates = NULL; /* security creation/labeling check */ rc = XaceHookSelectionAccess(client, pSel, -- 1.7.2.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] [loader] Tag sdksyms.c entries with source file and line number
On Mon, 2010-08-23 at 11:37 -0700, Aaron Plattner wrote: --- This isn't 100% accurate... sometimes it's off by a line or two, but it's still helpful. I attached a generated sdksyms.c so you can see what it looks like. hw/xfree86/loader/sdksyms.sh |9 - 1 files changed, 8 insertions(+), 1 deletions(-) Reviewed-by: Adam Jackson a...@redhat.com - ajax signature.asc Description: This is a digitally signed message part ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Fix property and selection devPrivate allocation.
On Mon, 2010-08-23 at 16:04 -0400, Eamon Walsh wrote: Selection objects were not being allocated with privates, and both objects had a stray statement that zeroed out the devPrivates field. Signed-off-by: Eamon Walsh ewa...@tycho.nsa.gov Reported-by: Justin Mattock justinmatt...@gmail.com Reviewed-by: Adam Jackson a...@redhat.com - ajax signature.asc Description: This is a digitally signed message part ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Fix property and selection devPrivate allocation.
On 08/23/2010 01:14 PM, Adam Jackson wrote: On Mon, 2010-08-23 at 16:04 -0400, Eamon Walsh wrote: Selection objects were not being allocated with privates, and both objects had a stray statement that zeroed out the devPrivates field. Signed-off-by: Eamon Walshewa...@tycho.nsa.gov Reported-by: Justin Mattockjustinmatt...@gmail.com Reviewed-by: Adam Jacksona...@redhat.com - ajax patch applied.. seems the crash happens a little later now after applying. i.e. gdm starts(nice picture screen) I login, then a picture(hear things activating) then everything craps out. heres what Xorg.0.log has in it: [38.868] (II) config/udev: Adding input device Built-in iSight (/dev/input/event6) [38.868] (**) Built-in iSight: Applying InputClass evdev keyboard catchall [38.868] (**) Built-in iSight: always reports core events [38.868] (**) Built-in iSight: Device: /dev/input/event6 [38.871] (--) Built-in iSight: Found keys [38.871] (II) Built-in iSight: Configuring as keyboard [38.871] (II) XINPUT: Adding extended input device Built-in iSight (type: KEYBOARD) [38.871] (**) Option xkb_rules evdev [38.871] (**) Option xkb_model evdev [38.871] (**) Option xkb_layout us [54.426] Backtrace: [54.426] 0: /usr/bin/X (xorg_backtrace+0x26) [0x49e486] [54.426] 1: /usr/bin/X (0x40+0x60f19) [0x460f19] [54.426] 2: /lib/libpthread.so.0 (0x7f6205c93000+0xfa50) [0x7f6205ca2a50] [54.426] 3: /usr/bin/X (0x40+0x7cae0) [0x47cae0] [54.427] 4: /usr/bin/X (FreeColormap+0x27) [0x497677] [54.427] 5: /usr/bin/X (FreeClientResources+0xdb) [0x44b6bb] [54.427] 6: /usr/bin/X (FreeAllResources+0x46) [0x44b776] [54.427] 7: /usr/bin/X (0x40+0x22924) [0x422924] [54.427] 8: /lib/libc.so.6 (__libc_start_main+0xed) [0x7f620414365d] [54.427] 9: /usr/bin/X (0x40+0x224a1) [0x4224a1] [54.427] Segmentation fault at address 0x31 [54.427] Fatal server error: [54.427] Caught signal 11 (Segmentation fault). Server aborting [54.427] [54.427] Please consult the The X.Org Foundation support at http://wiki.x.org for help. [54.427] Please also check the log file at /var/log/Xorg.0.log for additional information. [54.427] [54.434] (II) Power Button: Close [54.434] (II) UnloadModule: evdev [54.440] (II) Power Button: Close [54.440] (II) UnloadModule: evdev [54.446] (II) Sleep Button: Close [54.446] (II) UnloadModule: evdev [54.452] (II) Apple Inc. Apple Keyboard: Close [54.452] (II) UnloadModule: evdev [54.458] (II) Apple Inc. Apple Keyboard: Close [54.458] (II) UnloadModule: evdev [54.464] (II) Mitsumi Electric Apple Optical USB Mouse: Close [54.464] (II) UnloadModule: evdev [54.470] (II) Built-in iSight: Close [54.470] (II) UnloadModule: evdev let me know if you need any info from a log or something. Justin P. Mattock ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 1/8] NO_PANORAMIX preprocessor symbol is nowhere defined
Which makes it useless, so remove it. Signed-off-by: Tomas Carnecky t...@dbservice.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- mi/miinitext.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/mi/miinitext.c b/mi/miinitext.c index a7441c9..4499f37 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -389,9 +389,7 @@ InitExtensions(int argc, char *argv[]) if (!noGEExtension) GEExtensionInit(); #ifdef PANORAMIX -# if !defined(NO_PANORAMIX) if (!noPanoramiXExtension) PanoramiXExtensionInit(); -# endif #endif #ifdef INXQUARTZ if(!noPseudoramiXExtension) PseudoramiXExtensionInit(); -- 1.7.2.1.g43c6fa ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 3/8] Make the DPMS, ScreenSaver and Res extensions builtin
The change is trivial: simply move the ExtensionModule definitions from hw/xfree/dixmods/extmod/modinit.c to mi/miinitext.c. Then also make sure the required sources for those extensions are built into libXextbuiltin.la instead of libXextmodule.la. Signed-off-by: Tomas Carnecky t...@dbservice.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- Xext/Makefile.am |8 +++--- hw/kdrive/src/kxv.c |2 +- hw/xfree86/common/xf86xv.c| 10 +++ hw/xfree86/common/xf86xvmc.c |7 ++--- hw/xfree86/dixmods/extmod/Makefile.am |7 + hw/xfree86/dixmods/extmod/modinit.c | 43 - hw/xfree86/dixmods/extmod/xvmod.c | 23 - hw/xfree86/dixmods/extmod/xvmodproc.h | 13 -- mi/miinitext.c| 17 +++- 9 files changed, 28 insertions(+), 102 deletions(-) delete mode 100644 hw/xfree86/dixmods/extmod/xvmod.c delete mode 100644 hw/xfree86/dixmods/extmod/xvmodproc.h diff --git a/Xext/Makefile.am b/Xext/Makefile.am index e444fd0..8f0a35f 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -45,19 +45,19 @@ endif # XVideo extension XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h if XV -MODULE_SRCS += $(XV_SRCS) +BUILTIN_SRCS += $(XV_SRCS) endif # XResource extension: lets clients get data about per-client resource usage RES_SRCS = xres.c if RES -MODULE_SRCS += $(RES_SRCS) +BUILTIN_SRCS += $(RES_SRCS) endif # MIT ScreenSaver extension SCREENSAVER_SRCS = saver.c if SCREENSAVER -MODULE_SRCS += $(SCREENSAVER_SRCS) +BUILTIN_SRCS += $(SCREENSAVER_SRCS) endif # Xinerama extension: making multiple video devices act as one virtual screen @@ -108,7 +108,7 @@ endif # DPMS extension DPMS_SRCS = dpms.c dpmsproc.h if DPMSExtension -MODULE_SRCS += $(DPMS_SRCS) +BUILTIN_SRCS += $(DPMS_SRCS) endif # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index c07829a..a1ff21f 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -195,7 +195,7 @@ KdXVScreenInit( if (KdXVGeneration != serverGeneration) KdXVGeneration = serverGeneration; - if(!XvGetScreenKeyProc || !XvGetRTPortProc || !XvScreenInitProc) + if (noXvExtension) return FALSE; if (!dixRegisterPrivateKey(KdXVWindowKeyRec, PRIVATE_WINDOW, 0)) diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index c1d3199..9eaeaa5 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -52,7 +52,6 @@ #include X11/extensions/Xv.h #include X11/extensions/Xvproto.h #include xvdix.h -#include xvmodproc.h #include xf86xvpriv.h @@ -117,9 +116,9 @@ DevPrivateKey XF86XvScreenKey; static unsigned long PortResource = 0; -DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL; -unsigned long (*XvGetRTPortProc)(void) = NULL; -int (*XvScreenInitProc)(ScreenPtr) = NULL; +DevPrivateKey (*XvGetScreenKeyProc)(void) = XvGetScreenKey; +unsigned long (*XvGetRTPortProc)(void) = XvGetRTPort; +int (*XvScreenInitProc)(ScreenPtr) = XvScreenInit; #define GET_XV_SCREEN(pScreen) \ ((XvScreenPtr)dixLookupPrivate((pScreen)-devPrivates, XF86XvScreenKey)) @@ -246,8 +245,7 @@ xf86XVScreenInit( XF86XVScreenPtr ScreenPriv; XvScreenPtr pxvs; - if(num = 0 || - !XvGetScreenKeyProc || !XvGetRTPortProc || !XvScreenInitProc) + if (num = 0 || noXvExtension) return FALSE; if(Success != (*XvScreenInitProc)(pScreen)) return FALSE; diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c index e6464a5..8f918e9 100644 --- a/hw/xfree86/common/xf86xvmc.c +++ b/hw/xfree86/common/xf86xvmc.c @@ -40,12 +40,10 @@ #include resource.h #include dixstruct.h -#include xvmodproc.h - #include xf86xvpriv.h #include xf86xvmc.h -XvMCScreenInitProcPtr XvMCScreenInitProc = NULL; +XvMCScreenInitProcPtr XvMCScreenInitProc = XvMCScreenInit; typedef struct { @@ -167,7 +165,8 @@ Bool xf86XvMCScreenInit( XF86XvScreenKey); int i, j; - if(!XvMCScreenInitProc) return FALSE; + if (noXvExtension) + return FALSE; if(!(pAdapt = malloc(sizeof(XvMCAdaptorRec) * num_adaptors))) return FALSE; diff --git a/hw/xfree86/dixmods/extmod/Makefile.am b/hw/xfree86/dixmods/extmod/Makefile.am index d93e63a..73e3b70 100644 --- a/hw/xfree86/dixmods/extmod/Makefile.am +++ b/hw/xfree86/dixmods/extmod/Makefile.am @@ -7,10 +7,6 @@ if DGA DGA_SRCS = xf86dga2.c dgaproc.h xf86dgaext.h endif -if XV -XV_SRCS = xvmod.c xvmodproc.h -endif - if XF86VIDMODE XF86VMODE_SRCS = xf86vmode.c endif @@ -25,6 +21,5 @@ libextmod_la_LDFLAGS = -avoid-version libextmod_la_SOURCES = modinit.c \ modinit.h \ $(DGA_SRCS) \ - $(XF86VMODE_SRCS) \ - $(XV_SRCS) + $(XF86VMODE_SRCS)
[PATCH 2/8] Replace INITARGS with void
It was defined to void anyway. Everyone but panoramix used INITARGS, but PanoramiXExtensionInit() had hardcoded argc/argv. Replace that with void as well. Signed-off-by: Tomas Carnecky t...@dbservice.com --- Xext/bigreq.c|4 +- Xext/dpms.c |2 +- Xext/panoramiX.c |2 +- Xext/saver.c |2 +- Xext/security.c |2 +- Xext/shm.c |2 +- Xext/xcmisc.c|4 +- Xext/xres.c |2 +- Xext/xselinux_ext.c |2 +- Xext/xtest.c |2 +- hw/xfree86/common/xf86Module.h |4 +-- hw/xfree86/dixmods/dbemodule.c |2 +- hw/xfree86/dixmods/extmod/modinit.h | 38 +--- hw/xfree86/dixmods/extmod/xf86dga2.c |4 +- hw/xfree86/dixmods/recordmod.c |2 +- hw/xfree86/dri/drimodule.c |2 +- mi/miinitext.c | 63 - 17 files changed, 66 insertions(+), 73 deletions(-) diff --git a/Xext/bigreq.c b/Xext/bigreq.c index ce3734e..cb52787 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -42,10 +42,10 @@ from The Open Group. static DISPATCH_PROC(ProcBigReqDispatch); -void BigReqExtensionInit(INITARGS); +void BigReqExtensionInit(void); void -BigReqExtensionInit(INITARGS) +BigReqExtensionInit(void) { AddExtension(XBigReqExtensionName, 0, 0, ProcBigReqDispatch, ProcBigReqDispatch, diff --git a/Xext/dpms.c b/Xext/dpms.c index 33a6e26..32f33b3 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -371,7 +371,7 @@ SProcDPMSDispatch (ClientPtr client) } void -DPMSExtensionInit(INITARGS) +DPMSExtensionInit(void) { AddExtension(DPMSExtensionName, 0, 0, ProcDPMSDispatch, SProcDPMSDispatch, diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index b73c53f..c7a8af3 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -432,7 +432,7 @@ void XineramaReinitData(ScreenPtr pScreen) * Initialize global variables. */ -void PanoramiXExtensionInit(int argc, char *argv[]) +void PanoramiXExtensionInit(void) { inti; Bool success = FALSE; diff --git a/Xext/saver.c b/Xext/saver.c index 6d91ddf..12d5d60 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -246,7 +246,7 @@ static DevPrivateKeyRec ScreenPrivateKeyRec; / void -ScreenSaverExtensionInit(INITARGS) +ScreenSaverExtensionInit(void) { ExtensionEntry *extEntry; inti; diff --git a/Xext/security.c b/Xext/security.c index 7eb95de..ce49b91 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1091,7 +1091,7 @@ SecurityResetProc( */ void -SecurityExtensionInit(INITARGS) +SecurityExtensionInit(void) { ExtensionEntry *extEntry; int ret = TRUE; diff --git a/Xext/shm.c b/Xext/shm.c index 3230d83..78344e0 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -255,7 +255,7 @@ ShmRegisterPrivates(void) } void -ShmExtensionInit(INITARGS) +ShmExtensionInit(void) { ExtensionEntry *extEntry; int i; diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index 986c870..e095d8f 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -55,10 +55,10 @@ static DISPATCH_PROC(SProcXCMiscGetVersion); static DISPATCH_PROC(SProcXCMiscGetXIDList); static DISPATCH_PROC(SProcXCMiscGetXIDRange); -void XCMiscExtensionInit(INITARGS); +void XCMiscExtensionInit(void); void -XCMiscExtensionInit(INITARGS) +XCMiscExtensionInit(void) { AddExtension(XCMiscExtensionName, 0, 0, ProcXCMiscDispatch, SProcXCMiscDispatch, diff --git a/Xext/xres.c b/Xext/xres.c index 06639a2..8d0ef30 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -375,7 +375,7 @@ SProcResDispatch (ClientPtr client) } void -ResExtensionInit(INITARGS) +ResExtensionInit(void) { (void) AddExtension(XRES_NAME, 0, 0, ProcResDispatch, SProcResDispatch, diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c index 93c1b59..28e13aa 100644 --- a/Xext/xselinux_ext.c +++ b/Xext/xselinux_ext.c @@ -702,7 +702,7 @@ SELinuxResetProc(ExtensionEntry *extEntry) } void -SELinuxExtensionInit(INITARGS) +SELinuxExtensionInit(void) { ExtensionEntry *extEntry; diff --git a/Xext/xtest.c b/Xext/xtest.c index 7268768..57e9626 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -96,7 +96,7 @@ static DISPATCH_PROC(SProcXTestGetVersion); static DISPATCH_PROC(SProcXTestGrabControl); void -XTestExtensionInit(INITARGS) +XTestExtensionInit(void) { AddExtension(XTestExtensionName, 0, 0, ProcXTestDispatch, SProcXTestDispatch, diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index 51b9b16..30f6d44 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -169,9 +169,7 @@ typedef struct { #define GET_MODULE_MINOR_VERSION(vers) (((vers) 16)
[PATCH 4/8] Make the DGA and XF86VidMode extensions builtin
Besides the ExtensionModule definition there are a few supporting files in hw/xfree86/dixmods/extmod. Fortunately they do not require any special treatment other than adjusting CFLAGS and include paths in Xext/Makefile.am. However, one must take care to only build these extensions into libXextbuiltin.la and leave them out of libXext.la. These extensions require special support in the DDX which at this point is only provided by Xorg. The DGA extension again used a setupProc to initialize a pointer. The setup proc can be removed because the DDX has direct access to the data the setup proc was initializing (DGAEventBase). Signed-off-by: Tomas Carnecky t...@dbservice.com --- Xext/Makefile.am | 31 + {hw/xfree86/dixmods/extmod = Xext}/dgaproc.h|1 - {hw/xfree86/dixmods/extmod = Xext}/xf86dga2.c |8 +- {hw/xfree86/dixmods/extmod = Xext}/xf86dgaext.h |0 {hw/xfree86/dixmods/extmod = Xext}/xf86vmode.c |0 hw/xfree86/common/xf86DGA.c | 14 - hw/xfree86/dixmods/extmod/Makefile.am| 13 + hw/xfree86/dixmods/extmod/modinit.c | 18 mi/miinitext.c |7 + 9 files changed, 40 insertions(+), 52 deletions(-) rename {hw/xfree86/dixmods/extmod = Xext}/dgaproc.h (98%) rename {hw/xfree86/dixmods/extmod = Xext}/xf86dga2.c (99%) rename {hw/xfree86/dixmods/extmod = Xext}/xf86dgaext.h (100%) rename {hw/xfree86/dixmods/extmod = Xext}/xf86vmode.c (100%) diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 8f0a35f..a9dd43c 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -10,12 +10,12 @@ else noinst_LTLIBRARIES = libXext.la endif -INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod +INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod @XORG_INCS@ -AM_CFLAGS = $(DIX_CFLAGS) +AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) if XORG -sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h +sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h dgaproc.h endif # Sources always included in libXextbuiltin.la libXext.la @@ -111,13 +111,31 @@ if DPMSExtension BUILTIN_SRCS += $(DPMS_SRCS) endif +## +# Sources *only* included in libXextbuiltin.la. These are extensions requiring +# special support in the DDX, which at this point is only provided by Xorg +XEXT_XORG_SRCS = + +# DGA extension +DGA_SRCS = xf86dga2.c dgaproc.h xf86dgaext.h +if DGA +XEXT_XORG_SRCS += $(DGA_SRCS) +endif + +# XF86VidMode extension +XF86VMODE_SRCS = xf86vmode.c +if XF86VIDMODE +XEXT_XORG_SRCS += $(XF86VMODE_SRCS) +endif + + # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS) libXext_la_LIBADD =$(MODULE_LIBS) if XORG -libXextbuiltin_la_SOURCES =$(BUILTIN_SRCS) +libXextbuiltin_la_SOURCES =$(XEXT_XORG_SRCS) $(BUILTIN_SRCS) libXextmodule_la_SOURCES = $(MODULE_SRCS) libXextmodule_la_LIBADD = $(MODULE_LIBS) @@ -135,5 +153,6 @@ EXTRA_DIST = \ $(XINERAMA_SRCS) \ $(BIGFONT_SRCS) \ $(DPMS_SRCS) \ -$(GE_SRCS) - +$(GE_SRCS) \ + $(DGA_SRCS) \ + $(XF86VMODE_SRCS) diff --git a/hw/xfree86/dixmods/extmod/dgaproc.h b/Xext/dgaproc.h similarity index 98% rename from hw/xfree86/dixmods/extmod/dgaproc.h rename to Xext/dgaproc.h index 6745a6e..734860a 100644 --- a/hw/xfree86/dixmods/extmod/dgaproc.h +++ b/Xext/dgaproc.h @@ -136,7 +136,6 @@ extern _X_EXPORT int DGACreateColormap(int Index, ClientPtr client, int id, int extern _X_EXPORT unsigned char DGAReqCode; extern _X_EXPORT int DGAErrorBase; extern _X_EXPORT int DGAEventBase; -extern _X_EXPORT int *XDGAEventBase; diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/Xext/xf86dga2.c similarity index 99% rename from hw/xfree86/dixmods/extmod/xf86dga2.c rename to Xext/xf86dga2.c index cd0ed57..ccee7e2 100644 --- a/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/Xext/xf86dga2.c @@ -59,7 +59,7 @@ static void DGAClientStateChange (CallbackListPtr*, pointer, pointer); unsigned char DGAReqCode = 0; int DGAErrorBase; -int DGAEventBase; +int DGAEventBase = -1; static DevPrivateKeyRec DGAScreenPrivateKeyRec; #define DGAScreenPrivateKey (DGAScreenPrivateKeyRec) @@ -1057,9 +1057,3 @@ ProcXDGADispatch (ClientPtr client) return BadRequest; } } - -void -XFree86DGARegister(void) -{ - XDGAEventBase = DGAEventBase; -} diff --git a/hw/xfree86/dixmods/extmod/xf86dgaext.h b/Xext/xf86dgaext.h similarity index 100% rename from hw/xfree86/dixmods/extmod/xf86dgaext.h rename to Xext/xf86dgaext.h diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/Xext/xf86vmode.c similarity index 100% rename from hw/xfree86/dixmods/extmod/xf86vmode.c rename to Xext/xf86vmode.c diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 82fb52a..af9772c 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c
[PATCH 5/8] Make the SELinux extension builtin
This is the last extension still living in extmod. It expects some configuration options in the config file which it parsed when extmod was loaded. Now parse the config file when SELinuxExtensionInit() is called: Look if there is a Modules section, extmod subsection and see if the options are present. In the future, we might want to move the options into the ServerFlags or Extensions section. Because XSELinux depends on the xorg.conf config file and methods which parse it, this extension needs to go into libXextbuiltin.la and not libXext.la. This change also makes libXextmodule.la and the whole extmod/ directory obsolete. Signed-off-by: Tomas Carnecky t...@dbservice.com --- Xext/Makefile.am | 36 -- Xext/bigreq.c |1 - Xext/dpms.c |1 - Xext/panoramiX.c |1 - Xext/saver.c |2 - Xext/shape.c |1 - Xext/shm.c|2 - Xext/sync.c |2 - Xext/xcmisc.c |1 - Xext/xres.c |1 - Xext/xselinux_ext.c | 29 Xext/xtest.c |2 - configure.ac |1 - hw/xfree86/dixmods/Makefile.am|2 - hw/xfree86/dixmods/extmod/Makefile.am | 14 hw/xfree86/dixmods/extmod/modinit.c | 126 - hw/xfree86/dixmods/extmod/modinit.h | 78 mi/miinitext.c|4 +- 18 files changed, 47 insertions(+), 257 deletions(-) delete mode 100644 hw/xfree86/dixmods/extmod/Makefile.am delete mode 100644 hw/xfree86/dixmods/extmod/modinit.c delete mode 100644 hw/xfree86/dixmods/extmod/modinit.h diff --git a/Xext/Makefile.am b/Xext/Makefile.am index a9dd43c..fd4e2d6 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -2,15 +2,13 @@ #Xnest, Xdmx and Xprt # libXextbuiltin.la: includes those extensions that are built directly into #Xorg by default -# libXextmodule.la: includes those extensions that are built into a module -#that Xorg loads if XORG -noinst_LTLIBRARIES = libXext.la libXextbuiltin.la libXextmodule.la +noinst_LTLIBRARIES = libXext.la libXextbuiltin.la else noinst_LTLIBRARIES = libXext.la endif -INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod @XORG_INCS@ +INCLUDES = @XORG_INCS@ AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) @@ -29,10 +27,7 @@ BUILTIN_SRCS = \ syncsrv.h \ xcmisc.c\ xtest.c - -# Sources always included in libXextmodule.la libXext.la. That's right, zero. -MODULE_SRCS = -MODULE_LIBS = +BUILTIN_LIBS = # Optional sources included if extension enabled by configure.ac rules @@ -79,14 +74,6 @@ sdk_HEADERS += xace.h xacestr.h endif endif -# SELinux extension: provides SELinux policy support for X objects -# requires X-ACE extension -XSELINUX_SRCS = xselinux_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h -if XSELINUX -MODULE_SRCS += $(XSELINUX_SRCS) -MODULE_LIBS += $(SELINUX_LIBS) -endif - # Security extension: multi-level security to protect clients from each other XCSECURITY_SRCS = security.c securitysrv.h if XCSECURITY @@ -115,6 +102,15 @@ endif # Sources *only* included in libXextbuiltin.la. These are extensions requiring # special support in the DDX, which at this point is only provided by Xorg XEXT_XORG_SRCS = +XEXT_XORG_LIBS = + +# SELinux extension: provides SELinux policy support for X objects +# requires X-ACE extension +XSELINUX_SRCS = xselinux_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h +if XSELINUX +XEXT_XORG_SRCS += $(XSELINUX_SRCS) +XEXT_XORG_LIBS += $(SELINUX_LIBS) +endif # DGA extension DGA_SRCS = xf86dga2.c dgaproc.h xf86dgaext.h @@ -131,14 +127,12 @@ endif # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la -libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS) -libXext_la_LIBADD =$(MODULE_LIBS) +libXext_la_SOURCES = $(BUILTIN_SRCS) +libXext_la_LIBADD =$(BUILTIN_LIBS) if XORG libXextbuiltin_la_SOURCES =$(XEXT_XORG_SRCS) $(BUILTIN_SRCS) - -libXextmodule_la_SOURCES = $(MODULE_SRCS) -libXextmodule_la_LIBADD = $(MODULE_LIBS) +libXextbuiltin_la_LIBADD = $(XEXT_XORG_LIBS) $(BUILTIN_LIBS) endif EXTRA_DIST = \ diff --git a/Xext/bigreq.c b/Xext/bigreq.c index cb52787..212ae4d 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -38,7 +38,6 @@ from The Open Group. #include extnsionst.h #include X11/extensions/bigreqsproto.h #include opaque.h -#include modinit.h static DISPATCH_PROC(ProcBigReqDispatch); diff --git a/Xext/dpms.c b/Xext/dpms.c index 32f33b3..c8fdb9e 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -39,7 +39,6 @@ Equipment Corporation.
[PATCH 7/8] Make the RECORD and DBE extensions builtin
Straightforward, move the ExtensionModule definitions into mi/miinitext.c and make sure the required libraries are linked directly into Xorg. Signed-off-by: Tomas Carnecky t...@dbservice.com --- configure.ac |2 +- hw/xfree86/common/xf86Config.c |6 - hw/xfree86/dixmods/Makefile.am | 21 +- hw/xfree86/dixmods/dbemodule.c | 46 hw/xfree86/dixmods/recordmod.c | 44 -- mi/miinitext.c |6 + 6 files changed, 8 insertions(+), 117 deletions(-) delete mode 100644 hw/xfree86/dixmods/dbemodule.c delete mode 100644 hw/xfree86/dixmods/recordmod.c diff --git a/configure.ac b/configure.ac index a730ccf..7dc93fa 100644 --- a/configure.ac +++ b/configure.ac @@ -1556,7 +1556,7 @@ if test x$XORG = xyes; then XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' XORG_INCS=$XORG_DDXINCS $XORG_OSINCS XORG_CFLAGS=$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H - XORG_LIBS=$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $XEXT_XORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB + XORG_LIBS=$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $XEXT_XORG_LIB $RECORD_LIB $DBE_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB dnl == dnl symbol visibility diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 28786ba..f6ee024 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -111,15 +111,9 @@ extern DeviceAssocRec mouse_assoc; static ModuleDefault ModuleDefaults[] = { {.name = extmod, .toLoad = TRUE,.load_opt=NULL}, -#ifdef DBE -{.name = dbe, .toLoad = TRUE,.load_opt=NULL}, -#endif #ifdef GLXEXT {.name = glx, .toLoad = TRUE,.load_opt=NULL}, #endif -#ifdef XRECORD -{.name = record, .toLoad = TRUE,.load_opt=NULL}, -#endif #ifdef XF86DRI {.name = dri, .toLoad = TRUE,.load_opt=NULL}, #endif diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am index 5718bdf..0e523f8 100644 --- a/hw/xfree86/dixmods/Makefile.am +++ b/hw/xfree86/dixmods/Makefile.am @@ -4,34 +4,19 @@ if GLX GLXMODS = libglx.la endif -if DBE -DBEMOD = libdbe.la -endif - -if RECORD -RECORDMOD = librecord.la -endif - module_LTLIBRARIES = libfb.la \ libwfb.la \ libshadow.la extsmoduledir = $(moduledir)/extensions -extsmodule_LTLIBRARIES = $(RECORDMOD) \ -$(DBEMOD) \ - $(GLXMODS) +extsmodule_LTLIBRARIES = $(GLXMODS) AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ INCLUDES = @XORG_INCS@ \ - -I$(top_srcdir)/dbe \ -I$(top_srcdir)/hw/xfree86/loader \ -I$(top_srcdir)/miext/shadow \ -I$(top_srcdir)/glx -libdbe_la_LDFLAGS = -avoid-version -libdbe_la_LIBADD = $(top_builddir)/dbe/libdbe.la -libdbe_la_SOURCES = dbemodule.c - libfb_la_LDFLAGS = -avoid-version libfb_la_LIBADD = $(top_builddir)/fb/libfb.la libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c @@ -51,10 +36,6 @@ libglx_la_LIBADD = \ $(GLXDRI_LIBRARY) libglx_la_SOURCES = glxmodule.c -librecord_la_LDFLAGS = -avoid-version -librecord_la_LIBADD = $(top_builddir)/record/librecord.la -librecord_la_SOURCES = recordmod.c - libshadow_la_LDFLAGS = -avoid-version libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la libshadow_la_SOURCES = shmodule.c diff --git a/hw/xfree86/dixmods/dbemodule.c b/hw/xfree86/dixmods/dbemodule.c deleted file mode 100644 index 436a7b1..000 --- a/hw/xfree86/dixmods/dbemodule.c +++ /dev/null @@ -1,46 +0,0 @@ -#ifdef HAVE_XORG_CONFIG_H -#include xorg-config.h -#endif - -#include xf86Module.h -#include globals.h - -static MODULESETUPPROTO(dbeSetup); - -extern void DbeExtensionInit(void); - -static ExtensionModule dbeExt = { -DbeExtensionInit, -DOUBLE-BUFFER, -noDbeExtension, -NULL, -NULL -}; - -static XF86ModuleVersionInfo VersRec = -{ - dbe, - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_EXTENSION, - ABI_EXTENSION_VERSION, - MOD_CLASS_EXTENSION, - {0,0,0,0} -}; - -/* - * Data for the loader - */ -_X_EXPORT XF86ModuleData dbeModuleData = { VersRec, dbeSetup, NULL }; - -static pointer -dbeSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ -LoadExtension(dbeExt, FALSE); - -/* Need a non-NULL return value to indicate success */ -return (pointer)1; -} diff --git a/hw/xfree86/dixmods/recordmod.c b/hw/xfree86/dixmods/recordmod.c deleted file mode 100644 index cb265de..000 --- a/hw/xfree86/dixmods/recordmod.c +++ /dev/null
[PATCH 8/8] Remove traces of extmod/libdbe from comments and makefiles
Traces of extmod are still left in the sample xorg.conf files. Signed-off-by: Tomas Carnecky t...@dbservice.com --- Xext/xace.h|1 - hw/dmx/Makefile.am |1 - hw/xfree86/common/Makefile.am |2 +- hw/xfree86/common/xf86Config.c |1 - hw/xfree86/doc/devel/Registry |1 - hw/xfree86/loader/sdksyms.sh |8 +--- hw/xfree86/modes/Makefile.am |3 +-- 7 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Xext/xace.h b/Xext/xace.h index 6029d87..2799bf3 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -59,7 +59,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; /* Entry point for hook functions. Called by Xserver. - * Required by libdbe and libextmod */ extern _X_EXPORT int XaceHook( int /*hook*/, diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am index 0d06346..b4c9753 100644 --- a/hw/dmx/Makefile.am +++ b/hw/dmx/Makefile.am @@ -11,7 +11,6 @@ if GLX SUBDIRS += glxProxy GLX_LIBS = glxProxy/libglxproxy.a GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h -GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod GLX_DEFS = @GL_CFLAGS@ endif diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index 821a2b5..b81ff61 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -46,7 +46,7 @@ libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ - -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ + -I$(srcdir)/../vgahw \ -I$(srcdir)/../modes -I$(srcdir)/../ramdac sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index f6ee024..0ca5666 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -110,7 +110,6 @@ extern DeviceAssocRec mouse_assoc; #endif static ModuleDefault ModuleDefaults[] = { -{.name = extmod, .toLoad = TRUE,.load_opt=NULL}, #ifdef GLXEXT {.name = glx, .toLoad = TRUE,.load_opt=NULL}, #endif diff --git a/hw/xfree86/doc/devel/Registry b/hw/xfree86/doc/devel/Registry index 1fec230..76d5ebb 100644 --- a/hw/xfree86/doc/devel/Registry +++ b/hw/xfree86/doc/devel/Registry @@ -33,7 +33,6 @@ drm dynapro elo2300 elographics -extmod fb fbdev fbdevhw diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh index 13c5ae5..621017c 100755 --- a/hw/xfree86/loader/sdksyms.sh +++ b/hw/xfree86/loader/sdksyms.sh @@ -129,7 +129,7 @@ cat sdksyms.c EOF # include xf86xvmc.h # include xf86xvpriv.h #endif -/* XF86VidMode code is in libextmod module */ +/* XF86VidMode code is in Xext/ */ /* #if XF86VIDMODE # include vidmodeproc.h @@ -182,12 +182,6 @@ cat sdksyms.c EOF */ -/* hw/xfree86/dixmods/extmod/Makefile.am -- module */ -/* -#include dgaproc.h - */ - - /* hw/xfree86/parser/Makefile.am */ #include xf86Parser.h #include xf86Optrec.h diff --git a/hw/xfree86/modes/Makefile.am b/hw/xfree86/modes/Makefile.am index 9236426..f2d9d31 100644 --- a/hw/xfree86/modes/Makefile.am +++ b/hw/xfree86/modes/Makefile.am @@ -23,8 +23,7 @@ libxf86modes_la_SOURCES = \ INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ - -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \ - -I$(srcdir)/../dixmods/extmod + -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac sdk_HEADERS = \ xf86Crtc.h \ -- 1.7.2.1.g43c6fa ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 6/8] Clean up Xext/Makefile.am
There are two classes of extensions: those available in all DDX and those only supported by the Xorg DDX. Extensions supported by all DDX go into libXext.la. Additional extensions only available in Xorg go into libXext-Xorg.la. Signed-off-by: Tomas Carnecky t...@dbservice.com --- Xext/Makefile.am | 53 +++-- configure.ac |4 ++-- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/Xext/Makefile.am b/Xext/Makefile.am index fd4e2d6..f676591 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -1,9 +1,8 @@ -# libXext.la:includes all extensions and should be linked into Xvfb, -#Xnest, Xdmx and Xprt -# libXextbuiltin.la: includes those extensions that are built directly into -#Xorg by default +# libXext.la:extensions which should be linked into all DDX +# libXext-Xorg.la: additional extensions which should be linked into Xorg + if XORG -noinst_LTLIBRARIES = libXext.la libXextbuiltin.la +noinst_LTLIBRARIES = libXext.la libXext-Xorg.la else noinst_LTLIBRARIES = libXext.la endif @@ -16,8 +15,10 @@ if XORG sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h dgaproc.h endif -# Sources always included in libXextbuiltin.la libXext.la -BUILTIN_SRCS = \ + +## +# Sources included in libXext.la +XEXT_SRCS =\ bigreq.c\ geext.c\ shape.c \ @@ -27,38 +28,36 @@ BUILTIN_SRCS = \ syncsrv.h \ xcmisc.c\ xtest.c -BUILTIN_LIBS = - -# Optional sources included if extension enabled by configure.ac rules +XEXT_LIBS = # MIT Shared Memory extension MITSHM_SRCS = shm.c shmint.h if MITSHM -BUILTIN_SRCS += $(MITSHM_SRCS) +XEXT_SRCS += $(MITSHM_SRCS) endif # XVideo extension XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h if XV -BUILTIN_SRCS += $(XV_SRCS) +XEXT_SRCS += $(XV_SRCS) endif # XResource extension: lets clients get data about per-client resource usage RES_SRCS = xres.c if RES -BUILTIN_SRCS += $(RES_SRCS) +XEXT_SRCS += $(RES_SRCS) endif # MIT ScreenSaver extension SCREENSAVER_SRCS = saver.c if SCREENSAVER -BUILTIN_SRCS += $(SCREENSAVER_SRCS) +XEXT_SRCS += $(SCREENSAVER_SRCS) endif # Xinerama extension: making multiple video devices act as one virtual screen XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c if XINERAMA -BUILTIN_SRCS += $(XINERAMA_SRCS) +XEXT_SRCS += $(XINERAMA_SRCS) if XORG sdk_HEADERS += panoramiXsrv.h panoramiX.h endif @@ -68,7 +67,7 @@ endif # like XC-Security, X-SELinux XTSol XACE_SRCS = xace.c xace.h xacestr.h if XACE -BUILTIN_SRCS += $(XACE_SRCS) +XEXT_SRCS += $(XACE_SRCS) if XORG sdk_HEADERS += xace.h xacestr.h endif @@ -77,30 +76,31 @@ endif # Security extension: multi-level security to protect clients from each other XCSECURITY_SRCS = security.c securitysrv.h if XCSECURITY -BUILTIN_SRCS += $(XCSECURITY_SRCS) +XEXT_SRCS += $(XCSECURITY_SRCS) endif XCALIBRATE_SRCS = xcalibrate.c if XCALIBRATE -BUILTIN_SRCS += $(XCALIBRATE_SRCS) +XEXT_SRCS += $(XCALIBRATE_SRCS) # XCalibrate needs tslib endif # XF86 Big Font extension BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h if XF86BIGFONT -BUILTIN_SRCS += $(BIGFONT_SRCS) +XEXT_SRCS += $(BIGFONT_SRCS) endif # DPMS extension DPMS_SRCS = dpms.c dpmsproc.h if DPMSExtension -BUILTIN_SRCS += $(DPMS_SRCS) +XEXT_SRCS += $(DPMS_SRCS) endif + ## -# Sources *only* included in libXextbuiltin.la. These are extensions requiring -# special support in the DDX, which at this point is only provided by Xorg +# Sources included in libXext-Xorg.la. These extensions require additional DDX +# support which is only present in Xorg XEXT_XORG_SRCS = XEXT_XORG_LIBS = @@ -125,14 +125,15 @@ XEXT_XORG_SRCS += $(XF86VMODE_SRCS) endif +## # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la -libXext_la_SOURCES = $(BUILTIN_SRCS) -libXext_la_LIBADD =$(BUILTIN_LIBS) +libXext_la_SOURCES = $(XEXT_SRCS) +libXext_la_LIBADD =$(XEXT_LIBS) if XORG -libXextbuiltin_la_SOURCES =$(XEXT_XORG_SRCS) $(BUILTIN_SRCS) -libXextbuiltin_la_LIBADD = $(XEXT_XORG_LIBS) $(BUILTIN_LIBS) +libXext_Xorg_la_SOURCES = $(XEXT_XORG_SRCS) +libXext_Xorg_la_LIBADD = $(XEXT_XORG_LIBS) endif EXTRA_DIST = \ diff --git a/configure.ac b/configure.ac index 3606947..a730ccf 100644 --- a/configure.ac +++ b/configure.ac @@ -773,7 +773,7 @@ dnl Extension section dnl --- XEXT_INC='-I$(top_srcdir)/Xext' XEXT_LIB='$(top_builddir)/Xext/libXext.la' -XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' +XEXT_XORG_LIB='$(top_builddir)/Xext/libXext-Xorg.la' dnl Optional modules
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
On Mon, 2010-08-23 at 23:25 +0800, Adam Jackson wrote: On Mon, 2010-08-23 at 10:23 +0200, Mark Kettenis wrote: From: yakui.z...@intel.com Date: Mon, 23 Aug 2010 15:20:05 +0800 From: Zhao Yakui yakui.z...@intel.com --- os/utils.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/os/utils.c b/os/utils.c index 51455cc..a08d591 100644 --- a/os/utils.c +++ b/os/utils.c @@ -242,6 +242,10 @@ OsSignal(int sig, OsSigHandlerPtr handler) #endif #endif +#ifndef CLOCK_MONOTONIC_COARSE +#define CLOCK_MONOTONIC_COARSE 6 +#endif What if an OS doesn't have CLOCK_MONOTONIC_COARSE, but uses the clock ID 6 for some other purpose? Then this patch would be wrong. NAK on that basis. Yes. Agree. How about using the constant value(6) directly? - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
ykzhao, le Tue 24 Aug 2010 08:32:48 +0800, a écrit : On Mon, 2010-08-23 at 23:25 +0800, Adam Jackson wrote: On Mon, 2010-08-23 at 10:23 +0200, Mark Kettenis wrote: From: yakui.z...@intel.com Date: Mon, 23 Aug 2010 15:20:05 +0800 From: Zhao Yakui yakui.z...@intel.com --- os/utils.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/os/utils.c b/os/utils.c index 51455cc..a08d591 100644 --- a/os/utils.c +++ b/os/utils.c @@ -242,6 +242,10 @@ OsSignal(int sig, OsSigHandlerPtr handler) #endif #endif +#ifndef CLOCK_MONOTONIC_COARSE +#define CLOCK_MONOTONIC_COARSE 6 +#endif What if an OS doesn't have CLOCK_MONOTONIC_COARSE, but uses the clock ID 6 for some other purpose? Then this patch would be wrong. NAK on that basis. Yes. Agree. How about using the constant value(6) directly? Err, you must be kidding... #ifdef __linux__ # ifndef CLOCK_MONOTONIC_COARSE # define CLOCK_MONOTONIC_COARSE 6 # endif #endif should however be fine. Samuel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
On Tue, 2010-08-24 at 08:32 +0800, ykzhao wrote: On Mon, 2010-08-23 at 23:25 +0800, Adam Jackson wrote: On Mon, 2010-08-23 at 10:23 +0200, Mark Kettenis wrote: From: yakui.z...@intel.com Date: Mon, 23 Aug 2010 15:20:05 +0800 From: Zhao Yakui yakui.z...@intel.com --- os/utils.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/os/utils.c b/os/utils.c index 51455cc..a08d591 100644 --- a/os/utils.c +++ b/os/utils.c @@ -242,6 +242,10 @@ OsSignal(int sig, OsSigHandlerPtr handler) #endif #endif +#ifndef CLOCK_MONOTONIC_COARSE +#define CLOCK_MONOTONIC_COARSE 6 +#endif What if an OS doesn't have CLOCK_MONOTONIC_COARSE, but uses the clock ID 6 for some other purpose? Then this patch would be wrong. NAK on that basis. Yes. Agree. How about using the constant value(6) directly? Sorry that I misunderstand it.(I misunderstand it as the incorrect macro definition.) What Mark mentioned is that the CLOCK_MONOTONIC_COARSE posix timer is not supported while the corresponding ID is used for other posix timer. Right? If so, is there an approach that helps us to detect whether the CLOCK_MONOTONIC_COARSE posix timer is supported on one OS? Thanks. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
On Tue, 2010-08-24 at 08:42 +0800, Samuel Thibault wrote: ykzhao, le Tue 24 Aug 2010 08:32:48 +0800, a écrit : On Mon, 2010-08-23 at 23:25 +0800, Adam Jackson wrote: On Mon, 2010-08-23 at 10:23 +0200, Mark Kettenis wrote: From: yakui.z...@intel.com Date: Mon, 23 Aug 2010 15:20:05 +0800 From: Zhao Yakui yakui.z...@intel.com --- os/utils.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/os/utils.c b/os/utils.c index 51455cc..a08d591 100644 --- a/os/utils.c +++ b/os/utils.c @@ -242,6 +242,10 @@ OsSignal(int sig, OsSigHandlerPtr handler) #endif #endif +#ifndef CLOCK_MONOTONIC_COARSE +#define CLOCK_MONOTONIC_COARSE 6 +#endif What if an OS doesn't have CLOCK_MONOTONIC_COARSE, but uses the clock ID 6 for some other purpose? Then this patch would be wrong. NAK on that basis. Yes. Agree. How about using the constant value(6) directly? Err, you must be kidding... #ifdef __linux__ # ifndef CLOCK_MONOTONIC_COARSE # define CLOCK_MONOTONIC_COARSE 6 # endif #endif should however be fine. How about the following code? It is only applied to Linux platform. #ifdef MONOTONIC_CLOCK struct timespec tp; -if (clock_gettime(CLOCK_MONOTONIC, tp) == 0) +static clockid_t clockid; +if (!clockid) { +#ifdef __linux__ +#ifndef CLOCK_MONONOTIC_COARSE +#define CLOCK_MONOTONIC_COARSE +#endif + if ((clock_getres(CLOCK_MONOTONIC_COARSE, tp) == 0) + (tp.tv_nsec / 1000 = 1000)) + clockid = CLOCK_MONOTONIC_COARSE; + else + clockid = CLOCK_MONOTONIC; +#else + clockid = CLOCK_MONOTONIC; +#endif + } +if (clock_gettime(clockid, tp) == 0) return (tp.tv_sec * 1000) + (tp.tv_nsec / 100L); #endif Samuel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
ykzhao, le Tue 24 Aug 2010 09:07:49 +0800, a écrit : +static clockid_t clockid; +if (!clockid) { +#ifdef __linux__ +#ifndef CLOCK_MONONOTIC_COARSE +#define CLOCK_MONOTONIC_COARSE If you don't provide the value 6 here, it's completely useless. +#endif + if ((clock_getres(CLOCK_MONOTONIC_COARSE, tp) == 0) Samuel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
On Tue, 2010-08-24 at 09:16 +0800, Samuel Thibault wrote: ykzhao, le Tue 24 Aug 2010 09:07:49 +0800, a écrit : +static clockid_t clockid; +if (!clockid) { +#ifdef __linux__ +#ifndef CLOCK_MONONOTIC_COARSE +#define CLOCK_MONOTONIC_COARSE If you don't provide the value 6 here, it's completely useless. Yes. You are right. It should be #define CLOCK_MONOTONIC_COARSE 6. Sorry for my fault. Thanks. Yakui +#endif + if ((clock_getres(CLOCK_MONOTONIC_COARSE, tp) == 0) Samuel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] xfree86: use a thread for the generation of input events
On Mon, Aug 23, 2010 at 11:17:10AM +0300, Tiago Vignatti wrote: The current SIGIO signal handler method, used at generation of input events, has a bunch of oddities. This patch introduces an alternative way using a thread, which is used to select()s all input device file descriptors. A mutex was used to control the access of the mi queue by the main and input threads. Two pipes to emit alert events (such hotplug ones) and guarantee the proper communication between them was also used. thanks. just a few style comments in this one, ajax already covered enough in his reply. Co-authored-by: Fernando Carrijo fcarr...@freedesktop.org Signed-off-by: Tiago Vignatti tiago.vigna...@nokia.com --- configure.ac |9 + dix/main.c | 13 ++ hw/xfree86/common/xf86Events.c | 23 +++ include/dix-config.h.in|3 + include/opaque.h |4 + include/os.h | 18 ++ mi/mieq.c | 70 - os/Makefile.am |5 + os/WaitFor.c |5 + os/connection.c|8 + os/inputthread.c | 368 11 files changed, 487 insertions(+), 39 deletions(-) create mode 100644 os/inputthread.c diff --git a/configure.ac b/configure.ac index 9884fa7..bfdf6ac 100644 --- a/configure.ac +++ b/configure.ac @@ -477,6 +477,10 @@ AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], AC_ARG_ENABLE(use-sigio-by-default, AS_HELP_STRING([--enable-use-sigio-by-default] [Enable SIGIO input handlers by default (default: $USE_SIGIO_BY_DEFAULT)]), [USE_SIGIO_BY_DEFAULT=$enableval], []) +AC_ARG_ENABLE(input-thread, AS_HELP_STRING([--enable-input-thread], + [Use a separate thread for input event generation (default: yes)]), +[INPUT_THREAD=$enableval], +[INPUT_THREAD=yes]) Can we use this unconditionally? If we can't assume the server is using threads, none of the drivers can really benefit from it because we always have to assume the event handling is during a signal handler. AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]), [INT10=$withval], [INT10=$DEFAULT_INT10]) @@ -1126,6 +1130,11 @@ if test x$DPMSExtension = xyes; then AC_DEFINE(DPMSExtension, 1, [Support DPMS extension]) fi +AM_CONDITIONAL(INPUT_THREAD, [test x$INPUT_THREAD = xyes]) +if test x$INPUT_THREAD = xyes; then + AC_DEFINE(INPUT_THREAD, 1, [Use a separate thread for input event generation]) +fi + if test x$XCALIBRATE = xyes test $KDRIVE = yes; then AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension]) REQUIRED_MODULES=$REQUIRED_MODULES $XCALIBRATEPROTO diff --git a/dix/main.c b/dix/main.c index 47a932f..f79f16f 100644 --- a/dix/main.c +++ b/dix/main.c @@ -111,6 +111,12 @@ Equipment Corporation. #include dispatch.h/* InitProcVectors() */ #endif +#ifndef INPUT_THREAD +static inline void threaded_input_pre_init(void) {} +static inline void threaded_input_init(void) {} +static inline void threaded_input_fini(void) {} +#endif input_threaded_... probably better, given that it is input related. also, I wish we could stop mixing kernel-style and old X camelcase style, this is getting more and more confusing. [...] +static void* +threaded_input_do_work(void *arg) +{ +fd_set ready_fds; +threaded_input_device *dev; + +FD_ZERO(ready_fds); + +while (1) +{ +XFD_COPYSET(threaded_input-fds, ready_fds); +FD_SET(hotplugPipeRead, ready_fds); + +DebugF(threaded-input: do_work waiting for devices\n); + +if (Select(MaxInputDevices, ready_fds, NULL, NULL, NULL) 0) +{ +if (errno == EINVAL) +{ +FatalError(threaded-input: do_work (%s), strerror(errno)); +} +else if (errno != EINTR) +{ +ErrorF(threaded-input: do_work (%s)\n, strerror(errno)); +} no {} for single-line blocks. for other comments I refer to ajax' email. Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
On Tue, Aug 24, 2010 at 08:32:48AM +0800, ykzhao wrote: On Mon, 2010-08-23 at 23:25 +0800, Adam Jackson wrote: On Mon, 2010-08-23 at 10:23 +0200, Mark Kettenis wrote: diff --git a/os/utils.c b/os/utils.c index 51455cc..a08d591 100644 --- a/os/utils.c +++ b/os/utils.c @@ -242,6 +242,10 @@ OsSignal(int sig, OsSigHandlerPtr handler) #endif #endif +#ifndef CLOCK_MONOTONIC_COARSE +#define CLOCK_MONOTONIC_COARSE 6 +#endif What if an OS doesn't have CLOCK_MONOTONIC_COARSE, but uses the clock ID 6 for some other purpose? Then this patch would be wrong. NAK on that basis. Yes. Agree. How about using the constant value(6) directly? That doesn't change anything - if a system is using ID 6 for something else, then using 6 is wholly incorrect, no matter whether you use the constant directly, define some other symbol for it, or whatever. #ifdef CLOCK_MONOTONIC_COARSE /* include support for CLOCK_MONOTONIC_COARSE */ #else /* it's not there so don't */ #endif signature.asc Description: Digital signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
Hi, On Tue, Aug 24, 2010 at 08:55:22AM +0800, ykzhao wrote: What Mark mentioned is that the CLOCK_MONOTONIC_COARSE posix timer is not supported while the corresponding ID is used for other posix timer. Right? 6 has no meaning to clock_gettime(). CLOCK_MONOTONIC_COARSE is the only thing that has any meaning: if it's not defined, you can't just invent a definition and hope that it works. That's why the spec says CLOCK_MONOTONIC_COARSE and not 6. If so, is there an approach that helps us to detect whether the CLOCK_MONOTONIC_COARSE posix timer is supported on one OS? Try the following completely untested patch (hey, it compiles). It's not perfect though: if CLOCK_MONOTONIC or CLOCK_MONOTONIC_COARSE were ever 0, we'd make two or three syscalls for GetTimeInMillis() instead of one, and if either of them were ~0L, we'd never use them. Cheers, Daniel diff --git a/os/utils.c b/os/utils.c index 51455cc..a1659ec 100644 --- a/os/utils.c +++ b/os/utils.c @@ -427,7 +427,20 @@ GetTimeInMillis(void) #ifdef MONOTONIC_CLOCK struct timespec tp; -if (clock_gettime(CLOCK_MONOTONIC, tp) == 0) +static clockid_t clockid; +if (!clockid) { +#ifdef CLOCK_MONOTONIC_COARSE +if (clock_getres(CLOCK_MONOTONIC_COARSE, tp) == 0 +(tp.tv_nsec / 1000) = 1000) +clockid = CLOCK_MONOTONIC_COARSE; +else +#endif +if (clock_gettime(CLOCK_MONOTONIC, tp) == 0) +clockid = CLOCK_MONOTONIC; +else +clockid = ~0L; +} +if (clockid != ~0L clock_gettime(clockid, tp) == 0) return (tp.tv_sec * 1000) + (tp.tv_nsec / 100L); #endif signature.asc Description: Digital signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
On Tue, 2010-08-24 at 10:12 +0800, Daniel Stone wrote: Hi, On Tue, Aug 24, 2010 at 08:55:22AM +0800, ykzhao wrote: What Mark mentioned is that the CLOCK_MONOTONIC_COARSE posix timer is not supported while the corresponding ID is used for other posix timer. Right? 6 has no meaning to clock_gettime(). CLOCK_MONOTONIC_COARSE is the only thing that has any meaning: if it's not defined, you can't just invent a definition and hope that it works. That's why the spec says CLOCK_MONOTONIC_COARSE and not 6. In theory the CLOCK_MONOTONIC_COARSE posix timer id will be defined in the /usr/include/bits/time.h. Maybe there is no definition of CLOCK_MONOTONIC_COARSE in /usr/include/bits/time.h when compiling the xorg. But the xorg is executed on the linux kernel that supports the CLOCK_MONOTONIC_COARSE posix timer.(In fact for most previous Linux distribution there is no definition of CLOCK_MONOTONIC_COARSE in /usr/include/bits/time.h). If it is executed on the kernel that doesn't support the CLOCK_MONOTONIC_COARSE timer, it will fallback to the CLOCK_MONOTOIC posix timer(the function of clock_getres will return the invalid value). Do we need to consider the above scenario? If the above scenario doesn't need to be cared, I will update the patch to assure that the CLOCK_MONOTONIC_COARSE posix timer will be tried only when there exists the corresponding definition. If so, is there an approach that helps us to detect whether the CLOCK_MONOTONIC_COARSE posix timer is supported on one OS? Try the following completely untested patch (hey, it compiles). It's not perfect though: if CLOCK_MONOTONIC or CLOCK_MONOTONIC_COARSE were ever 0, we'd make two or three syscalls for GetTimeInMillis() instead of one, and if either of them were ~0L, we'd never use them. the corresponding code is put under the condition definition of MONOTONIC_CLOCK. This is already checked by using configure script. In theory the CLOCK_MONOTONIC exists if the MONOTONIC_CLOCK is defined. Not sure whether it is still necessary to check the CLOCK_MONOTONIC again? Best regards. Cheers, Daniel diff --git a/os/utils.c b/os/utils.c index 51455cc..a1659ec 100644 --- a/os/utils.c +++ b/os/utils.c @@ -427,7 +427,20 @@ GetTimeInMillis(void) #ifdef MONOTONIC_CLOCK struct timespec tp; -if (clock_gettime(CLOCK_MONOTONIC, tp) == 0) +static clockid_t clockid; +if (!clockid) { +#ifdef CLOCK_MONOTONIC_COARSE +if (clock_getres(CLOCK_MONOTONIC_COARSE, tp) == 0 +(tp.tv_nsec / 1000) = 1000) +clockid = CLOCK_MONOTONIC_COARSE; +else +#endif +if (clock_gettime(CLOCK_MONOTONIC, tp) == 0) +clockid = CLOCK_MONOTONIC; +else +clockid = ~0L; +} +if (clockid != ~0L clock_gettime(clockid, tp) == 0) return (tp.tv_sec * 1000) + (tp.tv_nsec / 100L); #endif ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] Fix some edgecases in SYNC
In recent X servers gnome-screensaver's fade-to-screensaver has lost the ability to be interrupted. Tim Taiwanese Liim's analysis on the Fedora bug¹ lead to an edge case in the SYNC extension. If the WakeupHandler is called exactly on the threshold of a NegativeTransition trigger then SyncComputeBracketValues can unset the upper bracket bound, resulting in the idle counter not being updated past the threshold. Since a NegativeTransition is only triggered in the transition from strictly greater than to below the threshold, this results in the NegativeTransition not firing. Bug references: [1] Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=612620 about Ubuntu: http://bugs.launchpad.net/bugs/59 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 1/2] Xext: Fix edge case with {Positive, Negative}Transition triggers.
The {Positive,Negative}Transition triggers only fire when the counter goes from strictly {below,above} the threshold. If SyncComputeBracketValues gets called exactly at this threshold we may update the bracket values so that the counter is not updated past the threshold. Signed-off-by: Christopher James Halse Rogers christopher.halse.rog...@canonical.com --- Xext/sync.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/Xext/sync.c b/Xext/sync.c index a51262a..c00e692 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -959,6 +959,17 @@ SyncComputeBracketValues(SyncCounter *pCounter) { psci-bracket_less = pTrigger-test_value; pnewltval = psci-bracket_less; + } else if (XSyncValueEqual(pCounter-value, pTrigger-test_value) + XSyncValueLessThan(pTrigger-test_value, + psci-bracket_greater)) + { + /* +* The value is exactly equal to our threshold. We want one +* more event in the positive direction to ensure we pick up +* when the value *exceeds* this threshold. +*/ + psci-bracket_greater = pTrigger-test_value; + pnewgtval = psci-bracket_greater; } } else if (pTrigger-test_type == XSyncPositiveTransition @@ -969,6 +980,17 @@ SyncComputeBracketValues(SyncCounter *pCounter) { psci-bracket_greater = pTrigger-test_value; pnewgtval = psci-bracket_greater; + } else if (XSyncValueEqual(pCounter-value, pTrigger-test_value) + XSyncValueGreaterThan(pTrigger-test_value, +psci-bracket_less)) + { + /* +* The value is exactly equal to our threshold. We want one +* more event in the negative direction to ensure we pick up +* when the value is less than this threshold. +*/ + psci-bracket_less = pTrigger-test_value; + pnewltval = psci-bracket_less; } } } /* end for each trigger */ -- 1.7.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 2/2] IDLETIME: Fix edge-case in IdleTimeBlockHandler
Ensure that if we're called exactly on the threshold of a NegativeTransition trigger that we reshedule to pick up an idle time over the threshold. Signed-off-by: Christopher James Halse Rogers christopher.halse.rog...@canonical.com --- Xext/sync.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/Xext/sync.c b/Xext/sync.c index c00e692..314b63e 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -2322,6 +2322,14 @@ IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask) break; } } + /* +* We've been called exactly on the idle time, but we have a +* NegativeTransition trigger which requires a transition from an +* idle time greater than this. Schedule a wakeup for the next +* millisecond so we won't miss a transition. +*/ + if (XSyncValueEqual (idle, *pIdleTimeValueLess)) + AdjustWaitForDelay(wt, 1); } else if (pIdleTimeValueGreater) { -- 1.7.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] dix: fix crash when removing devices on a buttonless MD pointer (#29669)
On Mon, Aug 23, 2010 at 12:54:34AM -0700, Keith Packard wrote: On Mon, 23 Aug 2010 13:29:50 +1000, Peter Hutterer peter.hutte...@who-t.net wrote: If the master does not have a button class, recalculating the number of buttons required for this master dereferences a NULL pointer. Guard against this, if the master pointer doesn't have a button class, it doesn't need to update it's number of buttons. Don't you still need to send the event though? No, the event is only sent when the number of buttons on the master changes. If it doesn't change (i.e. because the master stays on no button class) then there's no need for the event. Note that this isn't the usual DeviceChangedEvent path that's triggered when the master updates itself from the slave. This path is triggered when a slave disappears and the master may need to re-adjust the number of buttons. If the number of buttons stay the same, no event is needed. Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] xfree86: use a thread for the generation of input events
Tiago Vignatti wrote: The current SIGIO signal handler method, used at generation of input events, has a bunch of oddities. This patch introduces an alternative way using a thread, which is used to select()s all input device file descriptors. Don't you have to make sure you use the right CFLAGS LDFLAGS for pthreads? Something like the XTHREADLIB XTHREAD_CFLAGS settings in libX11/configure.ac. You may be getting them by accident now, via this bit of the xserver configure.ac: if test x$GLX_USE_TLS = xyes -a x$AIGLX = xyes; then GLX_DEFINES=-DGLX_USE_TLS -DPTHREADS GLX_SYS_LIBS=$GLX_SYS_LIBS -lpthread fi But that doesn't match the flags used by libX11 on several platforms (-lpthread vs. -pthread on some BSD's, missing -D flags for posix threads on NetBSD, FreeBSD, Solaris - though using those may reduce performance on those platforms as all calls get redirected to thread-safe versions). -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg
Hi, On Tue, Aug 24, 2010 at 11:05:23AM +0800, ykzhao wrote: Maybe there is no definition of CLOCK_MONOTONIC_COARSE in /usr/include/bits/time.h when compiling the xorg. But the xorg is executed on the linux kernel that supports the CLOCK_MONOTONIC_COARSE posix timer.(In fact for most previous Linux distribution there is no definition of CLOCK_MONOTONIC_COARSE in /usr/include/bits/time.h). If it is executed on the kernel that doesn't support the CLOCK_MONOTONIC_COARSE timer, it will fallback to the CLOCK_MONOTOIC posix timer(the function of clock_getres will return the invalid value). Do we need to consider the above scenario? If the above scenario doesn't need to be cared, I will update the patch to assure that the CLOCK_MONOTONIC_COARSE posix timer will be tried only when there exists the corresponding definition. Why not just fix glibc to include the definition? If so, is there an approach that helps us to detect whether the CLOCK_MONOTONIC_COARSE posix timer is supported on one OS? Try the following completely untested patch (hey, it compiles). It's not perfect though: if CLOCK_MONOTONIC or CLOCK_MONOTONIC_COARSE were ever 0, we'd make two or three syscalls for GetTimeInMillis() instead of one, and if either of them were ~0L, we'd never use them. the corresponding code is put under the condition definition of MONOTONIC_CLOCK. This is already checked by using configure script. In theory the CLOCK_MONOTONIC exists if the MONOTONIC_CLOCK is defined. Not sure whether it is still necessary to check the CLOCK_MONOTONIC again? It was just an overly paranoid check to make sure that CLOCK_MONOTONIC actually works on the target system, as well as exists on the build system. I'm not sure if there's a Linux kernel we really support that doesn't have a working CLOCK_MONOTONIC, but I wasn't sure, so. I'd say CLOCK_MONOTONIC_COARSE - CLOCK_MONOTONIC - gettimeofday is the best order, given that it's in descending order of usefulness, but ascending order of likelihood of working. Cheers, Daniel signature.asc Description: Digital signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
libXt-1.0.8
Hi I've been trying to compile the libXt-1.0.8 library for my embedded system but keep getting the same error message. I downloaded the tar.gz archive and I run ./autogen.sh I get the next error message: ./configure: line 12618: syntax error near unexpected token 'XT, ' ./configure: line 12618: `PKG_CHECK_MODULES(XT, sm ice x11 xproto kbproto)` I checked some lines before and found: ./configure: line 4521: PKG_PROG_PKG_CONFIG: command not found It seems as if the pkgconfig packages is not installed but I believe it is installed, since I can type pkg-config --help and I get the help menu. I can see all the .pc files from different libraries under /usr/lib/pkgconfig Anyways I need to compile the Xt library in order to compile the ghostscript library. Any help would be appreciated. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel