Re: [PATCH xserver] Xext/saver: Swap ScreenSaverSuspend 'suspend' field. Handle old XCB clients.

2018-03-13 Thread Keith Packard
Mihai Moldovan writes: > The actual changes (both server and proto) LGTM. I'll take that as a 'Reviewed-by', unless you have some objection. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org

[PATCH xserver v2 4/4] glx: honor LIBGL_DRIVERS_PATH when loading DRI drivers

2018-03-13 Thread Ben Crocker
From: Nicolai Hähnle Allow switching to another driver build without a full installation. Glamor already takes LIBGL_DRIVERS_PATH into account, so this change makes sure that the same driver is used in both parts of the server. Signed-off-by: Nicolai Hähnle

[PATCH xserver v2 2/4] os: use PrivsElevated instead of a manual check

2018-03-13 Thread Ben Crocker
From: Nicolai Hähnle Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker --- os/utils.c | 2 +- 1 file changed, 1

[PATCH xserver v2 1/4] os: move xf86PrivsElevated here

2018-03-13 Thread Ben Crocker
From: Nicolai Hähnle Having different types of code all trying to check for elevated privileges is a bad idea. This implementation is the most thorough one. Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker

[PATCH xserver v2 0/4] Improve elevated priv check, honor LIBGL_DRIVERS_PATH

2018-03-13 Thread Ben Crocker
Submit Nicolai Hähnle's four-patch series improving the checks for elevated privileges and culminating in using the runtime environmental control LIBGL_DRIVERS_PATH when searching for driver .so's, as Mesa, and hence Glamor, already do. The fourth patch prevents a conflict that can arise if, for

[PATCH xserver v2 3/4] xfree86: replace all uses of xf86PrivsElevated with PrivsElevated

2018-03-13 Thread Ben Crocker
From: Nicolai Hähnle Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker --- hw/xfree86/common/xf86Config.c | 2 +-

Re: [xserver,1/4] os: move xf86PrivsElevated here

2018-03-13 Thread Ben Crocker
Antoine, thanks for the suggestion and the additional review. V2 patch series forthcoming. -- Ben On Sat, Mar 10, 2018 at 11:58 PM, Antoine Martin wrote: > On 09/03/18 05:11, Ben Crocker wrote: > > Sent that a little too soon; please consider "Reviewed-by: Ben Crocker

[PATCH xserver] dri3: cap the version returned to the client

2018-03-13 Thread Emil Velikov
From: Emil Velikov As per the protocol, the server should not return version greater than the one supported by the client. Add a spec quote and tweak the numbers accordingly. Fixes: 563138298868 ("dri3: Add DRI3 extension") Cc: Daniel Stone

Re: [PATCH xserver] dix: don't free() stack memory

2018-03-13 Thread Keith Packard
Eric Engestrom writes: > I'll look at the code more closely to figure out when the free is > needed, but I just saw this warning and had a look, this isn't code I'm > familiar with *at all*, so I might just end up giving up if I can't > figure it out easily enough :/

[PATCH xserver v3 24/24] xwayland: Activate Present flips in rootless mode with Glamor

2018-03-13 Thread Roman Gilg
Link the newly introduced support for Present flips. For now flips can only be used in rootless mode together with Glamor. Signed-off-by: Roman Gilg --- hw/xwayland/xwayland.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/hw/xwayland/xwayland.c

[PATCH xserver v3 21/24] xwayland: Add fallback timer for msc counting

2018-03-13 Thread Roman Gilg
When the compositor is not sending frame callbacks while we still wait on buffer release events fake a continuous msc counter with a timer. Having this timer is a prerequisite for queuing events. Signed-off-by: Roman Gilg --- hw/xwayland/xwayland-present.c | 70

[PATCH xserver v3 23/24] xwayland: Cut off upper 32bit of queued vblank delay

2018-03-13 Thread Roman Gilg
This ensures the same behavior as in Present's fake counter and xfree86. At the moment clients might do put vblanks too far into the future, because the fake vblank code in Present and the xfree86 driver tolerate cut off upper 32bit due to an 64 to 32bit conversion. Do this therefore here as well

[PATCH xserver v3 22/24] xwayland: Implement queuing present vblanks

2018-03-13 Thread Roman Gilg
Queue present events to msc values. Fake msc events with a refresh rate of about 60fps when flips are not possible. When flips are executed rely on frame callbacks with a slow updating timer as fallback. This is important for applications, that want to limit their framerate. Signed-off-by: Roman

[PATCH xserver v3 20/24] xwayland: Preliminary support for Present's new window flip mode

