Re: [PATCH xserver] glamor: Cannot use copies when accessing outside of composite source

2016-05-27 Thread Keith Packard
Michel Dänzer writes: > You know the details better than I do, but my understanding is that the > region can only be clipped to the destination in general, because > accessing source pictures outside of their boundaries is defined such > that it can change the contents of the

Re: [PATCH xserver 17/23] os: Add ospoll interface

2016-05-27 Thread Keith Packard
Emil Velikov writes: > Hi Keith, > > Style question: do you/how many others refer having separate functions for > of ifdeffed code each vs a single with all the ifdeffs. Or in other words > having func_foo_poll and func_foo_epoll as opposed to having it all in >

[PATCH xserver] xfree86: Remove event reading code from xf86Wakeup

2016-05-27 Thread Keith Packard
Oops. This didn't get removed when xfree86 was converted over to use the input thread. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/common/xf86Events.c | 28 1 file changed, 28 deletions(-) diff --git a/hw/xfree86/common/xf86Events.c b/hw/x

[PATCH xserver] dix: Don't update current time in the middle of input event processing

2016-05-27 Thread Keith Packard
te...@who-t.net> cc: Adam Jackson <a...@redhat.com> Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/enterleave.c | 1 - dix/events.c | 1 - 2 files changed, 2 deletions(-) diff --git a/dix/enterleave.c b/dix/enterleave.c index 0c6c616..1b341f2 100644 --- a/dix/enterleave.

Re: [PATCH xserver] glamor: Adjust for drawable x/y in composite's copy optimization

2016-05-27 Thread Keith Packard
Alex Deucher <alexdeuc...@gmail.com> writes: >> Signed-off-by: Keith Packard <kei...@keithp.com> > > Reviewed-by: Alex Deucher <alexander.deuc...@amd.com> Merged. 0d16a0c..8b9b438 master -> master -- -keith signatu

Re: [PATCH xserver] glamor: Cannot use copies when accessing outside of composite source

2016-05-27 Thread Keith Packard
Michel Dänzer writes: > From: Michel Dänzer > > Commit b64108fa ("glamor: Check for composite operations which are > equivalent to copies") failed to copy conditions from exaComposite which > ensure that the composite operation doesn't access outside

Re: [PATCH xserver 2/2] xfree86/modes: Don't set xf86_config->cursor if loading the cursor fails

2016-05-27 Thread Keith Packard
_config->cursor is supposed to be a temporary field until drivers are converted over to xf86CurrentCursor, which doesn't care whether the cursor is HW or SW. Nacked-by: Keith Packard <kei...@keithp.com> -- -keith signature.asc Description: PGP signature _

Re: [PATCH xserver 1/2] xfree86/modes: Assign xf86_config->cursor in xf86_load_cursor_image

2016-05-27 Thread Keith Packard
e at the top of xf86_load_cursor_image instead of the bottom. Otherwise, this patch is Reviewed-by: Keith Packard <kei...@keithp.com> -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http:/

[PATCH xserver] glamor: Adjust for drawable x/y in composite's copy optimization

2016-05-27 Thread Keith Packard
the drawable x/y values. Signed-off-by: Keith Packard <kei...@keithp.com> --- glamor/glamor_render.c | 4 1 file changed, 4 insertions(+) diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 9c5cca6..165bced 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_re

Re: [PATCH xserver] os: Increase default client buffer to 16kB

2016-05-27 Thread Keith Packard
Hans de Goede <hdego...@redhat.com> writes: >> Signed-off-by: Keith Packard <kei...@keithp.com> > > Ack. > > Reviewed-by: Hans de Goede <hdego...@redhat.com> Pushed. 7147361..0d16a0c master -> master -- -keith s

Re: [PATCH xserver 1/9] xfree86: Set xf86CrtcConfigRec cursor pointer to NULL in HideCursor

2016-05-27 Thread Keith Packard
Michel Dänzer writes: > [ Unknown signature status ] > > The patch is > > Reviewed-by: Michel Dänzer Thanks. Pushed. e69061e..7147361 master -> master -- -keith signature.asc Description: PGP signature

Re: xserver: Branch 'master' - 10 commits

