[PATCH wayland v4 07/11] client: Plug a race in proxy destruction vs. dispatch

2017-12-28 Thread Daniel Stone
-leak series. Signed-off-by: Daniel Stone Cc: Jonas Ådahl Cc: Derek Foreman Cc: Pekka Paalanen --- src/wayland-client.c | 57 +--- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index

[PATCH wayland v4 02/11] client: Add WL_MAP_ENTRY_ZOMBIE flag

2017-12-28 Thread Daniel Stone
. wl_object_is_zombie() now solely uses the new flag to determine whether or not the object is a zombie. [daniels: Extracted from Derek's bespoke-zombie patch as an intermediate step.] Signed-off-by: Derek Foreman Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone ---

[PATCH wayland v4 03/11] client: Restructure delete_id handler control flow

2017-12-28 Thread Daniel Stone
From: Derek Foreman This makes it easier for future patches in the series, which can possibly return NULL for extant map entries. [daniels: Extracted from Derek's bespoke-zombie patch as an intermediate step.] Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/wa

[PATCH wayland v4 08/11] client: Replace the singleton zombie with bespoke zombies

2017-12-28 Thread Daniel Stone
ned-off-by: Derek Foreman Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/wayland-client.c | 82 +--- 1 file changed, 78 insertions(+), 4 deletions(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 987418a1..62d4f222 100644

[PATCH wayland v4 05/11] client: Use refcount exclusively for destruction

2017-12-28 Thread Daniel Stone
: Daniel Stone Cc: Jonas Ådahl Cc: Derek Foreman --- src/wayland-client.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 21ef5b04..55838cd9 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -258,7

[PATCH wayland v4 00/11] Stop leaking file descriptors

2017-12-28 Thread Daniel Stone
Hi, This is an update of Derek's patch series, after some discussions between us. I've pushed patches 1-6 from his v3 series, and retained 8-10 almost completely untouched in this submission; the main change is turning patch 7 into 5 patches. There are some more cosmetic changes which Derek mostly

[PATCH wayland v4 09/11] client: Consume file descriptors destined for zombie proxies

2017-12-28 Thread Daniel Stone
for live proxies) Signed-off-by: Derek Foreman Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/connection.c | 6 ++ src/wayland-client.c | 8 src/wayland-private.h | 3 +++ 3 files changed, 17 insertions(+) diff --git a/src/connection.c b/src/connection.c index

[PATCH wayland v4 04/11] client: Remove WL_ZOMBIE_OBJECT global

2017-12-28 Thread Daniel Stone
ed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/wayland-client.c | 2 +- src/wayland-private.h | 3 --- src/wayland-util.c| 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 83f76ec2..21ef5b04 100644 --- a/src/wa

[PATCH wayland v4 01/11] client: Add wl_object_is_zombie() helper function

2017-12-28 Thread Daniel Stone
From: Derek Foreman Add a helper function which determines whether or not an object is a zombie. [daniels: Extracted from Derek's bespoke-zombie patch as an intermediate step.] Signed-off-by: Derek Foreman Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/connect

[PATCH wayland v4 10/11] tests: Add a test for fd leaks on zombie objects

2017-12-28 Thread Daniel Stone
From: Derek Foreman Until recently, if a client destroying a resource raced with the server generating an event on that resource that delivered a file descriptor, we would leak the fd. This tests for a leaked fd from that race condition. Reviewed-by: Daniel Stone Signed-off-by: Derek Foreman

[PATCH wayland v4 06/11] client: Add wl_proxy_unref helper

2017-12-28 Thread Daniel Stone
Rather than open-coded decrement-and-maybe-free, introduce a wl_proxy_unref helper to do this for us. This will come in useful for future patches, where we may also have to free a zombie object. Signed-off-by: Daniel Stone Cc: Jonas Ådahl Cc: Derek Foreman --- src/wayland-client.c | 37

[PATCH wayland v4 11/11] tests: Check for wrong fd delivery with zombie objects

2017-12-28 Thread Daniel Stone
zombie's fd would be delivered instead. This test recreates that situation. While this is a ridiculously contrived way to force this race - delivering an event from a destruction handler - I do have reports of this race being hit in real world code. Signed-off-by: Derek Foreman Acked-by: Daniel

Re: [PATCH wayland v4 08/11] client: Replace the singleton zombie with bespoke zombies

2018-01-09 Thread Daniel Stone
Hi, On 3 January 2018 at 22:25, Derek Foreman wrote: > On 2017-12-28 01:53 PM, Daniel Stone wrote: >> @@ -434,10 +499,14 @@ proxy_destroy(struct wl_proxy *proxy) >> if (proxy->flags & WL_PROXY_FLAG_ID_DELETED) { >> wl_map_remove(&proxy->

Re: [PATCH wayland v4 08/11] client: Replace the singleton zombie with bespoke zombies

2018-01-11 Thread Daniel Stone
Hi Simon, On 10 January 2018 at 17:47, Simon McVittie wrote: > On Wed, 10 Jan 2018 at 11:03:03 -0600, Derek Foreman wrote: >> I suspect 100% of the software I work on on a daily basis will explode in >> completely unpredictable and undiagnosable ways in response to a malloc() >> failure anyway >

Re: Planning for another Wayland release

2018-01-12 Thread Daniel Stone
Hi Bryce, On 12 January 2018 at 00:31, Bryce Harrington wrote: > Is there interest in another release at this time? It's been about a > 1/2 year since last release, so feels due. I could do a schedule > something like: > > For Wayland 1.15.0 and Weston 4.0.0: > > - Alpha on Tuesday, Jan 16 H

Re: [PATCH v14 01/41] compositor-drm: Add shutting_down flag

2018-01-16 Thread Daniel Stone
Hi Pekka, On 15 January 2018 at 15:05, Pekka Paalanen wrote: > this patch is both trivial and lacking any rationale on why it was > written, with obviously no impact on its own. Would be nice for > posterity to have some explanation on the why. I assume it was > something subtle or annoying. > >

Re: [PATCH v14 05/41] compositor-drm: Use drm_plane for cursor plane

2018-01-16 Thread Daniel Stone
Hi, On 16 January 2018 at 08:25, Pekka Paalanen wrote: > On Wed, 20 Dec 2017 12:26:22 + > Daniel Stone wrote: >> + switch (type) { >> + case WDRM_PLANE_TYPE_CURSOR: >> + format = GBM_FORMAT_ARGB; >&g

Re: [PATCH v14 06/41] compositor-drm: Use drm_plane for scanout plane

2018-01-16 Thread Daniel Stone
Hi, On 16 January 2018 at 14:30, Pekka Paalanen wrote: > On Wed, 20 Dec 2017 12:26:23 + > Daniel Stone wrote: >> @@ -3355,6 +3398,19 @@ drm_output_init_egl(struct drm_output *output, struct >> drm_backend *b) >> static void >> drm_output_fini

Re: [PATCH v14 09/41] compositor-drm: Track unused connectors and CRTCs

2018-01-16 Thread Daniel Stone
Hi Pekka, On 16 January 2018 at 15:19, Pekka Paalanen wrote: > On Wed, 20 Dec 2017 12:26:26 + > Daniel Stone wrote: >> Rather than a more piecemeal approach at backend creation, explicitly >> track connectors and CRTCs we do not intend to use, so we can ensure >>

Re: Planning for another Wayland release

2018-01-16 Thread Daniel Stone
Hi Bryce, On 12 January 2018 at 18:26, Bryce Harrington wrote: > On Fri, Jan 12, 2018 at 10:00:57AM +0000, Daniel Stone wrote: >> Given how much we could potentially be landing, I think we would need >> someone more actively involved (patch-herding, review, testing, >> li

Re: Planning for another Wayland release

2018-01-16 Thread Daniel Stone
Hey Bryce, On 12 January 2018 at 22:51, Derek Foreman wrote: > On 2018-01-12 04:00 AM, Daniel Stone wrote: >> I did a clearout of the review queue last month, but that's not yet >> complete, and I'd like someone to have a more structured look at the >> queue (or j

Re: [PATCH v14 11/41] compositor-drm: Move repaint state application to flush

2018-01-17 Thread Daniel Stone
Hi, On 17 January 2018 at 13:58, Pekka Paalanen wrote: > this is still a tricky one, sorry. > > I looked at the details here hard and long, and then came to a > revelation: is it at all possible to ever call drm_set_dpms() between > repaint_begin and repaint_flush/cancel? > > I don't think it is

Re: [PATCH v3 weston 0/4] GLES3 context support

2018-01-18 Thread Daniel Stone
Hi Derek, On 17 January 2018 at 19:59, Derek Foreman wrote: > On 2018-01-17 12:36 PM, Arnaud Vrac wrote: >> Here's the latest version of the patches to support a GLES3 context. >> >> Changes since v2 include: >> * add warning: prefix in the log message when GLES version cannot be >> determined

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-18 Thread Daniel Stone
Hi Olivier, On 18 January 2018 at 10:41, Olivier Fourdan wrote: > This is a rare occurrence of a crash in Xwayland for which I don't have > the reproducing steps, just a core file. > > The backtrace looks as follow: > > [...] > #6 > #7 xwl_glamor_pixmap_get_wl_buffer () at xwayland-glamo

Re: [PATCH] linux-dmabuf: send deprecated format events

2018-01-18 Thread Daniel Stone
Hi Philipp, On 16 January 2018 at 10:09, Philipp Zabel wrote: > On Fri, 2017-12-15 at 09:46 +0000, Daniel Stone wrote: >> Thanks for this! Could I please persuade you to take on one additional >> change though? > > Pending review of the additional change, could we

Re: [RFC weston] compositor: Implement runtime output transform changes

2018-01-18 Thread Daniel Stone
Hi Derek, On 17 January 2018 at 20:25, Derek Foreman wrote: > Some of the above looks like it could maybe be refactored and shared with > weston_output_move? > > Otherwise this looks fine to me: > > Reviewed-by: Derek Foreman Thanks for checking this out! > Daniel, you singled this out for rev

Re: [PATCH wayland v4 08/11] client: Replace the singleton zombie with bespoke zombies

2018-01-18 Thread Daniel Stone
Hi all, On 11 January 2018 at 15:44, Daniel Stone wrote: > On 10 January 2018 at 17:47, Simon McVittie wrote: >> I ask because the original authors of libdbus wrote it thinking that >> they had handled OOM conditions, at significant complexity cost, >> then later ad

Re: [PATCH weston 1/1] xwayland - input size calculation correction

2018-01-18 Thread Daniel Stone
Hi all, On 23 December 2017 at 01:13, Scott Moreau wrote: > I tested the initial patch and verified it does not fix the scenario I'm > trying, which is with two partially overlapping xcalc windows and hovering > the mouse over the buttons of the one below. > > Ian: > > The patch you submitted fix

Re: [PATCH v14 08/41] compositor-drm: Don't repaint if no damage

2018-01-18 Thread Daniel Stone
Hi, On 20 December 2017 at 12:26, Daniel Stone wrote: > If we don't have any damage for the primary plane, then don't force a > repaint; simply reuse the old buffer we already have. Thanks very much to Pekka and Philipp (in particular) for the review, and to those testing as w

Re: [PATCH v14 07/41] compositor-drm: Remove NULL checks in switch_mode

2018-01-18 Thread Daniel Stone
Hi, On 16 January 2018 at 14:34, Pekka Paalanen wrote: > On Wed, 20 Dec 2017 12:26:24 + > Daniel Stone wrote: >> Calling switch_mode with no output or mode never makes any sense. Drop >> the NULL checks. >> >> Signed-off-by: Daniel Stone >> ---

Re: [PATCH weston v4] xwm: Add icon support to the frame

2018-01-18 Thread Daniel Stone
Hi, On 3 December 2017 at 13:32, Emmanuel Gil Peyrot wrote: > On Fri, Dec 01, 2017 at 09:47:57PM +0100, Quentin Glidic wrote: >> I can’t find "width * 4" in the EWMH spec[1], I guess it’s well-known enough >> in this case. Maybe we need to check the Cairo stride matches "width * 4", >> just in ca

[PATCH] xwayland: Explicitly link with xcb-shape

2018-01-18 Thread Daniel Stone
xcb-shape and requiring it in configure. Signed-off-by: Daniel Stone Fixes: 332d1892bb ("xwm: do not include shadow in input region") Cc: Ian Ray --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9bad4e25a..1fac26

Re: [PATCH] xwayland: Explicitly link with xcb-shape

2018-01-18 Thread Daniel Stone
On 18 January 2018 at 12:34, Daniel Stone wrote: > XWM uses xcb-shape as of 332d1892bb, to exclude the shadow from the > input region. However, it does not explicitly link xcb-shape for the new > symbols; on one of my machines this is pulled in as a transient > dependency (masking the

Re: [PATCH wayland-protocols v2] unstable: Add input-timestamps protocol

2018-01-18 Thread Daniel Stone
k on me) got the chance to look at the Weston implementation, but the protocol is also: Reviewed-by: Daniel Stone Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Re: Weston stuff: fractional HiDPI, FreeBSD, Rust

2018-01-18 Thread Daniel Stone
Hi Greg, On 14 December 2017 at 08:21, Pekka Paalanen wrote: > On Thu, 14 Dec 2017 03:05:59 +0300 > Greg V wrote: >> - FreeBSD support: https://github.com/myfreeweb/weston/commit/5827840c8 >> 2b9d0a302d5c54c514ca6f4238e12de > > In theory I'd support this, but I'm sure we'll have some bikesheddin

Re: Future of xdg-shell v5 support in weston

2018-01-19 Thread Daniel Stone
Hi, On 19 January 2018 at 16:21, Derek Foreman wrote: > It's my opinion that supporting xdg-shell final is rather important for the > wayland reference compositor. > > So, I think we need to consider removing xdg-shell v5 from weston and its > included clients as soon as is reasonable. > > It sho

Re: [PATCH wayland] tests: Add missing file to distribution

2018-01-19 Thread Daniel Stone
On 19 January 2018 at 17:37, Derek Foreman wrote: > In f74c9b98db49ce16e037c3012590c4a24a4fc32e I added tests.xml to the > repository, but not to the distribution. Oops. :( Reviewed-by: Daniel Stone Cheers, Daniel ___ wayland-devel mailin

Re: [PATCH wayland] connection: Clear correct args when clearing fds to -1

2018-01-22 Thread Daniel Stone
On 22 January 2018 at 08:07, Pekka Paalanen wrote: > On Fri, 19 Jan 2018 15:20:31 -0600 > Derek Foreman wrote: >> commit 52609ddf79a96fee0465006e2c6339a3a5d23a87 was intended to >> set fds to -1 in the arg list, however it failed to account for >> version information at the start of signatures. >

Re: [PATCH] gl-renderer: Create a high priority context

2018-01-22 Thread Daniel Stone
ll fallback to normal priority, but if successful it > will reschedule our rendering and all of its dependencies to execute > earlier, especially important when the GPU is being hogged by background > clients. > > Signed-off-by: Chris Wilson > Cc: Daniel Stone > --- >

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-23 Thread Daniel Stone
Hi, On 23 January 2018 at 09:42, Olivier Fourdan wrote: > On 22 January 2018 at 19:57, Adam Jackson wrote: >> That can't really be the problem. X drawables are never 0x0. > > Yeap, I don't know how we end with a pximap of size 0×0: > > [...] > (gdb) f 7 > #7 xwl_glamor_pixmap_get_wl_buffer (pix

Re: [PATCH xserver] xwayland: avoid a crash with empty window pixmaps

2018-01-24 Thread Daniel Stone
Hi, On 24 January 2018 at 16:17, Adam Jackson wrote: > On Wed, 2018-01-24 at 11:36 +0100, Olivier Fourdan wrote: >> So basically, just remove the “if >> (RegionNotEmpty(DamageRegion(xwl_window->damage)))” would suffice? > > Worth a try anyway. I'm still just guessing at the root cause. If it is

Re: [PATCH wayland-protocols] RFC: unstable: DRM lease support

2018-01-24 Thread Daniel Stone
Hi Marius, Thanks a lot for taking this on! It would be great to get this merged. On 24 January 2018 at 19:09, Marius Vlad wrote: > + > + > + This interface makes use of DRM lease written by Keith Packard. > + It requires libdrm at least 2.4.89 and a recent (4.15) kernel. A serio

Re: [PATCH weston] RFC: libweston/compositor-drm: Add support for drm-lease.

2018-01-24 Thread Daniel Stone
Hi Marius, The protocol changes I suggested would require a fair bit of work here, but I've enclosed a few comments on the implementation. Also, do you have a client you're using for this somewhere, that we could use to test? On 24 January 2018 at 19:11, Marius Vlad wrote: > @@ -1208,6 +1209,15

Re: [PATCH wayland-protocols] RFC: unstable: DRM lease support

2018-01-25 Thread Daniel Stone
Hi Marius, On 25 January 2018 at 10:17, Marius-cristian Vlad wrote: > > This interface seems a little idiosyncratic. Essentially, the client asks > > for creation of one lease (any lease), and the server returns it a lease > > with an ID. After that, the client destroys all the leases through t

Re: [PATCH weston] RFC: libweston/compositor-drm: Add support for drm-lease.

2018-01-25 Thread Daniel Stone
Hi Marius, On 25 January 2018 at 11:10, Marius-cristian Vlad wrote: > >> +struct drm_display { > >> + uint32_t connector_id; > >> + uint32_t crtc_id; > >> + uint32_t plane_id; > >> +}; > > > > This seems to get stored but not used after that? > > [mvlad] A helper struct to store

Re: [PATCH xserver] xwayland: remove dirty window unconditionally on unrealize

2018-01-25 Thread Daniel Stone
gt; unredirected immediately, before the damage is processed by Xwayland. > > Make sure to remove the dirty window from the damage list on unrealize > to prevent this from happening. > > Credit goes to Adam Jackson and Daniel Stone > for finding the root cause the issue. > >

Re: [PATCH v14 35/41] compositor-drm: Add modes to drm_output_propose_state

2018-01-29 Thread Daniel Stone
d1285ad3794f80d93178039be3cae1 On 26 January 2018 at 14:04, Pekka Paalanen wrote: > On Wed, 20 Dec 2017 12:26:52 + > Daniel Stone wrote: >> +enum drm_output_propose_state_mode { >> + DRM_OUTPUT_PROPOSE_STATE_MIXED, /**< mix renderer & planes */ >> + DRM

Re: [PATCH v14 03/41] compositor-drm: Introduce drm_plane_state structure

2018-01-30 Thread Daniel Stone
Hi Philipp, On 29 January 2018 at 10:19, Philipp Zabel wrote: > On Wed, 2017-12-20 at 12:26 +0000, Daniel Stone wrote: >> + wl_list_for_each(ps, &src->plane_list, link) { >> + /* Don't carry planes which are now disabled; these should be >> +

Re: [PATCH v14 10/41] compositor-drm: Disable unused CRTCs/connectors

2018-01-31 Thread Daniel Stone
Hi Pekka, On 17 January 2018 at 10:43, Pekka Paalanen wrote: > I have a recollection of having a rationale that the state_invalid flag > should stay per-output, but it seems those ideas were just optimization > that's probably moot anyway. I suppose with atomic, the per-output flag > would not ma

Re: [PATCH weston v5 09/36] cms-colord: find a good head

2018-02-01 Thread Daniel Stone
Hi, On 1 February 2018 at 22:00, Derek Foreman wrote: > On 2017-12-14 05:40 AM, Pekka Paalanen wrote: >> The 'head' member of 'struct weston_output' is going to go unused and >> then disappear, so stop using it and find a head from the proper list. >> >> However, this leaves a problem in cms-colo

Re: [PATCH weston v5 09/36] cms-colord: find a good head

2018-02-05 Thread Daniel Stone
Hi, On 5 February 2018 at 10:26, Pekka Paalanen wrote: > On Fri, 2 Feb 2018 13:40:49 -0600 > Derek Foreman wrote: >> At this point, I think whoever the first person to need clone+cms-colord >> simultaneously is going to have to step up and do some heavy lifting. >> >> As long as we're not silent

Re: Frame synchronisation

2018-02-05 Thread Daniel Stone
Hi Andrzej, On 3 February 2018 at 20:52, Andrzej Korwin-Mikke wrote: > Greetings, there is virtually no documentation on frame synchronisation on > the Internet, it's mentioned on four blogs with no explanation whatsoever. > How do I know when to draw? If frame callback is the only sensible way,

[PATCH v15 02/34] compositor-drm: Disable unused CRTCs/connectors

2018-02-05 Thread Daniel Stone
lid will not be cleared until after all outputs have been repainted, inside repaint_flush. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/libweston/compositor-drm.c b/libwes

[PATCH v15 00/34] Atomic modesetting

2018-02-05 Thread Daniel Stone
Hi, Thanks a lot to Pekka and Philipp in particular for their really thorough review; things seem to be looking quite positive now! I am _mostly_ sending this for the part up until the patch which actually enables use of the atomic API. I believe I've handled the review comments on all the patches

[PATCH v15 03/34] compositor-drm: Move repaint state application to flush

2018-02-05 Thread Daniel Stone
_dpms generating a synchronous state update. In drm_output_update_complete, the *_pending flags are cleared before any of the pending actions are taken; this ensures that the actions cannot recurse. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c

[PATCH v15 01/34] compositor-drm: Track unused connectors and CRTCs

2018-02-05 Thread Daniel Stone
list. We remove them from the list when drm_output_repaint() is called for that output, and re-add them when the output is disabled or destroyed. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 89 +- 1 file changed, 88 insertions(+), 1

[PATCH v15 04/34] compositor-drm: Use apply_state for starting repaint

2018-02-05 Thread Daniel Stone
Rather than open-coding it ourselves, use the new apply_state helper in drm_output_start_repaint. Signed-off-by: Daniel Stone Reported-by: Fabien DESSENNE Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 36 ++-- 1 file changed, 6 insertions(+), 30

[PATCH v15 06/34] compositor-drm: Don't restore original CRTC mode

2018-02-05 Thread Daniel Stone
When leaving Weston, don't attempt to restore the previous CRTC settings. The framebuffer may well have disappeared, and in every likelihood, whoever gets the KMS device afterwards will be repainting anyway. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-

[PATCH v15 05/34] compositor-drm: Consistent failure paths for output creation

2018-02-05 Thread Daniel Stone
Rather than a smattering of error handlers, use consistent jump labels for error paths in create_output_for_connector(). Signed-off-by: Daniel Stone Reported-by: Pekka Paalanen --- libweston/compositor-drm.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff

[PATCH v15 07/34] compositor-drm: Discover atomic properties

2018-02-05 Thread Daniel Stone
From: Pekka Paalanen Set the atomic client cap, where it exists, and use this to discover the plane/CRTC/connector properties we require for atomic modesetting. Signed-off-by: Daniel Stone Co-authored-by: Pekka Paalanen Reviewed-by: Pekka Paalanen --- configure.ac | 3

[PATCH v15 11/34] compositor-drm: Extract buffer->plane co-ord translation

2018-02-05 Thread Daniel Stone
Pull this into a helper function, so we can use it everywhere. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 157 + 1 file changed, 88 insertions(+), 69 deletions(-) diff --git a/libweston/compositor-drm.c

[PATCH v15 08/34] compositor-drm: Add blob_id member to drm_mode

2018-02-05 Thread Daniel Stone
For atomic modesetting support, the mode is identified by a blob property ID, rather than being passed inline. Add a blob_id member to drm_mode to handle this, including refactoring mode destruction into a helper function. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston

[PATCH v15 13/34] [XXX] compositor-drm: Only disallow scaling for overlay planes

2018-02-05 Thread Daniel Stone
x, and then analyse that. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 4c6223d56..6e6450ffa 100644 --- a/libweston/compositor-

[PATCH v15 16/34] compositor-drm: Extract overlay FB import to helper

2018-02-05 Thread Daniel Stone
... in order to be able to use it from scanout as well. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 221 - 1 file changed, 119 insertions(+), 102 deletions(-) diff --git a/libweston/compositor-drm.c b

[PATCH v15 10/34] compositor-drm: Make alpha-to-opaque handling common

2018-02-05 Thread Daniel Stone
Rather than a hardcoded ARGB -> XRGB translation inside a GBM-specific helper, just determine whether or not the view is opaque, and use the generic helpers to implement the format translation. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c |

[PATCH v15 09/34] compositor-drm: Atomic modesetting support

2018-02-05 Thread Daniel Stone
Add support for using the atomic-modesetting API to apply output state. Unlike previous series, this commit does not unflip sprites_are_broken, until further work has been done with assign_planes to make it reliable. Signed-off-by: Daniel Stone Co-authored-by: Pekka Paalanen Co-authored-by

[PATCH v15 12/34] compositor-drm: Fully account for buffer transformation

2018-02-05 Thread Daniel Stone
In our new and improved helper to determine the src/dest values for a buffer on a given plane, make sure we account for all buffer transformations, including viewport clipping. Rather than badly open-coding it ourselves, just use the helper which does exactly this. Signed-off-by: Daniel Stone

[PATCH v15 17/34] compositor-drm: Use plane FB-import helper for scanout

2018-02-05 Thread Daniel Stone
Use the same codepath, which has the added advantage of being able to import dmabufs. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 48 +- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a

[PATCH v15 22/34] compositor-drm: Don't need safe view-list traversal

2018-02-05 Thread Daniel Stone
Nothing in this loop reorders views within the compositor's view_list. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c

[PATCH v15 21/34] compositor-drm: Add modifiers to GBM dmabuf import

2018-02-05 Thread Daniel Stone
Add support for the GBM_BO_IMPORT_FD_MODIFIER path, which allows us to import multi-plane dmabufs, as well as format modifiers. Signed-off-by: Daniel Stone --- configure.ac | 6 +- libweston/compositor-drm.c | 181 + 2 files changed

[PATCH v15 20/34] compositor-drm: Support modifiers for drm_fb

2018-02-05 Thread Daniel Stone
Use the new drmModeAddFB2WithModifiers interface to import buffers with modifiers. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- configure.ac | 3 +++ libweston/compositor-drm.c | 26 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff

[PATCH v15 25/34] compositor-drm: Ignore views on other outputs

2018-02-05 Thread Daniel Stone
When we come to assign_planes, try very hard to ignore views which are only visible on other outputs, rather than forcibly moving them to the primary plane, which causes damage all round and unnecessary repaints. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor

[PATCH v15 15/34] compositor-drm: Use plane_coords_for_view for cursor

2018-02-05 Thread Daniel Stone
Use the new helper to populate the cursor state as well, with some special-case handling to account for how we always upload a full-size BO. Signed-off-by: Daniel Stone Reported-by: Derek Foreman --- libweston/compositor-drm.c | 48 +++--- 1 file changed

[PATCH v15 23/34] compositor-drm: Rename region variable

2018-02-05 Thread Daniel Stone
Make it a bit more clear what the purpose of the variable is. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index

[PATCH v15 34/34] drm debug

2018-02-05 Thread Daniel Stone
Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 59 ++ 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 48ce19c09..db9dc3cbe 100644 --- a/libweston/compositor

[PATCH v15 27/34] compositor-drm: Add modes to drm_output_propose_state

2018-02-05 Thread Daniel Stone
Add support for multiple modes: toggling whether or not the renderer and/or planes are acceptable. This will be used to implement a smarter plane-placement heuristic when we have support for testing output states. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 39

[PATCH v15 29/34] compositor-drm: Add test-only mode to state application

2018-02-05 Thread Daniel Stone
The atomic API can allow us to test state before we apply it, to see if it will be valid. Add support for this, which we will later use in assign_planes to ensure our plane configuration is valid. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 176

[PATCH v15 14/34] compositor-drm: Use plane_state_coords_for_view for scanout

2018-02-05 Thread Daniel Stone
Use the shiny new helper we have for working through scanout as well. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 81 ++ 1 file changed, 25 insertions(+), 56 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor

[PATCH v15 31/34] compositor-drm: Enable planes for atomic

2018-02-05 Thread Daniel Stone
Now that we can sensibly test proposed plane configurations with atomic, sprites are not broken. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston

[PATCH v15 24/34] compositor-drm: Split drm_assign_planes in two

2018-02-05 Thread Daniel Stone
Move drm_assign_planes into two functions: one which proposes a plane configuration, and another which applies that state to the Weston internal structures. This will be used to try multiple configurations and see which is supported. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen

[PATCH v15 26/34] compositor-drm: Ignore occluded views

2018-02-05 Thread Daniel Stone
When trying to assign planes, keep track of the areas which are already occluded, and ignore views which are completely occluded. This allows us to build a state using planes only, when there are occluded views which cannot go into a plane behind views which can. Signed-off-by: Daniel Stone

[PATCH v15 19/34] compositor-drm: Extract drm_fb_addfb into a helper

2018-02-05 Thread Daniel Stone
We currently do the same thing in two places, and will soon have a third. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 93 -- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/libweston

[PATCH v15 33/34] compositor-drm: Support modifiers with GBM

2018-02-05 Thread Daniel Stone
Use the extended GBM allocator interface to support modifiers and multi-planar BOs. Signed-off-by: Daniel Stone --- configure.ac | 3 +++ libweston/compositor-drm.c | 57 ++ 2 files changed, 51 insertions(+), 9 deletions(-) diff --git

[PATCH v15 30/34] compositor-drm: Relax plane restrictions for atomic

2018-02-05 Thread Daniel Stone
Since we now incrementally test atomic state as we build it, we can loosen restrictions on what we can do with planes, and let the kernel tell us whether or not it's OK. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 18 +- 1 file changed, 9 insertions(

[PATCH v15 18/34] compositor-drm: Remove no_addfb2 handling

2018-02-05 Thread Daniel Stone
ioctl for users on old kernels without AddFB2; unfortunately, we cannot detect the complete absence of the ioctl, as the return here is -EINVAL rather than -ENOTTY. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c

[PATCH v15 28/34] compositor-drm: Return plane state from plane preparation

2018-02-05 Thread Daniel Stone
Return a pointer to the plane state, rather than indirecting via a weston_plane. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 68 ++ 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston

[PATCH v15 32/34] compositor-drm: Support plane IN_FORMATS

2018-02-05 Thread Daniel Stone
ff-by: Sergi Granell Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- configure.ac | 3 ++ libweston/compositor-drm.c | 128 + 2 files changed, 122 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 5920

Re: [PATCH weston] xwayland: Fix crash on weston shutdown

2018-02-05 Thread Daniel Stone
with that, this is: Reviewed-by: Daniel Stone Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Re: [PATCH v15 06/34] compositor-drm: Don't restore original CRTC mode

2018-02-06 Thread Daniel Stone
Hi Pekka, On 6 February 2018 at 13:30, Pekka Paalanen wrote: > On Mon, 5 Feb 2018 18:44:15 + > Daniel Stone wrote: >> @@ -4296,7 +4290,8 @@ drm_output_destroy(struct weston_output *base) >>*/ >>

Re: [PATCH v15 09/34] compositor-drm: Atomic modesetting support

2018-02-06 Thread Daniel Stone
On 6 February 2018 at 13:51, Pekka Paalanen wrote: > On Mon, 5 Feb 2018 18:44:18 + > Daniel Stone wrote: >> Add support for using the atomic-modesetting API to apply output state. >> Unlike previous series, this commit does not unflip sprites_are_broken, >> until fu

Re: [PATCH v15 03/34] compositor-drm: Move repaint state application to flush

2018-02-06 Thread Daniel Stone
Hi, On 6 February 2018 at 12:25, Pekka Paalanen wrote: > I found some little details to fix, but other than those, it looks good. Thanks! For the record, I've fixed all these before pushing. > One thing I noticed in the legacy KMS path is that we don't tend to > program DPMS state when turning

Re: [PATCH weston 0/4] Fix distcheck by overriding file directories

2018-02-06 Thread Daniel Stone
/124615/ But assuming nothing jumps out at you which would be useful from that, this series is: Acked-by: Daniel Stone Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Re: [PATCH v14 22/41] compositor-drm: Use plane_state_coords_for_view for scanout

2018-02-07 Thread Daniel Stone
Hi Pekka, On 24 January 2018 at 11:30, Pekka Paalanen wrote: > On Wed, 20 Dec 2017 12:26:39 + > Daniel Stone wrote: >> @@ -1660,44 +1630,50 @@ drm_output_prepare_scanout_view(struct >> drm_output_state *output_state, >> return NULL; >>

Re: [PATCH v14 21/41] [XXX] compositor-drm: Only disallow scaling for overlay planes

2018-02-07 Thread Daniel Stone
Hi Pekka, On 24 January 2018 at 10:28, Pekka Paalanen wrote: > On Wed, 20 Dec 2017 12:26:38 + > Daniel Stone wrote: >> Now we have a more comprehensive overview of the transform we're going >> to apply, use this to explicitly disallow scaling and rotation. >> &

Re: [PATCH weston 0/3] screenshooter improvements

2018-02-09 Thread Daniel Stone
Hi Aleksander, On 23 January 2018 at 00:05, Aleksander Morgado wrote: > These patches try to improve a bit the behavior of the screenshooter, > by making it easier to take multiple screenshots and allowing to > store them in a location different than the current directory. > > Comments? I think

Re: [PATCH weston 1/2] weston: remove SEGV and ABRT handlers

2018-02-09 Thread Daniel Stone
Hi, On 7 February 2018 at 23:31, Peter Hutterer wrote: > On Wed, Feb 07, 2018 at 12:03:56PM +, Simon McVittie wrote: >> On Wed, 07 Feb 2018 at 12:51:14 +0200, Pekka Paalanen wrote: >> > Catching an ABRT is kind of ok, catching a SEGV is russian roulette. We >> > have been quite lucky with it,

Re: [PATCH weston] desktop-shell: Correctly migrate views to other outputs when output is disabled/disconnected

2018-02-09 Thread Daniel Stone
Hi Marius, On 8 February 2018 at 16:46, Marius Vlad wrote: > Our case is when the view is the same as output being disabled/disconnected. > There's not need to check the views' output with the output being disabled > because weston_view_assign_output() already changes the output of the view > wh

Re: [PATCH weston 2/2] compositor-drm: move state_invalid setting to deinit

2018-02-09 Thread Daniel Stone
Hi Pekka, On 9 February 2018 at 10:29, Pekka Paalanen wrote: > Setting state_invalid to true is moved together with the code adding new > unused CRTCs and connectors in drm_output_deinit(). Logically these two > operations belong together: state_invalid is required for the new unused > item to be

Re: [PATCH v2] server: add wl_display_destroy_clients()

2018-02-09 Thread Daniel Stone
Hi Simon, On 13 December 2017 at 10:51, emersion wrote: > Bug [1] reported that wl_display_destroy() doesn't destroy clients, so > client socket file descriptors are being kept open until the compositor > process exits. > > Patch [2] proposed to destroy clients in wl_display_destroy(). The > patc

Re: [PATCH weston] xwm: Fix icon surface ownership

2018-02-09 Thread Daniel Stone
Hi Emmanuel, On 24 January 2018 at 22:29, Emmanuel Gil Peyrot wrote: > The cairo surface used for the icon must be completely given to the > frame as soon as said frame has been created. To prevent both the > window and the frame from sharing ownership of the icon, we set > window->icon_surface

<    1   2   3   4   5   6   7   8   9   10   >