Re: [PULL xserver] Reviewed fixes and xf86_reload_cursors removal

2016-06-02 Thread Keith Packard
Michel Dänzer writes: >> Michel Dänzer (4): >> xfree86/modes: Assign xf86_config->cursor in xf86_load_cursor_image v2 >> glamor: Cannot use copies when accessing outside of composite source >> os: Use strtok instead of xstrtokenize in ComputeLocalClient >> xfree86/modes: R

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

2016-06-02 Thread Keith Packard
Hans de Goede writes: > If you want a real-world test point firefox to: > > https://lkml.org/lkml/2015/8/25/738 > > At least that is broken for me (skylake igpu + modesetting driver) > and this patch fixes it. Yes, Michel asked me to merge that patch a couple of days ago and I finally got around

[PATCH xserver] ephyr: Process queued X events before blocking

2016-06-04 Thread Keith Packard
If we end up reading all pending X events in the course of other server execution, then our notify FD callback won't get invoked and we won't process them. Fix this by clearing the pending event queue before blocking in the server. Signed-off-by: Keith Packard --- hw/kdrive/ephyr/eph

[PATCH xserver 3/4] os: Use strtok instead of xstrtokenize in ComputeLocalClient

2016-06-04 Thread Keith Packard
From: Michel Dänzer Fixes leaking the memory pointed to by the members of the array returned by xstrtokenize. Reviewed-by: Adam Jackson --- os/access.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/os/access.c b/os/access.c index 58f95a9..8828e08 100644 --- a/os/

[PATCH xserver 2/4] glamor: Cannot use copies when accessing outside of composite source

2016-06-04 Thread Keith Packard
from the commit above. Reviewed-by: Keith Packard --- glamor/glamor_render.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 165bced..64141ac 100644 --- a/glamor/glamor_render.c +++ b/glamor/

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

2016-06-04 Thread Keith Packard
fig->cursor at the beginning of xf86_load_cursor_image instead of at the end. Reviewed-by: Keith Packard --- hw/xfree86/modes/xf86Cursors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index b737268..

[PATCH xserver 4/4] xfree86/modes: Remove xf86_reload_cursors v2

2016-06-04 Thread Keith Packard
From: Michel Dänzer No longer needed now that xf86CursorResetCursor is getting called for each CRTC configuration change. v2: Keep xf86_reload_cursors as a deprecated empty inline function until all drivers stop calling it. (Adam Jackson) Reviewed-by: Adam Jackson --- hw/xfree86/drivers/m

[PATCH xserver] glamor: Limit outstanding drawing queue with glClientWaitSync

2016-06-04 Thread Keith Packard
t one in the block handler. This should let the device continue to process any operations queued since the previous block handler invocation and not slow down drawing too much. Signed-off-by: Keith Packard --- glamor/glamor.c | 7 +++ glamor/glamor_priv.h | 2 ++ 2 files changed, 9 inser

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

2016-06-05 Thread Keith Packard
Sorry 'bout these four emails -- just a slip of the fingers. -- -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/

[PATCH xserver] os: Do timers under input lock, not blocked signals

2016-06-05 Thread Keith Packard
Timer processing can happen on either the main thread or the input thread. As a result, it must be done under the input lock. Signals are unrelated to timers now that SIGIO isn't used for input processing, so stop blocking signals while processing timers. Signed-off-by: Keith Packard --

Re: [PATCH xserver] glamor: Limit outstanding drawing queue with glClientWaitSync

2016-06-06 Thread Keith Packard
Michel Dänzer writes: > I wrote an eerily similar patch a while ago, but the problem turned out > to be in the GL or kernel driver. Are you sure that's not the case for > you? I'm seeing a long lag when running benchmarks that don't ever need to synchronize with the hardware. Given that the X se

Re: [PATCH xserver] glamor: Limit outstanding drawing queue with glClientWaitSync

2016-06-07 Thread Keith Packard
Michel Dänzer writes: > Is this about x11perf by any chance? I was seeing long lag with that as > well, which turned out to be because we weren't correctly synchronizing > with the hardware for XGetImage. x11perf only does XGetImage once per run of the test; without some intra-test queue managem

Re: [PATCH mouse] bsd: Don't try to use SIGIO for input ABI >= 23

