Re: [RFC] Automatic modifier update of slave devices

2014-03-11 Thread Daniel Stone
Hi, On 11 March 2014 06:44, Peter Hutterer peter.hutte...@who-t.net wrote: On Mon, Mar 10, 2014 at 10:10:40PM +0100, Daniel Stone wrote: Ack from me - either 3 (mirror locks) or 4 (mirror all state). The main downside is that people listening for XKB state change events on slaves might see

Re: [PATCH:xkbcomp 1/4] Remove useless checks for NULL before free in OverlayKeyCreate()

2014-03-11 Thread Daniel Stone
Hi, On 11 March 2014 06:31, Peter Hutterer peter.hutte...@who-t.net wrote: On Sat, Mar 08, 2014 at 07:10:25PM -0800, Alan Coopersmith wrote: There is no need to ensure the pointers passed to free are not NULL, especially right after passing them to strncpy without checking for NULL. Flagged

Re: [PATCH v2] Xorg: Add a suid root wrapper

2014-03-11 Thread Peter Hutterer
On Mon, Mar 10, 2014 at 10:21:39PM +0100, Hans de Goede wrote: With the recent systemd-logind changes it is possible to install the Xorg binary without suid root rights and still have everything working as it should *if* the user only has cards which are supported by kms. This commit adds a

Re: [PATCH 1/2] config: only free odev-attrib_name for string types

2014-03-11 Thread Hans de Goede
Hi, On 03/11/2014 05:30 AM, Peter Hutterer wrote: Signed-off-by: Peter Hutterer peter.hutte...@who-t.net Good catch: Reviewed-by: Hans de Goede hdego...@redhat.com Regards, Hans --- config/config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.c

Re: [PATCH 2/2] xfree86: handle xorg.conf devices with logind

2014-03-11 Thread Hans de Goede
Hi, On 03/11/2014 05:32 AM, Peter Hutterer wrote: Only devices from the config backend have their attributes set, devices from the xorg.conf only have Option Device. That option is also set by the config backend, so use it. And since the config backend sets our major/minor but xorg.conf

Re: [PATCH synaptics 0/4] Drop mtdev from synaptics

2014-03-11 Thread Hans de Goede
Hi, On 03/11/2014 06:27 AM, Peter Hutterer wrote: mtdev converts protocol A devices to protocol B devices (the slot-based multitouch protocol). These days there are very few protocal A devices, and none of them are touchpads so this code is superfluous. Looks good, the entire series is:

Re: [PATCH v2] Xorg: Add a suid root wrapper

2014-03-11 Thread Hans de Goede
Hi, On 03/11/2014 07:16 AM, Peter Hutterer wrote: On Mon, Mar 10, 2014 at 10:21:39PM +0100, Hans de Goede wrote: With the recent systemd-logind changes it is possible to install the Xorg binary without suid root rights and still have everything working as it should *if* the user only has

[PATCH xf86-video-ati] Add support for server managed fds

2014-03-11 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- src/radeon_kms.c | 60 +- src/radeon_probe.c | 5 + src/radeon_probe.h | 2 ++ 3 files changed, 57 insertions(+), 10 deletions(-) diff --git a/src/radeon_kms.c b/src/radeon_kms.c

[PATCH xf86-video-ati 0/1] Add support for server managed fds

2014-03-11 Thread Hans de Goede
Hi All, Here is a patch to add server managed fds support to the ati driver. Note that is exactly the same patch as the RFC I send earlier, this is no longer RFC as the necessary xserver changes have now landed upstream. Regards, Hans ___

Re: [PATCH 2/2] xfree86: handle xorg.conf devices with logind

