Re: [PATCH xserver 15/24] kdrive/ephyr: Use NotifyFd for XCB connection input

2015-09-20 Thread Daniel Martin
On 21 September 2015 at 08:16, Keith Packard wrote: > Eliminates polling every 20ms for device input. > > Signed-off-by: Keith Packard > --- > hw/kdrive/ephyr/ephyr.c | 10 +- > hw/kdrive/ephyr/ephyr.h | 3 --- > hw/kdrive/ephyr/hostx.c | 6 ++ > hw/kdrive/ephyr/hostx.h | 2 ++ >

[PATCH xserver 12/24] config: Use NotifyFd interface for udev

2015-09-20 Thread Keith Packard
This uses the NotifyFd interface to monitor the udev file descriptor rather than adding another block/wakeup handler Signed-off-by: Keith Packard --- config/udev.c | 45 - 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/config/udev.c b/

[PATCH xserver 05/24] os/xdmcp: Remove dead 'restart' code

2015-09-20 Thread Keith Packard
The X server used to wait for the user to hit a key or move the mouse before restarting the session after a keepalive failure. This, presumably, was to avoid having the X server continuously spew XDMCP protocol on the network while the XDM server was dead. Switching into this state was removed fro

[PATCH xserver 22/24] os: Use NotifyFd interface for listen descriptors

2015-09-20 Thread Keith Packard
Replace the custom path for dealing with new incoming connections with the general-purpose NotifyFd API. Signed-off-by: Keith Packard --- include/os.h| 3 -- os/WaitFor.c| 4 --- os/connection.c | 104 +++- 3 files changed, 42 inser

[PATCH xserver 19/24] os/xdmcp: Replace xdmcp block/wakeup handlers with timer and NotifyFd

2015-09-20 Thread Keith Packard
This removes the block and wakeup handlers and replaces them with a combination of a NotifyFd callback and timers. Signed-off-by: Keith Packard --- os/xdmcp.c | 114 +++-- 1 file changed, 36 insertions(+), 78 deletions(-) diff --git a/os/x

[PATCH xserver 14/24] hw/kdrive: Use NotifyFd for kdrive input devices

2015-09-20 Thread Keith Packard
This switches the kdrive code to use FD notification for input devices, rather than the block and wakeup handlers. Signed-off-by: Keith Packard --- hw/kdrive/src/kinput.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/kdrive/src/kinput.c b/h

[PATCH xserver 04/24] Remove non-smart scheduler. Don't require setitimer.

2015-09-20 Thread Keith Packard
This allows the server to call GetTimeInMillis() after each request is processed to avoid needing setitimer. -dumbSched now turns off the setitimer. Signed-off-by: Keith Packard --- configure.ac| 2 +- dix/dispatch.c | 17 +++-- include/dix-config.h.in | 3 +++

[PATCH xserver 20/24] render: Use OsTimer for animated cursor timing

