The Compositor Modules are released, the modular C++ library for writing Wayland compositors

2024-03-06 Thread Roman Gilg
I'm happy to announce the first publicly available release of The Compositor Modules, the modular C++ library to easily write a Wayland compositor. The release is available on GitHub. [1] You can read the full announcement with more details about the library exclusively on Phoronix. [2] The goal

Re: Plumbing explicit synchronization through the Linux ecosystem

2020-03-18 Thread Roman Gilg
On Wed, Mar 11, 2020 at 8:21 PM Jason Ekstrand wrote: > > On Wed, Mar 11, 2020 at 12:31 PM Jason Ekstrand wrote: > > > > All, > > > > Sorry for casting such a broad net with this one. I'm sure most people > > who reply will get at least one mailing list rejection. However, this > > is an issue

Re: libXfont2 strlcat/strlcpy patch

2019-12-06 Thread Roman Gilg
On Wed, Nov 20, 2019 at 1:53 AM Guillem Jover wrote: > > Hi! > > On Sun, 2019-11-03 at 18:08:00 +0100, Roman Gilg wrote: > > On Wed, Oct 23, 2019 at 5:33 PM Alan Coopersmith wrote: > > > On 10/23/19 12:48 AM, Michael Joost wrote: > > > > regarding your

Re: Individuals interested in VESA memberships?

2019-11-03 Thread Roman Gilg
On Fri, Nov 1, 2019 at 9:06 PM Lyude Paul wrote: > > Hi! Recently I've been working with the rest of the X.Org board to try to get > X.org access to VESA memberships so that contributors that don't have an > employer who is able/willing to join VESA can potentially get access to the > various

Re: libXfont2 strlcat/strlcpy patch

2019-11-03 Thread Roman Gilg
On Wed, Oct 23, 2019 at 5:33 PM Alan Coopersmith wrote: > > On 10/23/19 12:48 AM, Michael Joost wrote: > > Hi Alan, > > > > regarding your recent patch in xorg/libXfont2 (strlcat/strlcpy fallbacks) I > > ran into a problem on Linux while having libbsd installed. The configure > > correctly

Re: [PATCH] Xwayland: fix output changes not getting applied in some, cases

2019-04-22 Thread Roman Gilg
On Mon, Apr 22, 2019 at 1:30 PM Ferdi265 wrote: > > Hello, > > I investigated a bug I encountered while using the Sway Compositor and > traced it back to some behaviour in Xwayland: > > The xdg_output and wl_output events are handled in such a way that > output changes (e.g. position) sometimes

Re: [PATCH xserver] xwayland: use wl_surface_damage_buffer

2018-11-07 Thread Roman Gilg
On Tue, Nov 6, 2018 at 7:50 AM Simon Ser wrote: > > On Monday, November 5, 2018 3:24 PM, Pekka Paalanen > wrote: > > I don't think it's a good idea to break Xwayland completely on > > compositors that don't implement wl_surface version 4 or greater. > > > > It would make sense to bind

Re: [PATCH xserver 1/2] present: cancel flip on reparenting

2018-10-03 Thread Roman Gilg
I'm a bit unsure on that one. I thought there is no cleanup code necessary in Present on a reparent because in theory the current Present code alone allows clients to flip arbitrary many child windows to a certain parent window as long as they have the same dimension as the parent. Of course a

Re: [RFC PATCH xserver] xwayland: Avoid assert failure in flips_stop()

2018-09-21 Thread Roman Gilg
Great detailed analysis in the backtrace! :) What confused me at first was that the present_wnmd_flips_stop function is called at all in this state because it should only be called when at least one flip has been done and in this case xwl_window->present_window must have been set to the

Re: [PATCH v2] present: fix freed pointer access

2018-09-04 Thread Roman Gilg
Ok, I just got a failing assert in xwl_present_flips_stop with the patch when opening a context menu in Steam. Seems the xwl_present_flips_stop call is coming in too late now after the presenting window has already been changed. > #0 __GI_raise (sig=sig@entry=6) at