2014-03-11 Thread Laércio de Sousa
Hi there! Could this other one by Oleg Samarin be related (except for the xf86Bus.c patch, which I've sent previously and is already under review)? http://thread.gmane.org/gmane.comp.freedesktop.xorg.devel/37377 CANTATE DOMINO CANTICUM NOVUM QUIA MIRABILIA FECIT Laércio 2014-03-11 4:09

Re: [PATCH] multiseat with several videocards

2014-03-11 Thread Laércio de Sousa
Hi Oleg! Could you please re-submit this patch without the xf86Bus.c part? I've already submitted that patch previously and it's currently under review by David Arilie and Hans de Goede. Thanks! CANTATE DOMINO CANTICUM NOVUM QUIA MIRABILIA FECIT Laércio 2013-09-28 17:56 GMT-03:00 Oleg

[PATCH 2/2] Remove config_odev_add_*attribute checks in various places

2014-03-11 Thread Hans de Goede
Note that there are more callers but those were already not doing any error checking. Signed-off-by: Hans de Goede hdego...@redhat.com --- config/udev.c | 32 ++ hw/xfree86/os-support/linux/lnx_platform.c | 5 + 2 files changed, 7

[PATCH 1/2] config_odev*: Use XNF alloc functions

2014-03-11 Thread Hans de Goede
config_odev* functions are called in code-paths were we already use XNF* functions in other places, so which are not oom safe already. Besides that oom is something which should simply never happen, so aborting when it does is as good a response as any other. While switching to XNF functions

Re: [PATCH] Avoid starting a comment with */*

2014-03-11 Thread Peter Harris
On 2014-03-11 01:45, Thomas Klausner wrote: -extern _X_EXPORT Bool AddCallback(CallbackListPtr * /*pcbl */ , - CallbackProcPtr /*callback */ , - void */*data */ ); +extern _X_EXPORT Bool AddCallback(CallbackListPtr *pcbl, +

Re: [PATCH] config: search for PnPID on all parents (#75513)

2014-03-11 Thread Benjamin Tissoires
On Tue, Feb 25, 2014 at 8:20 PM, Peter Hutterer peter.hutte...@who-t.net wrote: The PnPID for a device may not be on the immediate parent, so search up the device tree until we find one. X.Org Bug 75513 http://bugs.freedesktop.org/show_bug.cgi?id=75513 Signed-off-by: Peter Hutterer

Re: [PATCH synaptics 3/4] eventcomm: drop some use of mtdev

2014-03-11 Thread Benjamin Tissoires
On Tue, Mar 11, 2014 at 1:27 AM, Peter Hutterer peter.hutte...@who-t.net wrote: When checking the device don't open a new mtdev instance, use the existing libevdev struct. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/eventcomm.c | 99

Re: [PATCH synaptics 1/4] eventcomm: fix wrong event code for SYN_REPORT

2014-03-11 Thread Benjamin Tissoires
On Tue, Mar 11, 2014 at 1:27 AM, Peter Hutterer peter.hutte...@who-t.net wrote: This was supposed to emulate a SYN_REPORT event so that the upper layers process what's in the queue. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/eventcomm.c | 2 +- 1 file changed, 1

Re: [PATCH synaptics 0/4] Drop mtdev from synaptics

2014-03-11 Thread Benjamin Tissoires
On Tue, Mar 11, 2014 at 3:13 AM, Hans de Goede hdego...@redhat.com wrote: Hi, On 03/11/2014 06:27 AM, Peter Hutterer wrote: mtdev converts protocol A devices to protocol B devices (the slot-based multitouch protocol). These days there are very few protocal A devices, and none of them are

[PATCH 04/27] glamor: Move the EGL image to the normal pixmap private.

2014-03-11 Thread Eric Anholt
There's no reason to hide EGL from the rest of glamor, now that we have epoxy. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_egl.c | 89 +++- glamor/glamor_priv.h | 7 + 2 files changed, 47 insertions(+), 49 deletions(-) diff

glamor-server subset patch bomb

2014-03-11 Thread Eric Anholt
keithp said he was tired of the glamor stuff trickling in and wanted to just review it all at once and be done. I know I hate reviewing giant patch series, but who am I to argue with someone who says they want to do more review? This series fixes a bunch of CopyPlane XTS tests in Xephyr, thanks

[PATCH 06/27] sync: Add a header include necessary to use misyncstr.h

2014-03-11 Thread Eric Anholt
Signed-off-by: Eric Anholt e...@anholt.net --- miext/sync/misyncstr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/miext/sync/misyncstr.h b/miext/sync/misyncstr.h index b5bf6fd..ad69e8e 100644 --- a/miext/sync/misyncstr.h +++ b/miext/sync/misyncstr.h @@ -29,6 +29,7 @@ #define

[PATCH 09/27] glamor: Drop duplicated lines for getting pixmap state in GetImage.

2014-03-11 Thread Eric Anholt
No change in generated code size -- apparently the compiler figured it out. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_getimage.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/glamor/glamor_getimage.c b/glamor/glamor_getimage.c index 5609e70..a932473 100644 ---

[PATCH 21/27] glamor: Improve the performance of PushPixels by, well, pushing pixels.

2014-03-11 Thread Eric Anholt
Otherwise, mi will fall back to GetSpans()ing the bitmap, walking the bitmap, computing spans to be filled, and calling FillSpans(). Improves x11perf -f8text by 759.373% +/- 3.33096% (n=166) Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_glyphblt.c | 115

[PATCH 08/27] glamor: Return the stride/size for glamor_dri3_name_from_pixmap(), too.

2014-03-11 Thread Eric Anholt
Just like for a caller of glamor_dri3_fd_from_pixmap(), otherwise the consumer of that named buffer has no idea what GL chose for the stride. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor.c | 4 ++-- glamor/glamor.h | 3 ++- glamor/glamor_egl.c | 4 ++-- 3 files changed, 6

[PATCH 02/27] glamor: Drop the set of the context to NULL at the end of glamor ops.

2014-03-11 Thread Eric Anholt
The theory here was that it (which I copied from EGL) existed to fix up context switching with indirect GLX. But indirect GLX won't even try to set the context again unless its lastContext field is cleared, so we need to solve this a different way. Signed-off-by: Eric Anholt e...@anholt.net ---

[PATCH 13/27] glamor: Rename a variable to be more descriptive.

2014-03-11 Thread Eric Anholt
The valid_ prefix was used above to describe our allocation that gets reused multiple times, which is totally unrelated. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_fill.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glamor/glamor_fill.c

[PATCH 10/27] glamor: Fix stack overflow in glamor_solid vertex handling.

2014-03-11 Thread Eric Anholt
ARRAY_SIZE(vertices) is 32 (floating point values), so we need to divide by the number of floats in a box like we do in the overflow case below. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_fill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 12/27] glamor: Fix some integer overflow errors.

2014-03-11 Thread Eric Anholt
Imagine a nbox that was (UINT_MAX + small number) / (4 * 2 * sizeof(float)). We'd malloc a few bytes after the integer overflow, but glamor_set_normalize_vcoords would write over gigabytes of heap. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_fill.c | 4 ++-- 1 file changed, 2

[PATCH 01/27] xephyr: Don't forget to glViewport() before drawing the screen.

2014-03-11 Thread Eric Anholt
Fixes misrendering with cairogears. I had noticed the failure while trying to figure out what was going on with traps. Cairogears was apparently putting its results on the screen through putimage, which is a texture upload, so the last GL drawing was done to the size of the cairogears window,

[PATCH 07/27] glamor: Drop the body of the function for enabling DRI3 extensions.

2014-03-11 Thread Eric Anholt
The flag is already being set at glamor_egl_screen_init() time, so no need for the driver to separately call this. That said, leave the function around to keep the ABI compatibility. --- glamor/glamor.h | 8 glamor/glamor_egl.c | 7 +-- 2 files changed, 1 insertion(+), 14

[PATCH 17/27] glamor: Drop unused GLAMOR_ACCESS_WO.

2014-03-11 Thread Eric Anholt
Nothing was using it, and it was going to complicate the glamor_prepare_access bugfixing I'm going to do next. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_pixmap.c | 11 +-- glamor/glamor_priv.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git

[PATCH 22/27] glamor: Improve the performance of PolyGlyphBlt.

2014-03-11 Thread Eric Anholt
Using the same idea as the previous PushPixels code, just make points for each point in the glyph. This is an advantage over the pushpixels fallback because we can batch the BO mappings and draw calls across glyphs. Improves performance of x11perf -f8text by 773.389% +/- 3.50754% (n=10).

[PATCH 16/27] glamor: Replace some goofy enum-likes with a real enum.

2014-03-11 Thread Eric Anholt
This unpacks the bitfield into an int size, but my experience has been that packing bitfields doesn't matter for performance. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_fbo.c | 2 +- glamor/glamor_priv.h | 25 - 2 files changed, 17 insertions(+), 10

[PATCH 25/27] glamor: Add an assert about an invariant the upload code relies on.

2014-03-11 Thread Eric Anholt
Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_pixmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index f4782e6..ff07483 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -725,6 +725,7 @@

[PATCH 23/27] glamor: Improve the performance of line fallbacks.

2014-03-11 Thread Eric Anholt
If the lines aren't solid-filled vert/horiz solid-filled rectangles, we fall back. libreoffice has some diagonal lines, and the performance of the fallback path was atrocious. Just fall back to mi's spans instead, so that we don't do an upload/download. Improves x11perf -seg100 by 863.652% +/-

[PATCH 19/27] glamor: Rely on nested mappings to handle src==dst and !prepare bugs.

2014-03-11 Thread Eric Anholt
Now that the core deals with that for us, we can avoid all this extra carefulness. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_addtraps.c | 2 +- glamor/glamor_copyarea.c | 14 ++ glamor/glamor_copyplane.c| 13 +++-- glamor/glamor_core.c

[PATCH 14/27] glamor: Rename more solid fill variables to clean up the code.

2014-03-11 Thread Eric Anholt
Now the error path of allocation is more obvious: We leave things in the a-few-boxes-at-a-time stack memory state. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_fill.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git

[PATCH 26/27] glamor: Don't forget to unmap our PBOs before usng them to upload.

2014-03-11 Thread Eric Anholt
From the GL_ARB_vertex_buffer_object spec: After the client has specified the contents of a mapped data store, and before the data in that store are dereferenced by any GL commands, the mapping must be relinquished by calling boolean UnmapBufferARB(enum target); Our mappings

[PATCH 18/27] glamor: Allow nested mapping of pixmaps.

2014-03-11 Thread Eric Anholt
The common pattern is to do nested if statements making calls to prepare_access() and then pop those mappings back off in each set of braces. Some cases checked for src == dst to avoid leaking mappings, but others didn't. Others didn't even do the nested mappings, so a failure in the outer map

[PATCH 15/27] glamor: Fix up doxygen for glamor_fill.c.

2014-03-11 Thread Eric Anholt
Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_fill.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/glamor/glamor_fill.c b/glamor/glamor_fill.c index f8b39a5..a3f0f29 100644 --- a/glamor/glamor_fill.c +++ b/glamor/glamor_fill.c @@ -27,10

[PATCH 03/27] glamor: Use epoxy_has_egl_extension() instead of rolling our own.

2014-03-11 Thread Eric Anholt
Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_egl.c | 31 +++ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index 05e6bd0..13799fc 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@

[PATCH 20/27] glamor: Add missing prepares on the GC during fb fallbacks.

2014-03-11 Thread Eric Anholt
We had regressions in CopyPlane reported by xts5, because we were (successfully!) dereferencing the null pixmap-devPrivate.ptr for a tile or stipple without having done a prepare. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_copyarea.c | 4 +++- glamor/glamor_copyplane.c | 4

[PATCH 05/27] glamor: Do glyph private init at screeninit time, and other stuff at CSR.

2014-03-11 Thread Eric Anholt
This hasn't actually been a problem, since the server hasn't allocated any glyphs before our glyph private initialization during CreateScreenResources. But it's generally not X Server style to do things this way. Now that glamor itself drives both parts of glyphs setup, DDX drivers no longer

[PATCH 11/27] glamor: Drop bogus _X_UNLIKELY.

2014-03-11 Thread Eric Anholt
nbox 4 is actually quite common for spans handling. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_fill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glamor/glamor_fill.c b/glamor/glamor_fill.c index 75c952c..aaa7783 100644 --- a/glamor/glamor_fill.c +++

[PATCH 27/27] glamor: Apply debug labels to our shaders.

2014-03-11 Thread Eric Anholt
This will help tools like fips, apitrace, or INTEL_DEBUG=shader_time provide useful information about the shaders in use. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor.c | 1 + glamor/glamor_core.c | 20 +--- glamor/glamor_fill.c | 2 +-

Re: [PATCH 1/2] config_odev*: Use XNF alloc functions

2014-03-11 Thread Peter Hutterer
On Tue, Mar 11, 2014 at 12:01:22PM +0100, Hans de Goede wrote: config_odev* functions are called in code-paths were we already use XNF* functions in other places, so which are not oom safe already. Besides that oom is something which should simply never happen, so aborting when it does is as

Re: [PATCH 2/2] xfree86: handle xorg.conf devices with logind

2014-03-11 Thread Peter Hutterer
On Tue, Mar 11, 2014 at 07:37:24AM -0300, Laércio de Sousa wrote: Hi there! Could this other one by Oleg Samarin be related (except for the xf86Bus.c patch, which I've sent previously and is already under review)? http://thread.gmane.org/gmane.comp.freedesktop.xorg.devel/37377 not

[PULL] syncing up keyboard LEDs + misc

2014-03-11 Thread Peter Hutterer
The following changes since commit b972851ce47b5e3b681a212a43dd71aab94e7a1b: xserver: fix build since system-logind.h (2014-03-09 18:44:59 -0700) are available in the git repository at: git://people.freedesktop.org/~whot/xserver for-keith for you to fetch changes up to

[PATCH 1/2] glamor_*gl_has_extension: Move strlen after check for NULL string

2014-03-11 Thread Alan Coopersmith
Flagged by cppcheck 1.64: [glamor/glamor_core.c:536] - [glamor/glamor_core.c:540]: (warning) Possible null pointer dereference: extension - otherwise it is redundant to check it against null. [glamor/glamor_egl.c:620] - [glamor/glamor_egl.c:622]: (warning) Possible null

[PATCH 2/2] Remove duplicate assignment of repeat_type_uniform_location

2014-03-11 Thread Alan Coopersmith
Flagged by cppcheck 1.64: [glamor/glamor_gradient.c:987] - [glamor/glamor_gradient.c:991]: (performance) Variable 'repeat_type_uniform_location' is reassigned a value before the old one has been used. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com Reviewed-by: Eric

Re: [PULL] syncing up keyboard LEDs + misc

2014-03-11 Thread Keith Packard
Peter Hutterer peter.hutte...@who-t.net writes: Peter Hutterer (6): config: only free odev-attrib_name for string types xfree86: handle xorg.conf devices with logind xkb: factor out the StateNotify flag check xkb: factor out state update into a function xkb:

Re: [PATCH 1/2] glamor_*gl_has_extension: Move strlen after check for NULL string

2014-03-11 Thread Keith Packard
Alan Coopersmith alan.coopersm...@oracle.com writes: Flagged by cppcheck 1.64: [glamor/glamor_core.c:536] - [glamor/glamor_core.c:540]: (warning) Possible null pointer dereference: extension - otherwise it is redundant to check it against null. [glamor/glamor_egl.c:620] -

Re: [PATCH 5/5] xkb: Factor out a function to copy a keymap's controls unto another

2014-03-11 Thread Peter Hutterer
On Fri, Mar 07, 2014 at 02:32:28PM -0800, Kristian Høgsberg wrote: From: Rui Matos tiagoma...@gmail.com Reviewed-by: Kristian Høgsberg k...@bitplanet.net merged this one with s/unto/onto/, thanks. Cheers, Peter --- include/xkbsrv.h | 3 +++ xkb/xkb.c| 14 +-