2015-09-20 Thread Keith Packard
This replaces the block/wakeup handlers with an OsTimer. This also avoids problems with performing rendering during the wakeup handler. Signed-off-by: Keith Packard --- render/animcur.c | 57 +--- 1 file changed, 30 insertions(+), 27 deletions(

[PATCH xserver 18/24] Xext/xselinux: Use NotifyFd interface

2015-09-20 Thread Keith Packard
Replace block/wakeup handlers with SetNotifyFd. Much nicer now. Signed-off-by: Keith Packard --- Xext/xselinux_hooks.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c index d9f2f68..2d85928 100644 --- a/Xext/xs

[PATCH xserver 06/24] os/xdmcp: Just send XDMCP keepalive packets once every three minutes

2015-09-20 Thread Keith Packard
There was a complicated scheme to increase the time between keepalives from 3 minutes up to as much as 24 hours in an attempt to reduce network traffic from idle X terminals. X terminals receiving X traffic, or receiving user input would use the 3 minute value; X terminals without any network traff

[PATCH xserver 07/24] os: Add NotifyFd interfaces

2015-09-20 Thread Keith Packard
This provides a callback-based interface to monitor file descriptors beyond the usual client and device interfaces. Modules within the server using file descriptors for reading and/or writing can call Bool SetNotifyFd(int fd, NotifyFdProcPtr notify_fd, int mask, void *data); mask can be any

[PATCH xserver 01/24] fonts: Continue when font calls return Suspended more than once

2015-09-20 Thread Keith Packard
Patch 3ab6cd31cbdf8095b2948034fce5fb645422d8da fixed Xinerama interactions with font servers by not putting clients to sleep multiple times. However, it introduced additional changes dealing with libXfont routine returning Suspended more than once for the same request. This additional change was to

[PATCH xserver 13/24] hw/kdrive: Use NotifyFd interface for kdrive/linux APM monitoring

2015-09-20 Thread Keith Packard
Replace the block/wakeup handlers with a NotifyFd callback Signed-off-by: Keith Packard --- hw/kdrive/linux/linux.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c index 73a8169..a52bdef 100644 --- a/hw/kdri

[PATCH xserver 10/24] dix: Switch to the libXfont2 API (v2)

2015-09-20 Thread Keith Packard
This new libXfont API eliminates exposing internal X server symbols to the font library, replacing those with a struct full of the entire API needed to use that library. v2: Use libXfont2 instead of libXfont_2 Signed-off-by: Keith Packard --- Xext/xf86bigfont.c | 4 +- configure.ac

[PATCH xserver 16/24] modesetting: Use NotifyFd for drm event monitoring

2015-09-20 Thread Keith Packard
Replace the block/wakeup handlers with a NotifyFd callback. Signed-off-by: Keith Packard --- hw/xfree86/drivers/modesetting/vblank.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/vblank.c b/hw/xfree86/drivers/modesetting/vbl

[PATCH xserver 17/24] hw/xwayland: Use NotifyFd handler to monitor wayland socket

2015-09-20 Thread Keith Packard
Replace the block/wakeup handler with a NotifyFd callback instead. Signed-off-by: Keith Packard --- hw/xwayland/xwayland.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index bc92beb..685e352 100644 --- a/

[PATCH xserver 03/24] Xext, os: Remove OS-internal usages within XACE and XSELinux

2015-09-20 Thread Keith Packard
These extensions were accessing internal OS functions and structures. Expose the necessary functionality to them and remove their use of osdep.h Signed-off-by: Keith Packard --- Xext/xace.c | 13 ++--- Xext/xselinux_hooks.c | 1 - include/os.h | 7 +++ os/access.

[PATCH xserver 11/24] config: Use NotifyFd for dbus interface

2015-09-20 Thread Keith Packard
This uses the NotifyFd interface to monitor the dbus socket rather than a block/wakeup handler. Signed-off-by: Keith Packard --- config/dbus-core.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/config/dbus-core.c b/config/dbus-core.c index 8351ea4..3c85ad7

[PATCH xserver 24/24] Remove fd_set from Block/Wakeup handler API

2015-09-20 Thread Keith Packard
This removes the last uses of fd_set from the server interfaces outside of the OS layer itself. Signed-off-by: Keith Packard --- Xext/sleepuntil.c | 17 +++-- Xext/sync.c | 12 ++-- dix/dixfonts.c | 7 +++ dix/dixutils.c

[PATCH xserver 00/24] Eliminate fd_set from non-OS code

2015-09-20 Thread Keith Packard
Here's the latest version of the patch set to make the non-OS bits of the X server stop using fd_set. ___ 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 08/24] os: Implement support for NotifyFd X_NOTIFY_WRITE

2015-09-20 Thread Keith Packard
This adds the ability to be notified when a file descriptor is available for writing. Signed-off-by: Keith Packard --- os/WaitFor.c| 30 -- os/connection.c | 40 +++- os/io.c | 8 os/osdep.h | 5 - 4

[PATCH xserver 09/24] dix: Move InitFonts up above screen initialization

2015-09-20 Thread Keith Packard
Font initialization was split into two stages, the first was to set up font privates with a call to ResetFontPrivateIndex, then much later the call to InitFonts to set up all of the FPEs. Doing the full font initialization before initializing the video drivers means that we can move the call to Res

[PATCH xserver 21/24] hw/xfree86: Use NotifyFd for device and other input fd wakeups

2015-09-20 Thread Keith Packard
Remove code in xf86Wakeup for dealing with device and other input and switch to using the new NotifyFd interface. Signed-off-by: Keith Packard --- hw/xfree86/common/xf86Events.c | 67 -- 1 file changed, 26 insertions(+), 41 deletions(-) diff --git a/hw/xf

[PATCH xserver 15/24] kdrive/ephyr: Use NotifyFd for XCB connection input

2015-09-20 Thread Keith Packard
Eliminates polling every 20ms for device input. Signed-off-by: Keith Packard --- hw/kdrive/ephyr/ephyr.c | 10 +- hw/kdrive/ephyr/ephyr.h | 3 --- hw/kdrive/ephyr/hostx.c | 6 ++ hw/kdrive/ephyr/hostx.h | 2 ++ hw/kdrive/ephyr/os.c| 1 - 5 files changed, 17 insertions(+), 5 d

[PATCH xserver 23/24] Remove readmask from screen block/wakeup handler

2015-09-20 Thread Keith Packard
With no users of the interface needing the readmask anymore, we can remove it from the argument passed to these functions. Signed-off-by: Keith Packard --- composite/compalloc.c | 4 ++-- dix/dixutils.c | 14 ++ exa/exa.c

[PATCH xserver 02/24] Xext/xselinux: Warning fixes

2015-09-20 Thread Keith Packard
There's a 'const char *' adventure here that I'm mostly ignoring; some client information gets const poisoned. Worked around by adding a couple of casts. Ick. Added an _X_ATTRIBUTE_PRINTF to SELinuxLog. Ignore a couple of unused return values. Signed-off-by: Keith Packard --- Xext/xselinux_hoo