Re: [PATCH v2] present: fix freed pointer access

2018-09-04 Thread Roman Gilg
So I have it running now without problems for a few days. I tested it once with CS:GO and Hitman and there were no crashes. I can't test the suspend recovery because this is currently not working due to a problem in KWin. Tested-by: Roman Gilg ___ xorg

Re: [PATCH v2] present: fix freed pointer access

2018-08-27 Thread Roman Gilg
On Mon, Aug 27, 2018 at 2:06 AM Lionel Landwerlin < lionel.g.landwer...@intel.com> wrote: > v2: Still notify aborted flips (Roman) I also want to test it later this week when I've finished some other work, but for now: Reviewed-by: R

Re: [PATCH] present: fix freed pointer access

2018-08-25 Thread Roman Gilg
Looking at the code I think it would be better to not use an else, but put the present_vblank_notify call before the if (vblank->abort_flip) line. Even if the flip was aborted, the client should receive a complete event. At least that's what we do in case of screen flips. On Fri, Aug 24, 2018 at

Re: [PATCH] present: fix freed pointer access

2018-08-25 Thread Roman Gilg
The Valgrind backtrace is very similar to the gdb backtraces in: https://bugs.freedesktop.org/show_bug.cgi?id=106620 The patch could be a fix for this bug as well, which would be awesome. ___ xorg-devel@lists.x.org: X.Org development Archives:

Re: [PATCH xserver v3] xwayland: use pixmap size on present flip

2018-06-10 Thread Roman Gilg
The only question open to me is how the window and pixmap size can be different at all at this point. But taking the Pixmap size is in any case better. I reviewed v3 on patchworks. Reviewed-by: Roman Gilg ___ xorg-devel@lists.x.org: X.Org development

Re: [PATCH xserver] present/wnmd: Preserve window pixmap's screen_x/y on flip

2018-06-08 Thread Roman Gilg
window flip mode" Thank you for patching this difficult to find issue. That's a behavioral change to screen flips, that I missed. Reviewed-by: Roman Gilg ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel

Re: [PATCH xserver 1/4] xwayland: Don't create a "fake" crtc for Present

2018-05-08 Thread Roman Gilg
the time and the msc counter is monotonically counting for a window so there should be no need to have different CRTCs for different msc counters. Tested the patch in a Plasma session with VLC and Skype. Tested-by: Roman Gilg <subd...@gmail.com> Reviewed-by: Roman Gilg <subd...@gmail.com>

Re: [Mesa-dev] [PATCH 1/2] loader_dri3: Wait for pending swaps to complete before drawable_fini.

2018-05-05 Thread Roman Gilg
On Sat, May 5, 2018 at 8:50 PM, Mario Kleiner wrote: > Thanks. Can you see if you get any freezes in kwin_x11 by "violent > alt-tabbing" with patch 1? I've seen two such freezes within 8 hours > of normal use yesterday, each occuring when i alt-tabbed (normally) > and

Re: [Mesa-dev] [PATCH 1/2] loader_dri3: Wait for pending swaps to complete before drawable_fini.

2018-05-05 Thread Roman Gilg
Without this patch plasmashell on Xserver/Mesa master freezes on me when opening the launcher menu (Kickoff). With the patch haven't experienced freezes yet. Haven't tested the Steam client yet. Might be a different problem though. Tested-by: Roman Gilg <subd...@gmail.com> On Fri, May 4

Re: [RFC xserver] xwayland: persistent window struct on present

2018-05-04 Thread Roman Gilg
, which always get discarded on unmap. So that the change directly worked for you without regressions is probably a consequence of that. On Fri, May 4, 2018 at 10:05 AM, Olivier Fourdan <ofour...@redhat.com> wrote: > Hi Roman, > > On Fri, May 4, 2018 at 3:07 AM, Roman Gilg <subd..

[RFC xserver] xwayland: persistent window struct on present