2018-03-13 Thread Roman Gilg
Introduce support for Present's window flip mode. The support is not yet complete, but works reasonable well for the most important use case, that is fullscreen applications. We take a Present flip and if the xwl_window->window has the same dimensions as the presenting window, the flip is

[PATCH xserver v3 14/24] present: Add driver facing window flip mode hooks

2018-03-13 Thread Roman Gilg
To enable special functionality of window flips introduce for window flips a separate set of driver facing function hooks. Signed-off-by: Roman Gilg --- present/present.h | 43 +++ present/present_priv.h | 1 + 2 files changed, 44

[PATCH xserver v3 19/24] xwayland: Add arguments to glamor_pixmap_get_wl_buffer

2018-03-13 Thread Roman Gilg
Add arguments to give the caller more information and control over the creation of a wl_buffer with GBM, in particular let the caller determine the size of the buffer. Signed-off-by: Roman Gilg --- hw/xwayland/xwayland-glamor.c | 23 +--

[PATCH xserver v3 17/24] present: Add cleanups for window flip mode

2018-03-13 Thread Roman Gilg
Make sure that vblanks and windows get cleaned up correctly in window flip mode. Signed-off-by: Roman Gilg --- present/present_screen.c | 33 - present/present_vblank.c | 2 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git

[PATCH xserver v3 16/24] present: In window flip mode report damage on flip to driver

2018-03-13 Thread Roman Gilg
Calculate damage before trying to flip and report it to the driver. This allows drivers to optimize their rendering. Signed-off-by: Roman Gilg --- present/present.h | 3 ++- present/present_wnmd.c | 24 +--- 2 files changed, 15 insertions(+), 12

[PATCH xserver v3 18/24] present: Add exported init function of window flip mode

2018-03-13 Thread Roman Gilg
Allow drivers now to initialize window flip mode. Signed-off-by: Roman Gilg --- present/present.h| 2 ++ present/present_screen.c | 23 ++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/present/present.h b/present/present.h index

[PATCH xserver v3 09/24] present: Add more hooks to internal flip mode API

2018-03-13 Thread Roman Gilg
Add hooks to query caps, get crtcs, abort vblanks and destroy a flip. Signed-off-by: Roman Gilg --- present/present.c| 28 present/present_priv.h | 33 + present/present_scmd.c | 38

[PATCH xserver v3 13/24] present: Adapt flip mode API hooks for window flip mode

2018-03-13 Thread Roman Gilg
Flipping pixmaps per window needs additional arguments in the flip mode API. Add these as preperation for window flip mode. Signed-off-by: Roman Gilg --- present/present_execute.c | 2 ++ present/present_priv.h| 10 +++--- present/present_scmd.c| 8 +---

[PATCH xserver v3 15/24] present: Add window flip mode

2018-03-13 Thread Roman Gilg
In contrast to screen flip mode this mode: * supports flips per windows (these windows currently need to have the same size as their parent windows with the same pixmap), * sends pixmap idle signals to the client only after the driver has given an additional event notify. This patch only

[PATCH xserver v3 12/24] present: Add flip_idler vblank property

2018-03-13 Thread Roman Gilg
Introduce vblank property for flip modes, that demand explicite allowance by the driver for vblanks to become idle. Signed-off-by: Roman Gilg --- present/present_priv.h | 1 + present/present_vblank.c | 1 + 2 files changed, 2 insertions(+) diff --git

[PATCH xserver v3 11/24] present: Add present_window_priv properties for window flip mode

2018-03-13 Thread Roman Gilg
For window flip mode data about flips needs to be stored per window. Add properties to 'present_window_priv' and initialize them on creation. Signed-off-by: Roman Gilg --- present/present_priv.h | 10 ++ present/present_screen.c | 6 ++ 2 files changed, 16

[PATCH xserver v3 10/24] present: Refactor present_screen_init

2018-03-13 Thread Roman Gilg
To initialize easily different flip modes, refactor 'present_screen_init'. Signed-off-by: Roman Gilg --- present/present_screen.c | 46 +- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/present/present_screen.c

[PATCH xserver v3 08/24] present: Move timings adjustment in common part of flip mode API

2018-03-13 Thread Roman Gilg
To reduce future code duplication refactor timings adjustment out as a separate function. Signed-off-by: Roman Gilg --- present/present.c | 38 ++ present/present_priv.h | 7 +++ present/present_scmd.c | 34

[PATCH xserver v3 05/24] present: Refactor execute in separate file

2018-03-13 Thread Roman Gilg
To be shared by multiple flip modes, refactor execute functionality, such that logical chunks can go in new separate file. Signed-off-by: Roman Gilg --- present/Makefile.am | 1 + present/meson.build | 1 + present/present_execute.c | 120