2016-05-27 Thread Keith Packard
Michel Dänzer <mic...@daenzer.net> writes: > On 27.05.2016 08:08, Keith Packard wrote: >> >> commit f84703b50cc908a127f4ad923ebbf56f8f244c0d >> Author: Keith Packard <kei...@keithp.com> >> Date: Tue Dec 8 14:20:21 2015 -0800 >> >> dix: R

[PATCH xserver 20/23] os: Use poll(2) for input thread

2016-05-26 Thread Keith Packard
Replace use of select(2) to avoid fd limits Signed-off-by: Keith Packard <kei...@keithp.com> --- os/inputthread.c | 85 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/os/inputthread.c b/os/inputthread.c index b

[PATCH xserver 17/23] os: Add ospoll interface

2016-05-26 Thread Keith Packard
This provides a wrapper around poll, epoll or WSAPoll providing a callback-based interface for monitoring activity on a large set of file descriptors. Signed-off-by: Keith Packard <kei...@keithp.com> --- configure.ac| 2 +- include/dix-config.h.in | 9 + os/Makef

[PATCH xserver 22/23] Allow 1024 and 2048 for LimitClients

2016-05-26 Thread Keith Packard
There's no reason not to offer ridiculous numbers of clients; only a few static data structures are arrays of this length. Signed-off-by: Keith Packard <kei...@keithp.com> --- include/misc.h | 2 +- os/utils.c | 6 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/i

[PATCH xserver 15/23] dix: Intermediate GrabServer state 'GrabKickout' not needed

2016-05-26 Thread Keith Packard
g call, we will always hit WaitForSomething after finishing the current client, and so don't need any special case here. Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dispatch.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch

[PATCH xserver 10/23] dmx: Eliminate use of AddEnabledDevice

2016-05-26 Thread Keith Packard
Use SetNotifyFd instead, with the hope that someday someone will come fix this to be more efficient -- right now, the wakeup handler is doing the event reading, instead of the notify callback. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/dmx/input/dmxcommon.

[PATCH xserver 21/23] os: eliminate fd value limits for clients

2016-05-26 Thread Keith Packard
With no code depending on the range of file descriptors, checking for that can be eliminated. Signed-off-by: Keith Packard <kei...@keithp.com> --- os/connection.c | 81 - os/osdep.h | 43 +- 2 files c

[PATCH xserver 19/23] os: Switch server to poll(2)

2016-05-26 Thread Keith Packard
Eliminates all of the fd_set mangling in the server main thread Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dispatch.c | 4 + include/dixstruct.h | 25 os/WaitFor.c| 157 +++-- os/connection.c

[PATCH xserver 03/23] xfree86: Switch from select(2) to poll(2)

2016-05-26 Thread Keith Packard
xf86WaitForInput and the xf86 SIGIO handling code. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/common/xf86Events.c | 1 - hw/xfree86/os-support/shared/posix_tty.c | 33 ++--- hw/xfree86/os-support/shared/sigio.c

[PATCH xserver 06/23] hw/xfree86: Use NotifyFd for other input fd wakeups

2016-05-26 Thread Keith Packard
Remove code in xf86Wakeup for dealing with other input and switch to using the new NotifyFd interface. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/common/xf86Events.c | 76 -- 1 file changed, 22 insertions(+), 54 deletions(-)

[PATCH xserver 16/23] os: Compute timeout in milliseconds instead of struct timeval

2016-05-26 Thread Keith Packard
-off-by: Keith Packard <kei...@keithp.com> --- include/os.h | 3 +-- os/WaitFor.c | 32 ++-- os/utils.c | 21 - 3 files changed, 23 insertions(+), 33 deletions(-) diff --git a/include/os.h b/include/os.h index 51400a9..25e02bf 100644 --- a/i

[PATCH xserver 18/23] dix: Use list for ready clients

2016-05-26 Thread Keith Packard
This converts the dispatch loop into using a list of ready clients instead of an array. This changes the WaitForSomething API so that it notifies DIX when a client becomes ready to read, instead of returning the set of ready clients. Signed-off-by: Keith Packard <kei...@keithp.com> --

[PATCH xserver 08/23] hw/kdrive: Use passed-in fd for kdrive/linux APM monitoring [v2]