2018-05-03 Thread Roman Gilg
Instead of reusing xwl_window introduce a persistent window struct for every window, that asks for Present flips. This struct saves all relevant data and is only freed on window destroy. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/xwayland-present.c

[PATCH xserver] present: in get_ust_msc hook of wnmd provide CRTC as argument

2018-05-02 Thread Roman Gilg
correctly in present_wnmd_window_to_crtc_msc. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/xwayland-present.c | 10 +- present/present.h | 2 +- present/present_wnmd.c | 14 +- 3 files changed, 19 insertions(+), 7 deletions(-) diff --gi

[PATCH xserver] modesetting: set gbm as dependency in meson build

2018-05-02 Thread Roman Gilg
Modifiers support needs gbm as a dependency. Without setting the dependency included headers are not found reliably and the build might fail if the headers are not placed in the default system include paths. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xfree86/drivers/modes

Re: [PATCH xserver] present: fix msc offset calculation in window mode

2018-04-21 Thread Roman Gilg
the window_priv->msc value instead). On Fri, Apr 20, 2018 at 6:11 PM, Michel Dänzer <mic...@daenzer.net> wrote: > On 2018-04-20 05:10 PM, Roman Gilg wrote: >> Instead of getting the current msc value from the window, which might be >> different to old one directly take

Re: [PATCH xserver] present: fix msc offset calculation in window mode

2018-04-21 Thread Roman Gilg
On Fri, Apr 20, 2018 at 6:23 PM, Olivier Fourdan wrote: > Unfortunately, contrary to my initial tests, the black window still occurs > randomly even with that patch applied. That's unfortunate. How severe is it? Is it just for a short period or longer? I believe you said on IRC

[PATCH xserver] xwayland: restrict present cleanup to presenting and top parent window

2018-04-20 Thread Roman Gilg
Clean up only if the request points to the presenting window or its top parent window. Since in this case all events are removed unconditionally, always stop the timer. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/xwayland-present.c | 16 1 file chan

[PATCH xserver] present: fix msc offset calculation in window mode

2018-04-20 Thread Roman Gilg
Instead of getting the current msc value from the window, which might be different to old one directly take the last saved msc value saved in the window_priv struct. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/present_wnmd.c | 7 +-- 1 file changed, 1 insertion(+), 6 del

Re: [PATCH xserver] xwayland: Clean up all frame callbacks

2018-04-19 Thread Roman Gilg
Reviewed-by: Roman Gilg <subd...@gmail.com> On Thu, Apr 19, 2018 at 9:13 AM, Olivier Fourdan <ofour...@redhat.com> wrote: > Regardless of the order we un-realize windows. > > Suggested-by: Roman Gilg <subd...@gmail.com> > Signed-off-by: Olivier Fourdan <ofour...

Re: [PATCH xserver v2] xwayland: avoid using freed xwl_window on unrealize

2018-04-18 Thread Roman Gilg
On Wed, Apr 18, 2018 at 4:02 PM, Olivier Fourdan wrote: > diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c > index f403ff701..e835a1399 100644 > --- a/hw/xwayland/xwayland-present.c > +++ b/hw/xwayland/xwayland-present.c > @@ -73,13 +73,9 @@

Re: Quick heads-up, Xwayland present code causing memory corruption and crashes

2018-04-18 Thread Roman Gilg
yladn from 1.20 rc4. Sorry for the annoyances. But I'm of course very glad you found them before release. Thanks! > This is due to commit 82df2ce3: > > Author: Roman Gilg <subd...@gmail.com> > Date: Tue Aug 22 15:38:26 2017 +0200 > > xwayland: Avoid repeatedl

Re: [PATCH xserver] xwayland: Fix build without glamor

2018-04-16 Thread Roman Gilg
Thank you Olivier. Sorry for that. An alternative solution would be to only ifdef out the xwl_glamor_pixmap_get_wl_buffer call in xwl_present_flip and otherwise return FALSE. But we then would needlessly still build the Present support when compiling without glamor. Reviewed-by: Roman Gilg <s