2016-06-07 Thread Keith Packard
Adam Jackson writes: > Signed-off-by: Adam Jackson > --- > src/bsd_mouse.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c > index a2c8ec7..dc628d4 100644 > --- a/src/bsd_mouse.c > +++ b/src/bsd_mouse.c > @@ -546,8 +546,10 @@ usbMouseProc(DeviceIntPt

Re: [PATCH xserver 1/5] dix: Use OsSignal() not signal()

2016-06-07 Thread Keith Packard
Adam Jackson writes: > As the man page for the latter states: > > The effects of signal() in a multithreaded process are unspecified. > > We already have an interface to call sigaction() instead, use it. Lgtm. Reviewed-by: Keith Packard -- -keith signature.asc D

Re: [PATCH xserver 2/5] dmx: Remove SIGIO input support here too

2016-06-07 Thread Keith Packard
SIGIO working on this one niche DDX, > just rip it out and use the thread model like everyone else. > > Signed-off-by: Adam Jackson Acked-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X

Re: [PATCH xserver 3/5] dri1: Hide the SIGIO details from drivers

2016-06-07 Thread Keith Packard
Adam Jackson writes: > Not being used, and not likely to be useful. This patch looks like you've just moved code around in the file; are there differences in the new code which require this motion? It's pretty hard to review as-is. -- -keith signature.asc Description: PGP signature _

Re: [PATCH xserver 4/5] xfree86: Undocument UseSIGIO in xorg.conf

2016-06-07 Thread Keith Packard
oing to get DRI1 at all, so we really > shouldn't even mention it. > > Still, leave the option wired up to the parser so we don't break any > DRI1-driver-using setup relying on it being disabled, and so we don't > complain about unused options elsewhere. > > Sig

Re: [PATCH xserver 5/5] dix: Update some comments to reflect the new non-SIGIO input model

2016-06-07 Thread Keith Packard
Adam Jackson writes: > Signed-off-by: Adam Jackson Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: ht

Re: [PATCH xserver 3/5] dri1: Hide the SIGIO details from drivers

2016-06-07 Thread Keith Packard
Adam Jackson writes: > Yes. The motion is to get the definitions ahead of their use without a > forward decl, since dri.h no longer exposes them. Seems fine to me then. Acked-by: Keith Packard -- -keith signature.asc Description: PGP sig

Re: [PATCH mouse] bsd: Don't try to use SIGIO for input ABI >= 23

2016-06-07 Thread Keith Packard
Adam Jackson writes: > That certainly would be a less icky solution though, will send an update. Might be better to leave it for someone able to test the result? -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org d

Re: [PATCH mouse] bsd: Don't try to use SIGIO for input ABI >= 23

2016-06-07 Thread Keith Packard
Adam Jackson writes: > That said we're not masking sigio off from the input thread, which is > probably also worth fixing. I hope this does what you mean: InputThreadDoWork(void *arg) { sigset_t set; /* Don't handle any signals on this thread */ sigfillset(&set); pthread_sigmas

Re: [PATCH mouse] bsd: Don't try to use SIGIO for input ABI >= 23

2016-06-07 Thread Keith Packard
Adam Jackson writes: > I suppose. The code is almost certainly broken as-is though, I can't > imagine trying to do both sigio and threaded input on the same fd would > go well (or be in any way reasonable to support). Looking usbSigioReadInput, xf86AddEnabledDevice and xf86SigioReadInput shows t

Re: [PATCH xserver] os: Do timers under input lock, not blocked signals

2016-06-07 Thread Keith Packard
Peter Hutterer writes: >> Signed-off-by: Keith Packard > > Reviewed-by: Peter Hutterer Merged. 88e981e..8174daa master -> master -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development

Re: [PATCH xserver] glamor: Limit outstanding drawing queue with glClientWaitSync

2016-06-07 Thread Keith Packard
Eric Anholt writes: > vc4 just waits until you don't have too many (5, arbitrarily) execs > outstanding before submitting another one. I think this is a problem of > the Intel driver, not glamor. We ran into it with Intel on cairo-gl, > too, and I should have just fixed it in the driver back th

Re: switching the server to poll/epoll

2016-06-10 Thread Keith Packard
Adam Jackson writes: > Protip: git rebase -i -x make master Thanks. Will do. I spent a bunch of time re-ordering stuff to make it more understandable, and not enough time testing the individual patches. -- -keith signature.asc Description: PGP signature __

Re: [PATCH xserver 2/4] xace: Remove the audit hooks and tune dispatch

2016-06-10 Thread Keith Packard
(on my laptop, n=1) > this improves x11perf -noop from 45M/s to 60M/s with what's currently > in git. Atop the epoll branch it's even better, 50M/s to 68M/s. Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature _

Re: switching the server to poll/epoll

2016-06-11 Thread Keith Packard
Adam Jackson writes: > This series breaks the build at a few points. "Move ETEST macro from > io.c to osdep.h" needs to happen before "InputThreadFillPipe doesn't > need select or poll", since the latter uses ETEST. Swapped those two patches. > Everything between > "Switch server to poll(2)" to

Re: switching the server to poll/epoll

2016-06-13 Thread Keith Packard
Adam Jackson writes: > You've still got the glamor glClientWaitSync patch in this series. My > reading of Michel and Eric's comments is that the 3D driver is properly > responsible for this, so it should be dropped before merging. Even if > we were to keep this workaround, it should be conditiona

[PATCH xserver 2/5] ephyr: Don't configure window while responding to configure events

2016-06-14 Thread Keith Packard
This leads to and endless sequence of window resizes. Signed-off-by: Keith Packard --- hw/kdrive/ephyr/ephyr.c | 2 ++ hw/kdrive/ephyr/hostx.c | 8 hw/kdrive/ephyr/hostx.h | 3 +++ 3 files changed, 13 insertions(+) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index

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

2016-06-14 Thread Keith Packard
s 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 Packard Reviewed-by: Adam Jackson --- dix/dixutils.

[PATCH xserver 3/5] ephyr: Handle window resize when using glamor

2016-06-14 Thread Keith Packard
window heirarchy and reset any windows pointing at the old pixmap. I could easily be convinced that this TraverseTree should be moved to miSetScreenPixmap. Signed-off-by: Keith Packard --- hw/kdrive/ephyr/ephyr.c | 16 ++-- hw/kdrive/ephyr/hostx.c | 20 +--- 2 files

[PATCH xserver 0/5] Fix ephyr events. Add ephyr/glamor resize

2016-06-14 Thread Keith Packard
Here's a short subset of the 'epoll' branch which changes the event processing in ephyr so that any events left queued in xcb by server execution will get processed before the server blocks. In doing this work, I discovered that ephyr didn't handle window resize when using glamor. And, configure

[PATCH xserver 5/5] ephyr: Process only the last expose or configure available from the server

2016-06-14 Thread Keith Packard
ff-by: Keith Packard --- hw/kdrive/ephyr/ephyr.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 015aef5..d7948e8 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -1141,6 +1

[PATCH xserver 4/5] ephyr: Process queued X events before blocking [v2]

2016-06-14 Thread Keith Packard
clear the event queue. v2: use a work proc to clear the event queue rather than doing it in the block handler directly. Signed-off-by: Keith Packard --- hw/kdrive/ephyr/ephyr.c | 52 +++-- hw/kdrive/ephyr/hostx.c | 26 + hw/kd

Re: switching the server to poll/epoll

2016-06-14 Thread Keith Packard
Adam Jackson writes: > Okay, that makes sense. I'm still a little wary of it, because I don't > trust myself to remember the BlockHandler wrapping order and therefore > worry that actions triggered in ephyrXcbHandleEvent might not be safe > to do while we're halfway unwound. (eg, would an expose

[PATCH xserver] glamor: Use DestroyPixmap instead of FreePicture for glyph atlas pixmap

2016-06-14 Thread Keith Packard
Nice of FreePicture to take a void * instead of a PicturPtr so that this error wasn't caught by the compiler. Noticed when resetting the X server left a dangling pixmap around. Signed-off-by: Keith Packard --- glamor/glamor_composite_glyphs.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH xserver] kdrive: Only enable threaded input if we have input devices

2016-06-14 Thread Keith Packard
When there aren't any devices, the input thread is going to be pretty lonely, so don't bother to even start it. Signed-off-by: Keith Packard --- hw/kdrive/src/kinput.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinp

Re: [PATCH xserver 3/5] ephyr: Handle window resize when using glamor

2016-06-14 Thread Keith Packard
Michel Dänzer writes: > Couldn't the existing screen pixmap be modified, instead of creating a > new one, as is done in Xorg drivers? Not easily -- glamor doesn't expose an API for this. Given that all we'd be saving is the pixmap header, I'd say that this change is the easier one, and doesn't r

Re: [PATCH xserver] glamor: Use DestroyPixmap instead of FreePicture for glyph atlas pixmap

2016-06-14 Thread Keith Packard
Michel Dänzer writes: >> Signed-off-by: Keith Packard > > Reviewed-by: Michel Dänzer Thanks. Merged. edd24aa..2d6230e master -> master -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org devel

Re: Disabling RECORD by default

2016-06-14 Thread Keith Packard
Peter Hutterer writes: > but note that syndaemon is a common user of RECORD, if it is disabled we > fall back to regular querying of the keyboard state with all its > drawbacks (unnecessary wakeups, missing of some key events, etc.) Ok, I'm back revisiting this and have some new ideas. First, w

Re: Disabling RECORD by default

2016-06-20 Thread Keith Packard
Adam Jackson writes: > Does this imply that XDMCP users don't deserve accessibility, since we > can't get a peer gid from a TCP socket? Seems suboptimal. Without additional work, you would have to choose between security or functionality. With a little work, one can imagine using the SECURITY e

Re: Hiding keyboard state

2016-06-20 Thread Keith Packard
Ran Benita writes: > The QueryDeviceState request from xinput (XQueryDeviceState(3) in xlib) > also exposes the logical state of the keys. This patch only touches the > old QueryKeymap request. Is xinput not relevant for some reason? (There > might also be similar request in xinput2 and XKB, I ha

Re: [PATCH xserver 0/5] Fix ephyr events. Add ephyr/glamor resize

2016-06-20 Thread Keith Packard
Adam Jackson writes: > Series is: > > Reviewed-by: Adam Jackson Merged. a134d1e..828887b master -> master -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/x

Re: Hiding keyboard state

2016-06-21 Thread Keith Packard
Antoine Martin writes: > This may cause us problems with xpra: we use XQueryKeymap to see which > keys are down when trying to synchronize remote and local keyboard > state, in particular for the modifiers. The new query code returns the current state of the keyboard as known to each client, so

Re: [PATCH xserver 3/3] dri2: Don't make reference to noClientException

2016-06-28 Thread Keith Packard
Adam Jackson writes: > noClientException is now never filled in with a meaningful value, it's > always -1. The sole caller of this function disregards the error value > in any case. Sounds like we should just remove it from the client structure then? -- -keith signature.asc Description: PGP

Re: Hiding keyboard state

2016-07-08 Thread "Keith Packard"
> But I don't think this is a huge issue for us anyway because we don't > want to support simultaneous input from non-xpra clients, and if > applications modify the keyboard state programmatically.. things are > likely to get out of sync no matter what we do. Cool. > Just a thought: could this b

Re: [PATCH xserver] FlushAllOutput: Only call FlushCallbacks when actually flushing data

2016-07-08 Thread Keith Packard
Michel Dänzer writes: > From: Michel Dänzer > > The unnecessary FlushCallback calls could cause significant performance > degradation with compositing. Yeah, we do need a flush callback in drivers to ensure that damage events aren't sent without the rendering being flushed. A block handler used

Re: [PATCH xserver] FlushAllOutput: Only call FlushCallbacks when actually flushing data

2016-07-08 Thread Keith Packard
Keith Packard writes: > It should, however, be sufficient to simply move the callback in > FlushAllOutput after the check for 'newoutput'; newoutput should only > ever be set if there is output to deliver. It'd also be awesome to get the epoll patches merged to test th

Re: [PATCH xserver] FlushAllOutput: Only call FlushCallbacks when actually flushing data

2016-07-08 Thread Keith Packard
Adam Jackson writes: > Still not cool with committing code that we _know_ will break a > supported platform. Oh, right, windows. Hrm. Suggestions welcome, but I suspect the only workable solution will be to write some windows-specific code that does the wait for multiple objects thing. We can't

Re: [PATCH xserver] FlushAllOutput: Only call FlushCallbacks when actually flushing data

2016-07-08 Thread Keith Packard
Adam Jackson writes: > Still not cool with committing code that we _know_ will break a > supported platform. I wasn't aware of any platform this would break? Am I missing something? -- -keith signature.asc Description: PGP signature ___ xorg-devel@

Re: [PATCH xserver] FlushAllOutput: Only call FlushCallbacks when actually flushing data

2016-07-11 Thread Keith Packard
Peter Harris writes: > The number of fds in fd_set isn't really fixed. FD_SETSIZE is user > controlled, so I can't imagine a problem with massaging fd_set into C99 > variable-length-array form: > > typedef struct xfd_set { > u_int fd_count; > SOCKET fd_array[]; > } xfd_set; > > a

Re: [PATCH xserver] FlushAllOutput: Only call FlushCallbacks when actually flushing data

2016-07-12 Thread Keith Packard
Adam Jackson writes: > Here's an epoll branch rebased to master, with poll emulation for > Windows, and a pair of proof-of-concept patches at the end to allow > (force) testing on pollful systems: So you're just emulating poll with select, which should work on Windows. that seems like a good sta

Re: [PATCH xserver] xfree86: Fix fallback driver sort order for Xorg -configure

2016-07-12 Thread Keith Packard
Adam Jackson writes: > +static int > +driver_sort(void *_l, void *_r) > +{ > +const char *l = *(const char **)_l; > +const char *r = *(const char **)_r; > +int left = is_fallback(l); > +int right = is_fallback(r); > + > +/* neither is a fallback */ > +if (left == -1 && rig

Re: [PATCH xserver] xfree86: Fix fallback driver sort order for Xorg -configure (v2)

2016-07-12 Thread Keith Packard
t; Note that qsort puts things in ascending order, so somewhat backwardsly > fallbacks are greater than native drivers, and vesa is greater than > modesetting. > > v2: Use strcmp to compare non-fallback drivers so we get a predictable > result if your libc's qsort isn't stab

Re: [PATCH xserver] xfree86: Fix fallback driver sort order for Xorg -configure (v2)

2016-07-12 Thread Keith Packard
u results in ctime order > vesa would be last in the list already, and the first swap would move > vesa to wherever fbdev/modesetting happened to be. Nice. In that case, Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature

[PATCH xserver 2/2] Switch poll() users to xserver_poll()

2016-07-18 Thread Keith Packard
This uses the wrapper in case we need to emulate poll with select as we do on Windows. Signed-off-by: Keith Packard --- hw/dmx/input/lnx-ms.c| 4 ++-- hw/dmx/input/lnx-ps2.c | 4 ++-- hw/kdrive/linux/mouse.c | 6 +++--- hw/kdrive/linux/ms.c

[PATCH xserver 0/2] Build poll emulation when needed and then use it

2016-07-18 Thread Keith Packard
[PATCH xserver 1/2] os: Add poll emulation for mingw [v2] Adam provided a patch which added poll emulation on top of select. This takes that patch, modifies it slightly, and then builds the code for platforms which don't have a native poll implementation (like mingw). Finally, the patch provides

[PATCH xserver 1/2] os: Add poll emulation for mingw [v2]

2016-07-18 Thread Keith Packard
ll.h b/include/xserver_poll.h new file mode 100644 index 000..110d30c --- /dev/null +++ b/include/xserver_poll.h @@ -0,0 +1,55 @@ +/* + * Copyright © 2016 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereb

Re: [PATCH xserver] FlushAllOutput: Only call FlushCallbacks when actually flushing data

2016-07-18 Thread Keith Packard
Adam Jackson writes: > My epoll branch has been rebased atop that as well. I've rebased a nearly identical branch atop the two poll emulation patches I just sent out in my tree. I think we're ready to merge that code to master now; it should 'just work' on mingw. -- -keith signature.asc Des

[PATCH xf86-video-ati] Adapt to video API 23

2016-07-18 Thread Keith Packard
Block and wakeup handlers lose their pReadmask arguments Signed-off-by: Keith Packard --- src/compat-api.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/compat-api.h b/src/compat-api.h index b299f83..1039b0e 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -73,8 +73,13

[PATCH xf86-video-ati] Adapt to video API 23 [v2]

2016-07-18 Thread Keith Packard
Also deal with drm fd wakeup Block and wakeup handlers lose their pReadmask arguments Signed-off-by: Keith Packard --- src/compat-api.h | 5 + src/drmmode_display.c | 22 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/compat-api.h b/src

Re: [PATCH xserver 0/2] hw/xwin build fixes after poll changes

2016-07-19 Thread Keith Packard
Jon Turney writes: > I haven't tried building this for MinGW, I guess there might be some more > fixes needed there... > > Jon Turney (2): > hw/xwin: Update for removal of AddEnabledDevice > hw/xwin: Update BlockHandler function signature Reviewed-by: Kei

Re: [PATCH xserver 0/2] hw/xwin build fixes after poll changes

2016-07-19 Thread Keith Packard
Jon Turney writes: > I haven't tried building this for MinGW, I guess there might be some more > fixes needed there... > > Jon Turney (2): > hw/xwin: Update for removal of AddEnabledDevice > hw/xwin: Update BlockHandler function signature Merged. 7f2d690..2a79be9 master -> master -- -

[PATCH xf86-video-nouveau] Use NotifyFd for drm and udev fds

2016-07-19 Thread Keith Packard
NotifyFd is available after API 22, and must be used after API 23. Signed-off-by: Keith Packard --- src/compat-api.h | 4 src/drmmode_display.c | 36 2 files changed, 40 insertions(+) diff --git a/src/compat-api.h b/src/compat-api.h index 5d63e10

Re: [PATCH xserver 3/3] xfree86: Hook up colormaps and RandR 1.2 gamma code v5

2016-07-26 Thread Keith Packard
Michel Dänzer writes: > +if (randrp->palette_size != palette_size) { > +randrp->palette = reallocarray(randrp->palette, palette_size, > + sizeof(colors[0])); Need error checking here. Wow. Otherwise, this patch looks great to me. Thanks for fixi

Re: [PATCH xserver 3/3] xfree86: Hook up colormaps and RandR 1.2 gamma code v6

2016-07-27 Thread Keith Packard
Michel Dänzer writes: > v6: > * Handle reallocarray failure in xf86RandR12LoadPalette (Keith Packard) Yeah, that'll work. Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org

Re: [PATCH xserver 3/3] xfree86: Hook up colormaps and RandR 1.2 gamma code v6

2016-07-27 Thread Keith Packard
Michel Dänzer writes: > [ Unknown signature status ] > On 28.07.2016 00:02, Keith Packard wrote: >> Michel Dänzer writes: >> >>> v6: >>> * Handle reallocarray failure in xf86RandR12LoadPalette (Keith Packard) >> >> Yeah, that'll work. >

Re: [PATCH xserver 1/3] xfree86/modes: Move gamma initialization to xf86RandR12Init12 v2

2016-07-27 Thread Keith Packard
Matt Turner writes: > I feel confident the compiler is already doing that transformation. I just tried and couldn't get the compiler to do it as the 'pow' function isn't declared with the 'const' attribute. That appears to be a bug in glibc. This code does what you'd expect: #include extern

Re: [PATCH xserver] present: Handle event mask updates as specified

2016-07-28 Thread Keith Packard
t need to free the object in the failure path. Here's an alternate (untested) patch which shows what I meant; use whatever bits of this seem useful. From 9b5604ee4ea71576c16961af79df2a4cf487acd7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 28 Jul 2016 09:46:59 -0700 Subject: [PATCH x

Re: [PATCH xserver 1/3] xfree86/modes: Move gamma initialization to xf86RandR12Init12 v2

2016-07-28 Thread Keith Packard
walter harms writes: > 1. I do not want to start an argument here. Your comments are welcome and helpful. > but i seems i need to explain what i wanted to say: > "b and c do not change inside the loop" > > that does *not* mean I have to say: const double or so. Right, the 'const' comment I mad

Re: [PATCH xserver] present: Handle event mask updates as specified

2016-07-28 Thread Keith Packard
Kenneth Graunke writes: > Looks good to me, thanks for fixing this! > > Reviewed-by: Kenneth Graunke -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel I

Re: [PULL xserver] Hook up colormaps and RandR 1.2 gamma ramps, present crash fix

2016-07-28 Thread Keith Packard
Michel Dänzer writes: > Michel Dänzer (4): > xfree86/modes: Move gamma initialization to xf86RandR12Init12 v2 > xfree86/modes: Remove xf86RandR12CrtcGetGamma > xfree86: Hook up colormaps and RandR 1.2 gamma code v6 > present: Only call restore_screen_pixmap once from set_a

Re: [PATCH xserver] present: Handle event mask updates as specified

2016-07-29 Thread Keith Packard
Michel Dänzer writes: > Thanks, I incorporated almost all your changes in v2, with the exception > of not calling LEGAL_NEW_RESOURCE if mask == 0, due to this spec language: > > If eventContext is an unused XID, then if eventMask is empty > no operation is performed. Sounds good. I just read

Re: [PATCH xserver] present: Handle event mask updates as specified v2

2016-07-29 Thread Keith Packard
Michel Dänzer writes: > Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: ht

Re: [PATCH xserver] xfree86/modes: Use xf86ScrnToScreen in xf86RandR12LoadPalette

2016-07-29 Thread Keith Packard
0b74a7b1bc9ed528f0f971d39a5951 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 29 Jul 2016 17:45:45 -0700 Subject: [PATCH xserver] xfree86: Set pScrn->pScreen before driver ScreenInit is called Any code called from the driver ScreenInit may want to refer to pScrn->pScreen. As the f

Re: [PATCH xserver] Autoconfig: Fix the loop adding dectected drivers to the list of screens

2016-07-30 Thread Keith Packard
Matthieu Herrb writes: > @@ -389,8 +389,7 @@ autoConfigDevice(GDevPtr preconf_device) > > /* for each other driver found, copy the first screen, insert it > * into the list of screens and set the driver */ > -i = 0; > -while (i++ < num_matches)

Re: [PATCH xserver] present: Handle event mask updates as specified v2

2016-07-30 Thread Keith Packard
Kenneth Graunke writes: >> Signed-off-by: Michel Dänzer > > Reviewed-by: Kenneth Graunke Merged. 0924ac0..c833c08 master -> master -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http

Re: [PATCH v2 xserver] Autoconfig: Fix the loop adding dectected drivers to the list of screens

2016-07-31 Thread Keith Packard
ce). > > Signed-off-by: Matthieu Herrb Reviewed-by: Keith Packard -- -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

Re: [PATCH xserver] Pass ClientPtr to FlushCallback

2016-08-02 Thread Keith Packard
Michel Dänzer writes: > From: Michel Dänzer > > This change has two effects: > > 1. Only calls FlushCallbacks when we're actually flushing data to a >client. The unnecessary FlushCallback calls could cause significant >performance degradation with compositing, which is significantly >

Re: [PATCH xserver] Pass ClientPtr to FlushCallback

2016-08-02 Thread Keith Packard
Eric Anholt writes: > We glFlush in the BlockHandler in glamor. Sure, what ensures that is called before damage events are delivered? -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://

Re: [PATCH] modesetting: prefer primary crtc when picking over nothing

2016-08-02 Thread Keith Packard
Dave Airlie writes: > So we had a bug report that epiphany was rendering slow on > modesetting + DRI3, that I tracked down to the fact it was > rendering offscreen to a single buffer. However due to this > rendering being offscreen we were getting the fake crtc > chosen by the X server as the win

Re: [PATCH] modesetting: prefer primary crtc when picking over nothing

2016-08-02 Thread Keith Packard
Michel Dänzer writes: > This can indeed only avoid the problem by accident, since there's no > guarantee that the primary output is even connected. Actually, he used the RRFirstOutput function which does find something connected to an active CRTC, so at least it should work as he intended? --

Re: [PATCH] modesetting: prefer primary crtc when picking over nothing

2016-08-02 Thread Keith Packard
Michel Dänzer writes: > I stand corrected. I was thinking of the primary output as reported by > xrandr. I had to actually go read the code; I had not remembered what 'RRFirstOutput' did either. Shockingly, there's a *comment* describing what it does. What was that author thinking! -- -keith

Re: [PATCH xserver] Pass ClientPtr to FlushCallback

2016-08-03 Thread Keith Packard
Michel Dänzer writes: > I'm afraid that's not feasible: An additional optimization will be to > never flush for clients which aren't sharing any buffers with the server > via DRI. Only the driver can keep track of that. The DRI3 extension and glamor presumably know about those; I'm mostly intere

Re: [JANITOR] Request for review

2016-08-05 Thread Keith Packard
Kayo Hamid writes: > I'm trying to do one janitor task looking for bad allocations. Someone > could review my diff and see if is okay? > > Thanks. > > -- > Kayo Hamid > diff --git a/dix/enterleave.c b/dix/enterleave.c > index 1b341f2..8cec9a2 100644 > --- a/dix/enterleave.c > +++ b/dix/enterleav

Re: [PATCH xserver] os: append, rather than prepend, any new input thread fds

2016-08-09 Thread Keith Packard
the server, so it makes sense to accept it so wacom keeps working until the driver is fixed. > Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org

Re: [PATCH xserver] os: don't re-remove an already removed fd

2016-08-10 Thread Keith Packard
Peter Hutterer writes: > If a driver calls xf86RemoveEnabledDevice() twice for the same fd we race with > InputThreadDoWork(). If it gets called in between both fd entries are removed. > If InputThreadDoWork() does not get called in between, we merely try to remove > the same fd twice and then ca

Re: [PATCH xserver] os: don't re-remove an already removed fd

2016-08-10 Thread Keith Packard
Peter Hutterer writes: > wacom does. and yes, it needs to get fixed in the driver now that it > doesn't work anymore but meanwhile not crashing is still good. Right, wondering if simply not registering the duplicate FD would also work? -- -keith signature.asc Description: PGP signature _

Re: [PATCH xserver] os: don't re-remove an already removed fd

2016-08-11 Thread Keith Packard
on Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 11 Aug 2016 12:34:54 -0700 Subject: [PATCH xserver] os: Allow re-registering fd with InputThreadRegisterDev Calling InputThreadRegisterDev twice with the same fd should replace the existing function and args instead of creating a new entry with

Re: [PATCH xserver] xfree86: fix unbalanced input_lock/unlock in xf86NewInputDevice()

2016-08-11 Thread Keith Packard
place it where you have. With the call to OsReleaseSignals removed, this is Reviewed-by: Keith Packard -- -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

Re: [PATCH xserver] xfree86: lock input during PreInit

2016-08-11 Thread Keith Packard
Peter Hutterer writes: > Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: ht

[PATCH xserver] mi: Remove spurious call to OsReleaseSignals from mieqGrowQueue

2016-08-11 Thread Keith Packard
unlock at this point. Signed-off-by: Keith Packard --- configure.ac | 17 +++-- mi/mieq.c| 1 - 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 690035a..e206e0f 100644 --- a/configure.ac +++ b/configure.ac @@ -654,7 +654,7 @@ A

[PATCH xserver] Build glamor when Xorg or Xephyr are built.

2016-08-11 Thread Keith Packard
Requires gbm when building Xorg so that xf86-video-modesetting will work. Signed-off-by: Keith Packard --- configure.ac | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2b93a4a..e206e0f 100644 --- a/configure.ac +++ b

Re: [PATCH xserver] mi: Remove spurious call to OsReleaseSignals from mieqGrowQueue

2016-08-11 Thread Keith Packard
Peter Hutterer writes: > On Thu, Aug 11, 2016 at 09:35:35PM -0700, Keith Packard wrote: >> This call wasn't converted to 'input_unlock()' when the SIGIO code was >> removed from the server, and so when the queue growing was reworked to >> be done from the in

[PATCH xserver] dix: Avoid writing uninitialized bytes in deliverPropertyNotifyEvent

2016-08-13 Thread Keith Packard
Make sure the whole event is initialized, instead of leaving the pad bytes unset. Signed-off-by: Keith Packard --- dix/property.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dix/property.c b/dix/property.c index bde2af8..fa4da2d 100644 --- a/dix/property.c

[PATCH xserver 0/2] os: Handle ospoll callbacks adding/removing fds

2016-08-13 Thread Keith Packard
Here are a couple of patches which deal with the case where the fd callback ends up enabling or disabling file descriptors. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/l

[PATCH xserver 2/2] os: Abandon loop after poll call when array of fds has changed

2016-08-13 Thread Keith Packard
If a file descriptor is added or removed from an ospoll callback, then the arrays containing file descriptor information will have all of their indices changed, so the loop state is no longer consistent. Just bail out and let the caller come back around to try again. Signed-off-by: Keith Packard

[PATCH xserver 1/2] os: Delay freeing of epoll_wait return pointers until epoll is idle.

2016-08-13 Thread Keith Packard
keeps stale pointers around after the call to epoll_ctl with EPOLL_CTL_DEL. Signed-off-by: Keith Packard --- os/ospoll.c | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/os/ospoll.c b/os/ospoll.c index 3c2b80b..2996ac7 100644 --- a/os/ospoll.c +++ b/os

[PATCH xf86-input-libinput] Bail when a sub-device is it's own parent

2016-08-13 Thread Keith Packard
of this mistake. Signed-off-by: Keith Packard --- src/xf86libinput.c | 4 1 file changed, 4 insertions(+) diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 45385f7..9be4354 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -2589,6 +2589,10 @@ xf86libinput_pre_init(Inp

Re: [PATCH xf86-input-libinput] Ensure parent devices are actual parent devices

2016-08-14 Thread Keith Packard
same already-removed parent). Avoid this by making sure the > matched device is actually a parent device. > > Signed-off-by: Peter Hutterer Tested-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.o

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