2016-05-26 Thread Keith Packard
This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/kdrive/linux/linux.c | 64 - 1 file changed, 31 insertions(+), 33 deletions(-) diff

[PATCH xserver 14/23] dix/os: Merge priority computation into SmartScheduleClient

2016-05-26 Thread Keith Packard
Instead of having scheduling done in two places (one in WaitForSomething, and the other in SmartScheduleClient), just stick all of the scheduling in SmartScheduleClient. Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dispatch.c | 22 -- os/WaitFor.c

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

2016-05-26 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 <kei...@keithp.com> --- composite/compalloc.c | 4 +-- dix/dixutils.c | 18 -

[PATCH xserver 01/23] dix: Switch to the libXfont2 API (v2)

2016-05-26 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 <kei...@keithp.com> --- Xext/xf86bigfont.c

[PATCH xserver 00/23] Switch server to poll/epoll

2016-05-26 Thread Keith Packard
Ok, I've reworked this patch series to try and have it make some semblance of sense. There's two scary patches, 18/23 and 19/23; everything else is pretty self contained. The first patch flips to the new font API: [PATCH xserver 01/23] dix: Switch to the libXfont2 API (v2) Then changes

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

2016-05-26 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 <kei...@keithp.com> --- Xext/sleepuntil.c | 17 +++-- Xext/sync.c | 12 ++-- dix/dixfonts.c

[PATCH xserver 13/23] Remove AddEnabledDevice and AddGeneralSocket APIs