Re: Bug 105851 Xserver 1.20 RC2+ issues with Kwin + Present 1.2

2018-04-09 Thread Roman Gilg
On Sat, Apr 7, 2018 at 9:56 AM, Mike Lothian wrote: > Switching to glx from egl gets things started for me Do you mean switching from egl to glx as in switching the compositing backend? And it did not work with egl backend but with glx? The egl backend on X in KWin isn't

[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 <subd...@gmail.com> --- hw/xwayland/xwayland.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/hw/xwayland/xwayla

[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 <subd...@gmail.com> --- hw/xwayland/xwayland-present.

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

2018-03-13 Thread Roman Gilg
to not suddenly regress on Xwayland only. The sample client, that triggers this behavior, is the Steam client. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/xwayland-present.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-pre

[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
ake use of this functionality Xwayland must run rootless and with Glamor/GBM. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/Makefile.am| 1 + hw/xwayland/meson.build| 1 + hw/xwayland/xwayland-present.c | 366 + hw

[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 <subd...@gmail.com> --- present/present.h | 43 +++ present/present_priv.h | 1 + 2 files chang

[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 <subd...@gmail.com> --- hw/xwayland/xwayland-glamor.c | 23 +-- hw/xw

[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 <subd...@gmail.com> --- present/present_screen.c | 33 - present/present_vblank.c | 2 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff

[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 <subd...@gmail.com> --- present/present.h | 3 ++- present/present_wnmd.c | 24 +--- 2 files changed, 15 insertions(

[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 <subd...@gmail.com> --- 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

[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 <subd...@gmail.com> --- present/present.c| 28 present/present_priv.h | 33 + present/present_scmd.c

[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 <subd...@gmail.com> --- present/present_execute.c | 2 ++ present/present_priv.h| 10 +++--- present/present_scmd.c

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

2018-03-13 Thread Roman Gilg
introduces the new mode as a stub. It additionally needs a driver hook, such that it can get initialized and appropriate cleanup functions. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/Makefile.am| 3 +- present/meson.build| 1 + present/present.h | 6 + p

[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 <subd...@gmail.com> --- present/present_priv.h | 1 + present/present_vblank.c | 1 + 2 files changed, 2 insertions(+) diff --git a/p

[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 <subd...@gmail.com> --- present/present_priv.h | 10 ++ present/present_screen.c | 6 ++ 2 files chang

[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 <subd...@gmail.com> --- present/present_screen.c | 46 +- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/present/present_scre

[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 <subd...@gmail.com> --- present/present.c | 38 ++ present/present_priv.h | 7 +++ present/present_scmd.

[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 <subd...@gmail.com> --- present/Makefile.am | 1 + present/meson.build | 1 + present/present_execute.c

[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 <subd...@gmail.com> --- present/present.c | 9 + present/present_priv.h | 2 ++ present/present_scmd.c | 5 +++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff

[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 <subd...@gmail.com> --- present/Makefile.am | 3 +- present/meson.build | 1 + present/present_priv.h

[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 <subd...@gmail.com> --- present/present_priv.h | 27 --- p

[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 <subd...@gmail.com> --- present/present.c | 57 ++ present/present_priv.h | 68 +++--- present/present_scmd.

[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 <subd...@gmail.com> --- present/present_priv.h | 12 present/present_scmd.c | 3 +++ 2 files changed, 15 insertions(+) diff --git a/p

[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 <subd...@gmail.com> --- present/Makefile.am|1 + present/meson

Re: [PATCH xserver v2 22/22] xwayland: Guard against very late vblanks

2018-02-28 Thread Roman Gilg
On Wed, Feb 28, 2018 at 6:43 PM, Michel Dänzer wrote: > I'm unable to reproduce the issue you described with Steam (without this > patch series applied). I'd really like to know where the bogus target > MSC values you're seeing are coming from. What are the values of the >

[PATCH xserver v2 22/22] xwayland: Guard against very late vblanks

2018-02-28 Thread Roman Gilg
to an erroneous 64 to 32bit conversion. The sample client, that triggers this behavior, is the Steam client. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/xwayland-present.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xw

[PATCH xserver v2 21/22] xwayland: Implement queuing present vblanks

2018-02-28 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 v2 18/22] xwayland: Add arguments to glamor_pixmap_get_wl_buffer

2018-02-28 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 <subd...@gmail.com> --- hw/xwayland/xwayland-glamor.c | 19 +++ hw/xwayland/xway

[PATCH xserver v2 20/22] xwayland: Add fallback timer for msc counting

2018-02-28 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 <subd...@gmail.com> --- hw/xwayland/xwayland-present.

[PATCH xserver v2 19/22] xwayland: Preliminary support for Present's new window flip mode

2018-02-28 Thread Roman Gilg
ake use of this functionality Xwayland must run rootless and with Glamor/GBM. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/Makefile.am| 1 + hw/xwayland/meson.build| 1 + hw/xwayland/xwayland-present.c | 365 + hw

[PATCH xserver v2 14/22] present: Add window flip mode

2018-02-28 Thread Roman Gilg
introduces the new mode as a stub. It additionally needs a driver hook, such that it can get initialized and appropriate cleanup functions. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/Makefile.am| 3 +- present/meson.build| 1 + present/present.h | 6 + p

[PATCH xserver v2 16/22] present: Add cleanups for window flip mode

2018-02-28 Thread Roman Gilg
Make sure that vblanks and windows get cleaned up correctly in window flip mode. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/present_screen.c | 33 - present/present_vblank.c | 2 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff

[PATCH xserver v2 10/22] present: Add present_window_priv properties for window flip mode

2018-02-28 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 <subd...@gmail.com> --- present/present_priv.h | 10 ++ present/present_screen.c | 6 ++ 2 files chang

[PATCH xserver v2 17/22] present: Add exported init function of window flip mode

2018-02-28 Thread Roman Gilg
Allow drivers now to initialize window flip mode. Signed-off-by: Roman Gilg <subd...@gmail.com> --- 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

[PATCH xserver v2 15/22] present: In window flip mode report damage on flip to driver

2018-02-28 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 <subd...@gmail.com> --- present/present.h | 3 ++- present/present_wnmd.c | 24 +--- 2 files changed, 15 insertions(

[PATCH xserver v2 11/22] present: Add flip_idler vblank property

2018-02-28 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 <subd...@gmail.com> --- present/present_priv.h | 1 + present/present_vblank.c | 1 + 2 files changed, 2 insertions(+) diff --git a/p

[PATCH xserver v2 13/22] present: Add driver facing window flip mode hooks

2018-02-28 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 <subd...@gmail.com> --- present/present.h | 43 +++ present/present_priv.h | 1 + 2 files chang

[PATCH xserver v2 12/22] present: Adapt flip mode API hooks for window flip mode

2018-02-28 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 <subd...@gmail.com> --- present/present_execute.c | 2 ++ present/present_priv.h| 10 +++--- present/present_scmd.c

[PATCH xserver v2 07/22] present: Move timings adjustment in common part of flip mode API

2018-02-28 Thread Roman Gilg
To reduce future code duplication refactor timings adjustment out as a separate function. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/present.c | 38 ++ present/present_priv.h | 7 +++ present/present_scmd.

[PATCH xserver v2 03/22] present: Move vblank functionality in seperate file

2018-02-28 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 <subd...@gmail.com> --- present/Makefile.am | 3 +- present/meson.build | 1 + present/present_priv.h

[PATCH xserver v2 08/22] present: Add more hooks to internal flip mode API

2018-02-28 Thread Roman Gilg
Add hooks to query caps, get crtcs, abort vblanks and destroy a flip. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/present.c| 28 present/present_priv.h | 33 + present/present_scmd.c

[PATCH xserver v2 09/22] present: Refactor present_screen_init

2018-02-28 Thread Roman Gilg
To initialize easily different flip modes, refactor 'present_screen_init'. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/present_screen.c | 46 +- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/present/present_scre

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

2018-02-28 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 <subd...@gmail.com> --- present/present_priv.h | 12 present/present_scmd.c | 3 +++ 2 files changed, 15 insertions(+) diff --git a/p

[PATCH xserver v2 06/22] present: Add flip mode API hook for present_pixmap

2018-02-28 Thread Roman Gilg
Make present_pixmap a common function callable by any flip mode. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/present.c | 57 ++ present/present_priv.h | 68 +++--- present/present_scmd.

[PATCH xserver v2 05/22] present: Refactor execute in separate file

2018-02-28 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 <subd...@gmail.com> --- present/Makefile.am | 1 + present/meson.build | 1 + present/present_execute.c

[PATCH xserver v2 01/22] present: Move screen flip functionality in separate file

2018-02-28 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 <subd...@gmail.com> --- present/Makefile.am| 1 + present/meson

[PATCH xserver v2 02/22] present: Preliminary internal flip mode API

2018-02-28 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 <subd...@gmail.com> --- present/present_priv.h | 26 +++--- p

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

2018-02-28 Thread Roman Gilg
This revision provides changes requested by Michel Dänzer. In particular flips without copies in window flip mode are now possible and clients can queue flips on Xwayland. ___ xorg-devel@lists.x.org: X.Org development Archives:

Re: xserver 1.20 RC1 tomorrow

2018-02-27 Thread Roman Gilg
On Tue, Feb 27, 2018 at 10:59 PM, Adam Jackson wrote: > 4) https://patchwork.freedesktop.org/series/37274/ > Per-window flips for Xwayland. No xfree86 changes. Michel gave me feedback on my patches in the last weeks and I did changes to some parts because of that. I planned on

[PATCH] Correct xorg_list_is_empty return value description

2018-02-09 Thread Roman Gilg
The helper xorg_list_is_empty returns True when the list is empty and not when it contains one or more elements. Signed-off-by: Roman Gilg <subd...@gmail.com> --- include/list.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/list.h b/include/list.h index 3

[PATCH xserver] Correct xorg_list_is_empty return value description The helper xorg_list_is_empty returns True when the list is empty and not when it contains one or more elements.

2018-02-09 Thread Roman Gilg
Signed-off-by: Roman Gilg <subd...@gmail.com> --- include/list.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/list.h b/include/list.h index 3f0574d..f81d97f 100644 --- a/include/list.h +++ b/include/list.h @@ -211,7 +211,8 @@ xorg_list_del(struct xorg_list

Re: [PATCH 14/19] present: Add window flip mode

2018-02-06 Thread Roman Gilg
On Fri, Feb 2, 2018 at 5:11 PM, Michel Dänzer wrote: > Taking a step back, do we even need to keep around the original pixmap > and unflip to it at all? I had a chat on IRC about this with Keith a > while ago, see the attached log excerpt. > > Keith's main concern is that the

Re: [PATCH 14/19] present: Add window flip mode

2018-02-02 Thread Roman Gilg
decided to first go for a simple implementation by just copying the pixmap content in order to decrease the overall complexity of the patch set. On Thu, Feb 1, 2018 at 4:33 PM, Michel Dänzer <mic...@daenzer.net> wrote: > On 2018-01-29 02:34 PM, Roman Gilg wrote: >> In contrast to s

Re: [PATCH 13/19] present: Add driver facing window flip mode hooks

2018-01-29 Thread Roman Gilg
> wrote: > On Mon, 2018-01-29 at 14:34 +0100, Roman Gilg wrote: > >> @@ -100,6 +128,21 @@ typedef struct present_screen_info { >> >> } present_screen_info_rec, *present_screen_info_ptr; >> >> +typedef struct present_wnmd_info { >> +uint32_t

[PATCH xserver] xwayland: Queue Present events

2018-01-29 Thread Roman Gilg
Add functionality for queuing events as requested by Present. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/xwayland-present.c | 73 +- 1 file changed, 51 insertions(+), 22 deletions(-) diff --git a/hw/xwayland/xwayland-present.

[RFC][PATCH xserver] xwayland: Queue Present events

2018-01-29 Thread Roman Gilg
This is a RFC on a follow-up patch to my recently posted patch series on the xorg-devel mailing list to enable per window flips of Present Pixmaps to Wayland surfaces: https://lists.freedesktop.org/archives/xorg-devel/2018-January/055674.html With the attached patch queuing events should be

Re: [RFC][PATCH xserver] Multi-buffered flips on subsurfaces seg fault in Mesa

2018-01-29 Thread Roman Gilg
/2018-January/055674.html The above patch series only allows flips..." and so on. On Mon, Jan 29, 2018 at 5:54 PM, Roman Gilg <subd...@gmail.com> wrote: > The above patch series only allows flips on a child window with the same > dimensions as its parent xwl_window. For

[PATCH xserver] xwayland: Flips on subsurfaces

2018-01-29 Thread Roman Gilg
Do flips for child windows via subsurfaces if the Wayland server supports them. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/xwayland-present.c | 57 +- hw/xwayland/xwayland.c | 6 - hw/xwayland/xwayland.h

[RFC][PATCH xserver] Multi-buffered flips on subsurfaces seg fault in Mesa

2018-01-29 Thread Roman Gilg
The above patch series only allows flips on a child window with the same dimensions as its parent xwl_window. For flips on child windows (for example the video view port of a video player in windowed mode, see here: http://www.subdiff.de/assets/images/2017-07-28-a-new-beginning.jpg) I wanted to

[PATCH 16/19] present: Add cleanups for window flip mode

2018-01-29 Thread Roman Gilg
Make sure that vblanks and windows get cleaned up correctly in window flip mode. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/present_screen.c | 33 - present/present_vblank.c | 2 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff

[PATCH 19/19] xwayland: Preliminary support for present's new window flip mode

2018-01-29 Thread Roman Gilg
han the xwl_window, * queuing events to MSC times, * reporting UST values to present. To make use of this functionality Xwayland must run rootless and with Glamor/GBM. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/Makefile.am| 1 + hw/xwayland/meson.build| 1 + hw

[PATCH 18/19] xwayland: Add arguments to glamor_pixmap_get_wl_buffer

2018-01-29 Thread Roman Gilg
Add arguments to allow 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 <subd...@gmail.com> --- hw/xwayland/xwayland-glamor.c | 22 ++ hw/xw

[PATCH 17/19] present: Add exported init function of window flip mode

2018-01-29 Thread Roman Gilg
Allow drivers now to initialize window flip mode. Signed-off-by: Roman Gilg <subd...@gmail.com> --- 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

[PATCH 14/19] present: Add window flip mode

2018-01-29 Thread Roman Gilg
#endif /* _PRESENT_PRIV_H_ */ diff --git a/present/present_wnmd.c b/present/present_wnmd.c new file mode 100644 index 000..c428232 --- /dev/null +++ b/present/present_wnmd.c @@ -0,0 +1,672 @@ +/* + * Copyright © 2018 Roman Gilg + * + * Permission to use, copy, modify, distribute, and sell this software a

[PATCH 05/19] present: Refactor execute in separate file

2018-01-29 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 <subd...@gmail.com> --- present/Makefile.am | 1 + present/meson.build | 1 + present/present_execute.c

[PATCH 15/19] present: In window flip mode report damage on flip to driver

2018-01-29 Thread Roman Gilg
Calculate damage before trying to flip and report it to the driver. This allows supporting drivers to optimize their rendering. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/present.h | 3 ++- present/present_wnmd.c | 24 +--- 2 files changed, 15 inse

[PATCH 09/19] present: Refactor present_screen_init

2018-01-29 Thread Roman Gilg
To initialize easily different flip modes, refactor 'present_screen_init'. Signed-off-by: Roman Gilg <subd...@gmail.com> --- present/present_screen.c | 46 +- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/present/present_scre

  1   2   >