[PATCH xserver v3 07/24] present: Add flip mode API hook for present_can_window_flip

2018-03-13 Thread Roman Gilg
Flip modes can now have different implementations of present_can_window_flip. Signed-off-by: Roman Gilg --- present/present.c | 9 + present/present_priv.h | 2 ++ present/present_scmd.c | 5 +++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git

[PATCH xserver v3 03/24] present: Move vblank functionality in seperate file

2018-03-13 Thread Roman Gilg
With the new internal flip mode API move vblank creation and so on into a seperate file, such that it can be shared between flip modes. Signed-off-by: Roman Gilg --- present/Makefile.am | 3 +- present/meson.build | 1 + present/present_priv.h | 44

[PATCH xserver v3 02/24] present: Preliminary internal flip mode API

2018-03-13 Thread Roman Gilg
Add some basic function hooks to our future present-internal flip mode API, that will allow us to share functionality in between modes and move more code in separate files. Signed-off-by: Roman Gilg --- present/present_priv.h | 27 ---

[PATCH xserver v3 06/24] present: Add flip mode API hook for present_pixmap

2018-03-13 Thread Roman Gilg
Make present_pixmap a common function callable by any flip mode. Signed-off-by: Roman Gilg --- present/present.c | 57 ++ present/present_priv.h | 68 +++--- present/present_scmd.c | 54

[PATCH xserver v3 04/24] present: Add flip mode API hooks for several functions

2018-03-13 Thread Roman Gilg
Add 'queue_vblank', 'flush' and 're_execute' hooks, that are supposed to be shared with other flip modes. Signed-off-by: Roman Gilg --- present/present_priv.h | 12 present/present_scmd.c | 3 +++ 2 files changed, 15 insertions(+) diff --git

[PATCH xserver v3 00/22] Per window flips in Present with support for them in Xwayland

2018-03-13 Thread Roman Gilg
This revision rebases the patch set on current master and does changes requested by Michel Dänzer. Please note that while compilation works fine for me, I can't test the runtime any longer because the latest changes to xserver master require a newer mesa build, and although I tried extensively I

[PATCH xserver v3 01/24] present: Move screen flip functionality in separate file

2018-03-13 Thread Roman Gilg
As a preperation for future flip mode alternatives move most of the functionality from 'present.c' into a separate file. Leave some functions needed by future other flip modes in 'present.c'. Signed-off-by: Roman Gilg --- present/Makefile.am|1 + present/meson.build

Re: [PATCH xserver] dix: don't free() stack memory

2018-03-13 Thread Eric Engestrom
On Tuesday, 2018-03-13 12:09:40 +0100, Michel Dänzer wrote: > On 2018-03-13 11:56 AM, Eric Engestrom wrote: > > In function ‘doImageText’, > > inlined from ‘ImageText’ at dix/dixfonts.c:1513:5: > > dix/dixfonts.c:1492:9: warning: attempt to free a non-heap object > > ‘local_closure’

Re: [PATCH xserver] dix: don't free() stack memory

2018-03-13 Thread Michel Dänzer
On 2018-03-13 11:56 AM, Eric Engestrom wrote: > In function ‘doImageText’, > inlined from ‘ImageText’ at dix/dixfonts.c:1513:5: > dix/dixfonts.c:1492:9: warning: attempt to free a non-heap object > ‘local_closure’ [-Wfree-nonheap-object] > free(c); > ^ > > Signed-off-by:

[PATCH xserver] dix: don't free() stack memory

2018-03-13 Thread Eric Engestrom
In function ‘doImageText’, inlined from ‘ImageText’ at dix/dixfonts.c:1513:5: dix/dixfonts.c:1492:9: warning: attempt to free a non-heap object ‘local_closure’ [-Wfree-nonheap-object] free(c); ^ Signed-off-by: Eric Engestrom --- dix/dixfonts.c |

[PATCH xserver] exa: promise not to touch the data when swapping pointers

2018-03-13 Thread Eric Engestrom
exa/exa.c:525:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] swap(pExaGC, pGC, funcs); ^ Signed-off-by: Eric Engestrom --- exa/exa_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH xserver] Xext/saver: Swap ScreenSaverSuspend 'suspend' field. Handle old XCB clients.

2018-03-13 Thread Mihai Moldovan
* On 03/12/2018 08:27 PM, Keith Packard wrote: > This field was defined as a Bool in the protocol headers and BOOL in > xcb. Bool is not a valid type for protocol fields. It is defined as > 'int' by Xdefs.h, which we expect to be 32-bits on all machines. > > The protocol headers and xcb have