2016-05-26 Thread Keith Packard
All uses of these interfaces should instead be using the NotifyFd API instead. Signed-off-by: Keith Packard <kei...@keithp.com> --- include/os.h| 8 os/WaitFor.c| 4 +--- os/connection.c | 43 --- 3 files changed, 9 insertions(

[PATCH xserver 04/23] dmx: Switch from select(2) to poll(2) for input

2016-05-26 Thread Keith Packard
Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/dmx/input/lnx-ms.c | 19 ++- hw/dmx/input/lnx-ps2.c | 12 +--- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/hw/dmx/input/lnx-ms.c b/hw/dmx/input/lnx-ms.c index 621f0fe..3d028be 100644 --- a/

[PATCH xserver 23/23] os: Leave stdin and stdout open

2016-05-26 Thread Keith Packard
There's no reason to close these now that we don't care what file descriptors we use. Signed-off-by: Keith Packard <kei...@keithp.com> --- os/osinit.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/os/osinit.c b/os/osinit.c index 6ec2f11..e269957 100644 --- a/os/osinit.c

[PATCH xserver 05/23] os: Switch from select(2) to poll(2) in ErrorConnMax

2016-05-26 Thread Keith Packard
This avoids problems if the file descriptor is too large for select(2) Signed-off-by: Keith Packard <kei...@keithp.com> --- os/connection.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/os/connection.c b/os/connection.c index 4c1ba4b..488672c 100644 --

[PATCH xserver 09/23] modesetting: Use passed-in fd for drm event monitoring NotifyFd callback

2016-05-26 Thread Keith Packard
This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/drivers/modesetting/vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/drivers/modes

[PATCH xserver 02/23] kdrive: switch from select(2) to poll(2)

2016-05-26 Thread Keith Packard
This avoids fd limits Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/kdrive/fake/mouse.c | 1 - hw/kdrive/linux/evdev.c | 14 +- hw/kdrive/linux/mouse.c | 34 +- hw/kdrive/linux/ms.c| 13 + hw/kdrive/linux/ps2.c

[PATCH xserver] os: Increase default client buffer to 16kB

2016-05-26 Thread Keith Packard
This matches a change made in xcb and improves performance for a small increase in memory usage. Signed-off-by: Keith Packard <kei...@keithp.com> --- os/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/io.c b/os/io.c index 19a449a..d04ebd8 100644 --- a/o

[PATCH xserver] dix: Call screen block/wakeup handlers closest to blocking [v3]

2016-05-26 Thread Keith Packard
. As the screen block handler is now called last, we have to use that instead of a registered block/wakeup handler to make sure the GL rendering is done before we copy it to the front buffer. Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dixutils.c

Re: API for using poll/epoll instead of select

2016-05-26 Thread Keith Packard
Adam Jackson writes: > Exposing edge/level in ospoll_add is a bit funky, you're silently > degrading edge to level if the OS backend can't do edge. kqueue could do > it if the code were written, and I suspect win32's WaitForMultipleObjects > could be made to do it if we got really

Re: [PATCH xserver 1/3] glamor: Disable logic ops when doing compositing [v3]

2016-05-26 Thread Keith Packard
Michel Dänzer writes: > The glamor_set_composite_texture related change in this patch needs to > be moved to patch 3, or this patch fails to build. With that fixed, > patches 1 & 2 are That was also mentioned by Emil Velikov and was fixed in [v4] 1/3 and [v2] 3/3 >

Re: [PATCH xserver 1/9] xfree86: Set xf86CrtcConfigRec cursor pointer to NULL in HideCursor

2016-05-26 Thread Keith Packard
Peter Hutterer <peter.hutte...@who-t.net> writes: >> Signed-off-by: Keith Packard <kei...@keithp.com> > > Acked-by: Peter Hutterer <peter.hutte...@who-t.net> Merged. b64108f..f5670b4 master -> master -- -keith signatu

Performance benefit of epoll over poll

2016-05-26 Thread Keith Packard
epoll is designed to reduce the cost of having many file descriptors in a process which are mostly idle. The kernel only reports data about active descriptors. I changed MAXCLIENTS from 512 to 2048 so I could get some 'worst case' measurements. I figured x11perf -noop would be a nice test, and

Re: [PATCH xserver 3/4] dix: Convert ResourceClientBits to a variable

2016-05-26 Thread Keith Packard
see any benefit there. Reviewed-by: Keith Packard <kei...@keithp.com> -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel

API for using poll/epoll instead of select

2016-05-25 Thread Keith Packard
© 2016 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice

[PATCH xserver 24/25] dmx: Switch from select(2) to poll(2) for input

2016-05-24 Thread Keith Packard
Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/dmx/input/lnx-ms.c | 19 ++- hw/dmx/input/lnx-ps2.c | 12 +--- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/hw/dmx/input/lnx-ms.c b/hw/dmx/input/lnx-ms.c index 621f0fe..3d028be 100644 --- a/

[PATCH xserver 22/25] kdrive: switch from select(2) to poll(2)

2016-05-24 Thread Keith Packard
This avoids fd limits Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/kdrive/fake/mouse.c | 1 - hw/kdrive/linux/evdev.c | 14 +- hw/kdrive/linux/mouse.c | 34 +- hw/kdrive/linux/ms.c| 13 + hw/kdrive/linux/ps2.c

[PATCH xserver 25/25] os: eliminate fd value limits for clients

2016-05-24 Thread Keith Packard
With no code depending on the range of file descriptors, checking for that can be eliminated. Signed-off-by: Keith Packard <kei...@keithp.com> --- os/connection.c | 74 - os/osdep.h | 37 ++--- 2 files c

[PATCH xserver 20/25] os: Generalize poll fd management code

2016-05-24 Thread Keith Packard
We want to use this in the input thread too Signed-off-by: Keith Packard <kei...@keithp.com> --- os/WaitFor.c| 10 ++--- os/connection.c | 123 ++-- os/osdep.h | 29 +++-- os/utils.c

[PATCH xserver 07/25] dix: Call screen block/wakeup handlers closest to blocking [v2]

2016-05-24 Thread Keith Packard
and not unwrapping. And composite might as well join in that fun, just to make things consistent. [v2] Unwrap BlockHandler in shadowCloseScreen (ajax) Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dixutils.c| 16 glamor/glamor.c | 6 +++--- miext/

[PATCH xserver 15/25] Modify ready_client list directly from WaitForSomething

2016-05-24 Thread Keith Packard
This changes the WaitForSomething API so that it only notifies DIX when a client becomes ready to read. This avoids walking over all existing ready clients to compute the total set each time. Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dispatch.c

[PATCH xserver 18/25] os: Eliminate code managing fd_set masks for WaitForSomething

2016-05-24 Thread Keith Packard
This gets rid of all of the fd_set masks used while the server is running. Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dispatch.c | 4 ++ include/dixstruct.h | 29 os/WaitFor.c| 1 - os/connection.c

[PATCH xserver 13/25] dix/os: Merge priority computation into SmartScheduleClient

2016-05-24 Thread Keith Packard
Instead of having scheduling done in two places (one in WaitForSomething, and the other in SmartScheduleClient), just stick all of the scheduling in SmartScheduleClient. Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dispatch.c | 17 ++--- os/WaitFor.c

[PATCH xserver 04/25] modesetting: Use passed-in fd for drm event monitoring NotifyFd callback

2016-05-24 Thread Keith Packard
This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/drivers/modesetting/vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/drivers/modes

[PATCH xserver 16/25] ephyr: Use screen block handler for flushing changes

2016-05-24 Thread Keith Packard
ephyr needs to make sure it calls glXSwapBuffers after glamor finishes its rendering. As the screen block handler is now called last, we have to use that instead of a registered block/wakeup handler to make sure the GL rendering is done before we copy it to the front buffer. Signed-off-by: Keith

[PATCH xserver 01/25] hw/xfree86: Use NotifyFd for other input fd wakeups

2016-05-24 Thread Keith Packard
Remove code in xf86Wakeup for dealing with other input and switch to using the new NotifyFd interface. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/common/xf86Events.c | 76 -- 1 file changed, 22 insertions(+), 54 deletions(-)

[PATCH xserver 05/25] Remove readmask from screen block/wakeup handler

2016-05-24 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 <kei...@keithp.com> --- composite/compalloc.c | 4 +-- dix/dixutils.c | 14 doc/Xinp

[PATCH xserver 02/25] dix: Switch to the libXfont2 API (v2)

2016-05-24 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 <kei...@keithp.com> --- Xext/xf86bigfont.c

[PATCH xserver 03/25] hw/kdrive: Use passed-in fd for kdrive/linux APM monitoring [v2]

2016-05-24 Thread Keith Packard
This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/kdrive/linux/linux.c | 64 - 1 file changed, 31 insertions(+), 33 deletions(-) diff

[PATCH xserver 17/25] os: use poll(2) instead of select(2)

2016-05-24 Thread Keith Packard
This leaves all of the select file descriptor bashing in place, and just adds the necessary hooks to compute the poll data as well. Signed-off-by: Keith Packard <kei...@keithp.com> --- os/WaitFor.c| 143 ++--- os/connection.c

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

2016-05-24 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 <kei...@keithp.com> --- Xext/sleepuntil.c | 17 +++-- Xext/sync.c | 12 ++-- dix/dixfonts.c

[PATCH xserver 12/25] dix: Use list for ready clients

2016-05-24 Thread Keith Packard
This converts the dispatch loop into using a list of ready clients instead of an array. For now, that list is constructed from the array returned by WaitForSomething. Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dispatch.c

[PATCH xserver 09/25] dmx: Eliminate use of AddEnabledDevice

2016-05-24 Thread Keith Packard
Use SetNotifyFd instead, with the hope that someday someone will come fix this to be more efficient -- right now, the wakeup handler is doing the event reading, instead of the notify callback. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/dmx/input/dmxcommon.

[PATCH xserver 14/25] dix: Intermediate GrabServer state 'GrabKickout' not needed

2016-05-24 Thread Keith Packard
g call, we will always hit WaitForSomething after finishing the current client, and so don't need any special case here. Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dispatch.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch

[PATCH xserver 11/25] Remove AddEnabledDevice and AddGeneralSocket APIs

2016-05-24 Thread Keith Packard
All uses of these interfaces should instead be using the NotifyFd API instead. Signed-off-by: Keith Packard <kei...@keithp.com> --- include/os.h| 8 os/WaitFor.c| 4 +--- os/connection.c | 23 --- 3 files changed, 5 insertions(+), 30 deletions(-)

[PATCH xserver 23/25] xfree86: Switch from select(2) to poll(2)

2016-05-24 Thread Keith Packard
xf86WaitForInput and the xf86 SIGIO handling code. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/common/xf86Events.c | 1 - hw/xfree86/os-support/shared/posix_tty.c | 33 ++--- hw/xfree86/os-support/shared/sigio.c

Re: [PATCH xserver 1/2] xwayland: Move sprite invalidation logic into mipointer

2016-05-19 Thread Keith Packard
Emil Velikov writes: >> +/* Invalidate current sprite, forcing reload on next >> + * sprite setting (window crossing, grab action, etc) >> + */ >> +extern _X_EXPORT void >> +miPointerInvalidateSprite(DeviceIntPtr pDev); >> + > It doesn't look like this should be

Re: [PATCH xserver 08/11] kdrive/ephyr: Poll for events in block handler

2016-05-19 Thread Keith Packard
Laércio de Sousa writes: > Could it be related somehow to my concerns in > https://patchwork.freedesktop.org/patch/86328 ? I don't think so -- my patch only changes where the FD is read, not when that FD is added to the select call. Your patch looks

Re: [PATCH 1/4] Remove CLTS code

2016-05-18 Thread Keith Packard
Adam Jackson <a...@redhat.com> writes: > Never been used, as far as I can tell. All seem like fine changes to me, although I'd rather see people working to just stop using Xtrans entirely... For the series: Reviewed-by: Keith Packard <kei...@keithp.com> -- -keith signature.

[PATCH xserver 01/11] hw/xfree86: Use NotifyFd for other input fd wakeups

2016-05-18 Thread Keith Packard
Remove code in xf86Wakeup for dealing with other input and switch to using the new NotifyFd interface. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/common/xf86Events.c | 76 -- 1 file changed, 22 insertions(+), 54 deletions(-)

[PATCH xserver 2/2] mi: Remove miPointerRec from API

2016-05-18 Thread Keith Packard
This moves the definition of miPointerRec from mipointrst.h to mipointer.c so that it is no longer visible in the API, allowing it to be changed while the API/ABI is frozen. Signed-off-by: Keith Packard <kei...@keithp.com> --- mi/mipointer.c | 12 mi/mipointrst.

[PATCH xserver 02/11] dix: Switch to the libXfont2 API (v2)

2016-05-18 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 <kei...@keithp.com> --- Xext/xf86bigfont.c

[PATCH 0/2] Hide pointer invalidation details from xwayland

2016-05-18 Thread Keith Packard
Here's a couple of patches which makes miPointerRec private to the miPointer code; the only user of that struct was Xwayland which used it to invalidate the current sprite. An API is provided to perform that invalidation, and then the struct definition is removed from the API.

[PATCH xserver 11/11] Remove AddEnabledDevice and AddGeneralSocket APIs

2016-05-18 Thread Keith Packard
All uses of these interfaces should instead be using the NotifyFd API instead. Signed-off-by: Keith Packard <kei...@keithp.com> --- include/os.h| 8 os/WaitFor.c| 4 +--- os/connection.c | 23 --- 3 files changed, 5 insertions(+), 30 deletions(-)

[PATCH xserver 05/11] Remove readmask from screen block/wakeup handler

2016-05-18 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 <kei...@keithp.com> --- composite/compalloc.c | 4 +-- dix/dixutils.c | 14 doc/Xinp

[PATCH xserver 10/11] xnest: Use SetNotifyFd to receive events

2016-05-18 Thread Keith Packard
Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xnest/Init.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index bec2c51..e8a700e 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -35,6 +35,7 @@ is" with

[PATCH xserver 09/11] dmx: Eliminate use of AddEnabledDevice

2016-05-18 Thread Keith Packard
Use SetNotifyFd instead, with the hope that someday someone will come fix this to be more efficient -- right now, the wakeup handler is doing the event reading, instead of the notify callback. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/dmx/input/dmxcommon.

[PATCH xserver 00/11] Eliminate fd_set from server ABI/API

2016-05-18 Thread Keith Packard
This series builds on the input-thread changes and eliminates the 'fd_set' type outside of the OS layer, along with the AddEnabledDevice and AddGeneralSocket APIs. My eventual goal is to replace select with epoll on linux and the equvalent for BSD so that we no longer care what fd values are used

[PATCH xserver 1/2] xwayland: Move sprite invalidation logic into mipointer

2016-05-18 Thread Keith Packard
This creates a function that invalidates the current sprite and forces a sprite image reload the next time the sprite is checked, moving that logic out of the xwayland sources and allowing the miPointerRec structure to be removed from the server API. Signed-off-by: Keith Packard <

[PATCH xserver 04/11] modesetting: Use passed-in fd for drm event monitoring NotifyFd callback

2016-05-18 Thread Keith Packard
This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/drivers/modesetting/vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/drivers/modes

[PATCH xserver 07/11] dix: Call screen block/wakeup handlers closest to blocking [v2]

2016-05-18 Thread Keith Packard
and not unwrapping. And composite might as well join in that fun, just to make things consistent. [v2] Unwrap BlockHandler in shadowCloseScreen (ajax) Signed-off-by: Keith Packard <kei...@keithp.com> --- dix/dixutils.c| 16 glamor/glamor.c | 6 +++--- miext/

[PATCH xserver 03/11] hw/kdrive: Use passed-in fd for kdrive/linux APM monitoring [v2]

2016-05-18 Thread Keith Packard
This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/kdrive/linux/linux.c | 64 - 1 file changed, 31 insertions(+), 33 deletions(-) diff

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

2016-05-18 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 <kei...@keithp.com> --- Xext/sleepuntil.c | 17 +++-- Xext/sync.c | 12 ++-- dix/dixfonts.c

[PATCH xserver 08/11] kdrive/ephyr: Poll for events in block handler

2016-05-18 Thread Keith Packard
With the driver block handler guaranteed to be the last thing called before the server blocks, we can now reliably check for events there and never block with events read but not processed. Signed-off-by: Keith Packard <kei...@keithp.com> --- hw/kdrive/ephyr/ephyr.c | 14

Re: [PATCH xserver 2/9] Remove SIGIO support for input [v3]

2016-05-18 Thread Keith Packard
Peter Hutterer writes: > f9c58cdf8b51 and 59bba16c have my rev-by and the revised v5 > (f2161ee249c1b6806) as well, this is as close as I'm going to get to review > those anyway ;) Thanks. I've pushed an updated version of the branch. Just one more to review, the

Re: [PATCH xserver 1/3] glamor: Disable logic ops when doing compositing [v3]

2016-05-16 Thread Keith Packard
Michel Dänzer writes: > https://bugs.freedesktop.org/show_bug.cgi?id=63397#c24 Some day I'll think to look at bugzilla when I fix a bug :-) I've added a comment and copy of the patch to that bug. -- -keith signature.asc Description: PGP signature

Re: [PATCH xserver 7/9] dix: Reallocate touchpoint buffer at input event time

2016-05-16 Thread Keith Packard
Peter Hutterer writes: > fwiw, that first sentence isn't correct anymore, you can drop it. > rev-by still stands. I've edited the comment, along with re-adding the UseSIGIO option to the parsing code and pushed out an updated thread with all of your kind Rb/Ab lines

Re: [PATCH xserver 2/9] Remove SIGIO support for input [v3]

2016-05-16 Thread Keith Packard
Peter Hutterer writes: Thanks for taking a look at these. This one is less mechanical than I'd like, so some of the changes aren't obvious. It's definitely good to review them carefully. >> KdNotifyFd(int fd, int ready, void *data) >> { >> int i = (int)

Re: [PATCH xserver 1/3] glamor: Disable logic ops when doing compositing [v3]

2016-05-15 Thread Keith Packard
Emil Velikov writes: > This hunk should be in 3/3, shouldn't it ? Yup, thanks for the catch! Series re-pushed to my 'render-fixes' branch, no change in the final version. -- -keith signature.asc Description: PGP signature

Re: [PATCH xserver 1/3] glamor: Disable logic ops when doing compositing [v3]

2016-05-15 Thread Keith Packard
Hans de Goede writes: > Note I've not actually tested if these patches fix the issues at > hand, I've only run my normal stuff and did not notice any > regressions. I'm surprised no-one else has noticed the problems with libreoffice; random bits of GUI text rendered as

Re: [PATCH xserver] glamor: Disable logic ops when doing compositing

2016-05-14 Thread Keith Packard
Eric Anholt writes: > Oh, yeah. Even better. And a v3 which catches the other place where GL_BLEND is getting set. Sent that under a separate cover along with a more complicated patch for the red/alpha swizzling stuff. -- -keith signature.asc Description: PGP signature

Re: [PATCH] glamor: swizzle RED to 0 for alpha textures.

2016-05-14 Thread Keith Packard
Keith Packard <kei...@keithp.com> writes: > And, loading a page from gfycat is broken by this change. > > firefox https://gfycat.com/HoarseCheapAmericankestrel > > So, we can either have feedly with black text or gfycat with > cat videos, but not both at the same time.

[PATCH xserver 1/3] glamor: Disable logic ops when doing compositing [v3]

2016-05-14 Thread Keith Packard
If the logic op gets left enabled, it overrides the blending operation, causing incorrect contents on the display. v2: Disable only on non-ES2, but disable even for PictOpSrc v3: Found another place this is needed in glamor_composite_set_shader_blend Signed-off-by: Keith Packard <

[PATCH xserver 3/3] glamor: Preserve GL_RED bits in R channel when destination is GL_RED

2016-05-14 Thread Keith Packard
://gfycat.com/HoarseCheapAmericankestrel while not breaking rendering for this page: https://feedly.com Signed-off-by: Keith Packard <kei...@keithp.com> --- glamor/glamor.c | 36 glamor/glamor_composite_glyphs.c | 3 +-- glamor/glamor_

[PATCH xserver 2/3] glamor: glamor_make_current sooner in glamor_composite_with_shader

2016-05-14 Thread Keith Packard
glamor_make_current is supposed to be called before any GL APIs. Signed-off-by: Keith Packard <kei...@keithp.com> --- glamor/glamor_render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index ea9abc7..1e03ca0

Re: [PATCH] glamor: swizzle RED to 0 for alpha textures.

2016-05-13 Thread Keith Packard
Dave Airlie writes: > From: Dave Airlie > > I'm pretty sure Eric suspected this could cause a problem, and > we couldn't find a test. Well loading feedly in firefox seems > to trigger badness that this solves. And, loading a page from gfycat is broken by

Re: [PATCH xserver] glamor: Disable logic ops when doing compositing

2016-05-13 Thread Keith Packard
Markus Wick writes: > Hi, > > AFAIK we disable logic ops after each usage, so this seems a bit > redundant to me. Did we miss one usages? Nope, GL_COLOR_LOGIC_OP isn't managed like other glEnable/glDisable pairs; it's left at the previous value. Someday we should figure out

Re: [PATCH xserver] glamor: Disable logic ops when doing compositing

2016-05-13 Thread Keith Packard
Eric Anholt <e...@anholt.net> writes: > Keith Packard <kei...@keithp.com> writes: > >> If the logic op gets left enabled, it overrides the blending >> operation, causing incorrect contents on the display. >> >> Signed-off-by: Keith Packard <kei..

[PATCH xserver] glamor: Disable logic ops when doing compositing

2016-05-13 Thread Keith Packard
If the logic op gets left enabled, it overrides the blending operation, causing incorrect contents on the display. Signed-off-by: Keith Packard <kei...@keithp.com> --- glamor/glamor_program.c | 1 + 1 file changed, 1 insertion(+) diff --git a/glamor/glamor_program.c b/glamor/glamor_pro

Re: [PATCH xserver 5/9] Create a threaded mechanism for input [v5]

2016-05-12 Thread Keith Packard
Emil Velikov writes: > The commit summary does not mention anything, just the revision log > suggests "linux only". Worth adding a couple of words to clarify > things ? good point, I reworded the 'v2' comment to say: v2: Fix non-Xorg link. Enable where supported by

Re: [PATCH xserver] Use separate name for --with-bundle-version help variable

2016-05-12 Thread Keith Packard
Jeremy Huddleston Sequoia writes: > I actually already had a patch for that on my branch and just hadn't gotten > around to sending it, sorry: > > > https://github.com/XQuartz/xorg-server/commit/eb7c1e7fb16338d8fc03a0bb0f9bb53eb99ee139 > > I ended up just getting rid of

Re: [PATCH RESEND xserver v3] xfree86: Immediately handle failure to set HW cursor

2016-05-12 Thread Keith Packard
Alexandre Courbot <acour...@nvidia.com> writes: > Signed-off-by: Alexandre Courbot <acour...@nvidia.com> > Cc: Michael Thayer <michael.tha...@oracle.com> Reviewed-by: Keith Packard <kei...@keithp.com> -- -keith signature.

<    3   4   5   6   7   8   9   10   11   12   >