Re: [RFC wayland] protocol: Add high-resolution wl_touch timestamp event

2017-11-28 Thread Daniel Stone
Hi, On 24 November 2017 at 11:59, Pekka Paalanen wrote: > On Tue, 21 Nov 2017 15:45:48 +0200 > Alexandros Frantzis wrote: >> 2. Should we introduce similar timestamp events for keyboard and pointer? > > No, unless someone actually has a use for them. That brings the > question, why are you only

Re: [PATCH weston] gl-renderer: Set pitch correctly for subsampled textures

2017-12-01 Thread Daniel Stone
Hi all, On 29 November 2017 at 18:49, Arnaud Vrac wrote: > this patch is Reviewed-by: Arnaud Vrac I've pushed this with a pile of tags now. Thanks everyone! Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lis

Re: [PATCH wayland 2/4] tests: Mark tests as used, so they don’t get removed at link-time.

2017-12-01 Thread Daniel Stone
Hi, On 14 April 2017 at 19:48, Emmanuel Gil Peyrot wrote: > Without this attribute, these macros were making Weston’s tests fail to > build with LTO enabled. I've pushed all four of these (i.e. the two for Wayland, two for Weston) upstream now. Cheers, Daniel ___

Re: [PATCH wayland] connection: Print the content of arrays in closures

2017-12-01 Thread Daniel Stone
Hi, On 10 July 2017 at 19:28, Emmanuel Gil Peyrot wrote: > The current behaviour when WAYLAND_DEBUG is set is to print “array”, > which is quite unhelpful. > > This patch prints a list of the bytes present in the array. It doesn’t > try to interpret it as uint32_t or anything, leaving that to th

Re: [PATCH weston] weston-info: Add support for zwp_linux_dmabuf_v1

2017-12-01 Thread Daniel Stone
Hi, On 3 October 2017 at 14:36, Emmanuel Gil Peyrot wrote: > This now prints each (format, modifier) tuple, to show which ones the > compositor sends to its clients. It is only implemented for version 3+, > since I didn’t have any compositor implementing previous versions, and > the old `format`

Re: Scanner with --no-documentation option (source-code included)

2017-12-04 Thread Daniel Stone
Hi Felipe, On 2 December 2017 at 20:17, ferreiradaselva wrote: > I don't know how useful this feature would be for others (it would be for > me), but I made the wayland-scanner to take a no-documentation option. It > omits the documentation comments (but still keep the copyright notice). Is > thi

Re: [PATCH weston 2/2] weston: add --device option for DRM-backend

2017-12-04 Thread Daniel Stone
.connector }, > { WESTON_OPTION_STRING, "seat", 0, &config.seat_id }, > { WESTON_OPTION_INTEGER, "tty", 0, &config.tty }, > + { WESTON_OPTION_STRING, "device", 0, &config.specific_device >

Re: [weston v2] linux-dmabuf: align DMABUF exposed formats with EGL supported formats

2017-12-04 Thread Daniel Stone
Hi Vincent, On 20 March 2017 at 09:50, Vincent ABRIOU wrote: > Any feedback on this patch? Sorry for not replying sooner. With the modifiers code having landed, this would need some rework to fit there. When the modifiers query is available, we'd need to drop the RGB format advertisement. For t

Re: [PATCH weston] editor: unify key handling

2017-12-04 Thread Daniel Stone
Hi Weng, Thanks for the patch, and sorry for the horrendous delay in giving you feedback. In general, your patch looks very good and makes a lot of sense. However: On 1 February 2017 at 03:22, Weng Xuetian wrote: > @@ -395,81 +402,8 @@ text_input_keysym(void *data, > uint32_t m

Re: [PATCH 2/2] server: add log message when client connection is destroyed due to an error

2017-12-04 Thread Daniel Stone
Hi Mathias, Thanks for your patch! The idea seems fine, but I have a few comments. On 8 June 2017 at 08:39, wrote: > @@ -313,16 +326,30 @@ wl_client_connection_data(int fd, uint32_t mask, void > *data) > uint32_t resource_flags; > int opcode, size, since; > int len; > +

Re: [RFC weston] libweston: Do not include subsurfaces with NULL buffer in bounding box

2017-12-04 Thread Daniel Stone
Hi Philipp, On 28 July 2017 at 15:41, Philipp Kerling wrote: > I was pondering how to remove the window decorations of my application > (which live in subsurfaces) when going full screen without flickering. > > At first I just destroyed the surfaces, but that lead to flicker > (window without dec

Re: [PATCH wayland] scanner: Add autoconf macro to check for the proper scanner

2017-12-04 Thread Daniel Stone
Jussi, Tomek, Emil, On 18 August 2017 at 10:36, Quentin Glidic wrote: > On 8/18/17 11:30 AM, Quentin Glidic wrote: >> Projects have been using various ways to check for the wayland-scanner, >> mostly based on their developper own use case, and often not allowing >> others use cases to work withou

Re: [PATCH v2 wayland 04/11] connection: Make wl_closure_destroy() close fds of undispatched closures

2017-12-04 Thread Daniel Stone
Hi Derek, On 13 April 2017 at 17:51, Derek Foreman wrote: > void > -wl_closure_destroy(struct wl_closure *closure) > +wl_closure_destroy(struct wl_closure *closure, bool dispatched) > { > + /* wl_closure_destroy has free() semantics */ > + if (!closure) > + return; > +

Re: [PATCH v2 wayland 00/11] Stop leaking file descriptors

2017-12-04 Thread Daniel Stone
Hi Derek, On 13 April 2017 at 17:51, Derek Foreman wrote: > Moved the test cases to the end so they're not introduced in a failed > state. > > Reworked the removal of the global zombie singleton patch - we now > create a wl_zombie at proxy creation time and store the number of > fds for each opco

Re: [PATCH wayland-protocols 1/3] Add meson build system support

2017-12-04 Thread Daniel Stone
Hi Jonas, On 11 October 2017 at 10:00, Jonas Ådahl wrote: > +wayland_scanner = find_program('wayland-scanner') It would be good to have this follow Quentin's suggestion for how to find wayland-scanner generally. Apart from that, series is: Reviewed-by: Daniel Ston

Re: [PATCH wayland-protocols 2/3] tests: Add compile tests

2017-12-04 Thread Daniel Stone
tains('xdg-foreign-unstable-v1') The comment ends abruptly, the xdg_foreign exclusion is a massive non-sequitur, and also test_configuration can be deleted. With that, this 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: [RFC PATCH xserver] xwayland: Fix non-argb cursor conversion

2017-12-05 Thread Daniel Stone
On 27 September 2017 at 17:01, Olivier Fourdan wrote: > Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=103012 > Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org

Re: [RFC wayland-protocols] presentation-time: Add request to subscribe to wl_output presentation timings

2017-12-05 Thread Daniel Stone
Hi Alexandros, On 31 August 2017 at 16:37, Alexandros Frantzis wrote: > thank you for the additional feedback. I have attached an updated > version which addresses your comments. > > I still haven't got any feedback from Chromium concerning the potential > change from wl_output based timings to w

Re: [PATCH wayland] scanner: Add autoconf macro to check for the proper scanner

2017-12-05 Thread Daniel Stone
Hi Quentin, I've added Ross and Fabien, who've been looking at this for Yocto. On 18 August 2017 at 10:30, Quentin Glidic wrote: > --- a/wayland-scanner.m4 > +++ b/wayland-scanner.m4 > @@ -1,3 +1,5 @@ > +#serial 2 I don't quite understand the significance of this. > +# WL_PROG_WAYLAND_SCANNER()

Re: [PATCH weston v2] configure.ac: use PKG_CHECK_VAR for wayland-protocols

2017-12-05 Thread Daniel Stone
Hi, On 18 July 2017 at 14:31, Pekka Paalanen wrote: > On Fri, 7 Jul 2017 10:51:16 +0200 Olivier Blin > wrote: >> Also note that this requires a relatively new pkg-config for PKG_CHECK_VAR. >> The macro appeared in pkg-config 0.28, from January 2013. >> >> It is for example not available in Ubun

Re: [PATCH weston 1/2] clients: Don't crash when compositor doesn't support drag and drop

2017-12-05 Thread Daniel Stone
Hi Derek, On 20 April 2017 at 20:31, Derek Foreman wrote: > display_create_data_source() can return NULL when there's no data device > manager present. Instead of carrying on blindly, test its return value. Both seem trivially correct, reviewed and pushed. Cheers, Daniel __

Re: [PATCH weston] tests: Fix integer overflows on 32-bit systems

2017-12-05 Thread Daniel Stone
Hi Alexandros, On 1 December 2017 at 17:28, Alexandros Frantzis wrote: > Ensure that the integer type used in expressions involving > multiplication with NSEC_PER_SEC is large enough to avoid overflows on > 32-bit systems. In the expressions fixed by this patch a 64-bit type > (long long) is requ

Re: [PATCH] weston: added missing header time.h

2017-12-05 Thread Daniel Stone
Hi Valery, On 9 August 2017 at 12:27, Valery Kartel wrote: > without it I can't built weston on alpinelinux Thanks for your patch; I've reviewed and pushed it. Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://l

Re: [PATCH] compositor-drm: fix z-order inversion in plane assignment

2017-12-05 Thread Daniel Stone
Hi Matt, On 5 September 2017 at 15:13, Matt Hoosier wrote: > On Tue, Sep 5, 2017 at 9:00 AM, Daniel Stone wrote: >> It can't be correct to raise it to the cursor plane either, since both >> cursor and overlay planes strictly stack above the scanout plane. I >> guess th

Re: [PATCH weston] gl-renderer: remove unneeded cast

2017-12-05 Thread Daniel Stone
Hi Emil, On 31 July 2017 at 20:45, Emil Velikov wrote: > The variable num is of EGLint type. > > Signed-off-by: Emil Velikov Reviewed and pushed, thanks. > Unrelated: > > The functions gl_renderer_query_dmabuf_* return bool as per the > interface. At the same time: > - the caller does not che

Re: [PATCH weston] weston-resizor: Don't add new frame callbacks every click

2017-12-05 Thread Daniel Stone
Hi Derek, On 24 March 2017 at 17:39, Derek Foreman wrote: > Sorry, I forgot about this for a while. So did everyone else, it seems. > On 17/02/17 10:31 PM, Jonas Ådahl wrote: >> Instead what we could do is probably to check the result of >> window_lock_pointer(), if it succeeded, continue with

Re: [PATCH weston 1/2] config-parser: fix `short_name` type

2017-12-05 Thread Daniel Stone
Hi Eric, On 8 June 2017 at 22:20, Eric Engestrom wrote: > On Wednesday, 2017-05-24 21:23:14 +0100, Eric Engestrom wrote: >> This field is populated with chars, compared to chars and printed as >> a char. It should probably be a char. >> >> Signed-off-by: Eric Engestrom > > Humble ping? > > I don

Re: [PATCH v2] configure.ac: use AC_HEADER_MAJOR to detect major()/minor()

2017-12-05 Thread Daniel Stone
Hi Sergei, On 31 May 2017 at 22:17, Sergei Trofimovich wrote: > This change slightly updates c4d7f66c12853b9575366dd9f4a7960ec5694934 > which added inclusion. > > Autoconf has AC_HEADER_MAJOR to find out which header defines > reqiured macros: > > https://www.gnu.org/software/autoconf/manua

Re: [PATCH] clients: simple-egl: Restore window size when un-maximized

2017-12-05 Thread Daniel Stone
Hi, On 26 June 2017 at 17:01, Tomohiro Komagata wrote: > The window position was correct but the window size was wrong > when simple-egl returns from maximized window to un-maximized. > Its size should be restored to original size. Thankyou very much for the patch. I have reviewed it and pushed

Re: [PATCH weston 2/2] compositor-x11: Implement mode switching

2017-12-05 Thread Daniel Stone
Hi Armin, On 28 October 2016 at 23:26, Armin Krezović wrote: > Signed-off-by: Armin Krezović I couldn't find anything wrong with this one, so have reviewed and pushed it now. Was probably about time. Cheers, Daniel ___ wayland-devel mailing list wayl

Re: [PATCH weston v2] input: Do not override keyboard focus on restore

2017-12-05 Thread Daniel Stone
Hi Quentin, On 21 July 2017 at 13:02, Quentin Glidic wrote: > If we start a special (grabbing) client when Weston is unfocused, it > would lose focus when coming back to Weston. Thanks for this; reviewed and pushed. Cheers, Daniel ___ wayland-devel ma

Re: [PATCH weston 1/3] tests: add a create_test_surface function

2017-12-05 Thread Daniel Stone
Hi Emilio, On 3 February 2017 at 15:10, Emilio Pozuelo Monfort wrote: > This doesn't attach a buffer to the surface. This is needed for the > next commit, where we have a test case with a surface that doesn't > have a buffer attached. Thanks, this seems obviously fine so I've pushed this patch.

Re: [PATCH weston 2/2] desktop-shell: Handle the fullscreen to maximized case safely

2017-12-05 Thread Daniel Stone
Hi Derek, On 6 October 2017 at 20:37, Derek Foreman wrote: > When a client transitions from maximized to fullscreen to maximized (run > weston-terminal, maximize it, hit f11 twice) we're sending size 0,0 for > the unfullscreen configure, which still has maximized set. > > This results in clients

Re: [PATCH] xwm: Handle third data entry in client messages

2017-12-05 Thread Daniel Stone
Hi Iliya, On 24 June 2017 at 18:53, Iliya Bozhinov wrote: > A single client message can be used to modify two properties at once. > That's why when processing such messages we have to check both the second > and the third data entry for states that we must handle. Thanks, correct you are. I've r

Re: [PATCH wayland] cursor: add forward declaration for struct wl_buffer

2017-12-05 Thread Daniel Stone
Hi Emil, On 12 October 2017 at 13:39, Emil Velikov wrote: > This makes the header self-contained, since the struct is considered > opaque from waylad-cursor POV. > > As we're here move the wl_shm fwd. declaration alongside the others. > Making it easier to read and track. Thanks for this! Review

Re: [PATCH wayland] protocol: Add deprecation note about wl_shell

2017-12-05 Thread Daniel Stone
Hi Jonas, On 2 December 2017 at 02:57, Jonas Ådahl wrote: > Now that xdg_shell is stable and much better defined than wl_shell we > can finally deprecate wl_shell and guide users towards xdg_shell > instead. [its-happening.gif] Reviewed and pushed. Cheers, Daniel __

Re: [PATCH] eventloop: clarify post_dispatch_check()

2017-12-05 Thread Daniel Stone
Hi Chris, On 28 August 2017 at 09:03, wrote: > This *technically* changes the semantics of the return value of the source > callbacks. > Previously you could return a negative number from a source callback and it > would prevent > *other* source callbacks from triggering a subsequent recheck.

Re: [PATCH wayland] Do not create man page links with doxygen

2017-12-05 Thread Daniel Stone
Hi Armin, On 27 July 2017 at 13:08, Armin K wrote: > There is a lot of files created with .so links to non-installed > files, making most of installed pages useless. The files > referenced in .so links are not suitable for installation nor > do they contain any useful information for them to be w

Re: [PATCH wayland] protocol: make get_subsurface double-buffered

2017-12-05 Thread Daniel Stone
Hi Pekka, On 9 May 2016 at 12:45, Pekka Paalanen wrote: > The existing specification was not explicitly clear on when > wl_subcompositor.get_subsurface request actually adds the sub-surface to > the parent in the compositor's scenegraph. The implicit assumption was > that this happens immediately

Re: [weston v2 0/8] Implement NET_WM_SYNC_REQUEST basic support

2017-12-05 Thread Daniel Stone
Hi Louis-Francis, On 13 November 2017 at 21:20, Louis-Francis Ratté-Boulianne wrote: > This patchset implements NET_WM_SYNC_REQUEST protocol for throtting > X11 window resizes in Weston's XWM. We wait for the window to be drawn > (by setting an alarm on the sync counter) before configuring the wi

Re: [PATCH wayland] scanner: Add autoconf macro to check for the proper scanner

2017-12-05 Thread Daniel Stone
Hi, On 5 December 2017 at 14:08, Emil Velikov wrote: > On 4 December 2017 at 21:47, Daniel Stone wrote: >> Any comments on Quentin's suggestion here? Would they be enough for you? > > I fear that the ship has sailed long time ago and there will be > practically zero us

Re: [PATCH 1/3] xwayland: Fix input coordinates of non-decorated windows

2017-12-05 Thread Daniel Stone
), but still the same thing. This is all a bit of a mess, but it seems correct enough that, with the get_frame_size() change as well, this would be: Acked-by: Daniel Stone Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedeskt

Re: [PATCH 2/3] xwayland: Shape window region to clip shadow area from input

2017-12-05 Thread Daniel Stone
Hi Scott, On 24 June 2017 at 08:18, Scott Moreau wrote: > Decorated windows were getting the size of the window including the > shadow which is correct, but causing some confusion for motion input > events. This was exhibited when one xwayland window overlaps another, > hovering over the window b

Re: [PATCH weston] configure.ac: drop spurious bracket

2017-12-11 Thread Daniel Stone
Hi Guido, On 8 December 2017 at 19:46, Guido Günther wrote: > Otherwise configure output looks like > > checking for library containing pam_open_session... -lpam > ./configure: line 18064: ]: command not found > checking for COLORD... yes Sorry for the noise. Applied and pushed. Che

Re: [PATCH weston] libweston: drop return type from ::query_dmabuf_{formats, modifiers}

2017-12-11 Thread Daniel Stone
Hi Emil, On 5 December 2017 at 14:26, Emil Velikov wrote: > Nobody checks for the bool returned by these functions. At the same > time: a) the functions set the respective num_foo to zero on error and > b) callers honour that variable. > > Just drop the return type - it's useless. Reviewed and p

Re: [PATCH weston v2] libweston-desktop/xwayland: Make sure racy surfaces are properly mapped

2017-12-11 Thread Daniel Stone
Hi Quentin, On 8 December 2017 at 10:10, Quentin Glidic wrote: > This fixes a race between Xwayland committing the surface content via > the wl_surface, and the XWM setting the role of the surface. > We now keep track of the (first) content commit on the surface and > forward it to the shell when

Re: [PATCH weston 4/5] gl-renderer: fix pixel format used in texture uploads when using R/RG textures

2017-12-11 Thread Daniel Stone
Hi Arnaud, On 29 November 2017 at 14:06, Arnaud Vrac wrote: > In glTexImage2D / glTexSubImage2D calls, the only pixel formats allowed > for the GL_R8 and GL_RG internal formats are respectively GL_RED and > GL_RG [1]. > > Make sure we match this requirement, as some drivers will fail with the > c

Re: Providing shared buffer for applications within Smack environment

2017-12-12 Thread Daniel Stone
Hi Pekka, On 12 December 2017 at 10:44, Pekka Paalanen wrote: > On Tue, 12 Dec 2017 11:00:23 +0100 > José Bollo wrote: >> While working for AGL [1], I want to allow applications to receive the >> buffers allocated by WESTON. The use of the surfaces/buffers >> allocated by Weston is difficult whe

Re: Providing shared buffer for applications within Smack environment

2017-12-12 Thread Daniel Stone
Hi Jose, On 12 December 2017 at 11:12, José Bollo wrote: > On Tue, 12 Dec 2017 11:00:08 + > Daniel Stone wrote: >> I assume this is related to the never-upstreamed ivi_share protocol >> extension. > > Yes the probability is near 100% > > So it could be a des

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

2017-12-15 Thread Daniel Stone
Hi Michael and Philipp, On 15 December 2017 at 09:25, Philipp Zabel wrote: > Although the format event is deprecated, some clients, especially the > GStreamer waylandsink, only support zwp_linux_dmabuf_v1 version 1 and > require the deprecated format event. > > Send format events instead of the m

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

2017-12-15 Thread Daniel Stone
Hi Philipp, On 15 December 2017 at 10:46, Philipp Zabel wrote: > On Fri, 2017-12-15 at 09:46 +0000, Daniel Stone wrote: >> On 15 December 2017 at 09:25, Philipp Zabel wrote: >> > Send format events instead of the modifier event, if the client binds on >> > a protoc

Re: [PATCH weston] configure: fix sys/sysmacros.h check

2017-12-18 Thread Daniel Stone
has been discussed earlier on > https://lists.gnu.org/archive/html/autoconf/2016-09/msg00013.html > > Work around the issue by causing the warning to trigger a build failure > inside AC_HEADER_MAJOR test, so that we get MAJOR_IN_SYSMACROS defined. Painful, but seems like the right

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

2017-12-20 Thread Daniel Stone
Hi Ian and Nandor, On 20 December 2017 at 10:09, Ian Ray wrote: > The input area for an undecorated non-fullscreen window is based on the > window size itself. > > Fixes a case where mouse events in the `invisible' window margin failed > to reach the window behind. Scott sent some patches to fix

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

2017-12-20 Thread Daniel Stone
part of output->state_last, and is not directly visible from the plane itself. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 348 - 1 file changed, 283 insertions(+), 65 deletions(-) diff --git a/libweston/compositor-drm.c b/libwes

[PATCH v14 14/41] compositor-drm: Discover atomic properties

2017-12-20 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 v14 01/41] compositor-drm: Add shutting_down flag

2017-12-20 Thread Daniel Stone
Does what it says on the box: is true when the compositor is shutting down. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 4 1 file changed, 4 insertions(+) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 3eda70f30..6ac9626d9 100644 --- a

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

2017-12-20 Thread Daniel Stone
Calling switch_mode with no output or mode never makes any sense. Drop the NULL checks. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 23 +-- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c

[PATCH v14 02/41] compositor-drm: Introduce drm_output_state structure

2017-12-20 Thread Daniel Stone
plane-but-but-atomic-plane content. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 357 + 1 file changed, 300 insertions(+), 57 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 6ac9626d9..e123fe503 1

[PATCH v14 00/41] Atomic modesetting

2017-12-20 Thread Daniel Stone
Hi, Please find attached another iteration of the atomic series. This round has mostly seen cleanups and correctness fixes through 03-11. The biggest change is around output disables, which necessitated the introduction of patch 1, and now ensures a relatively complicated disable/destroy/shutdown

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

2017-12-20 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 001eb5278..10bc53ba0 100644 --- a/libweston/compositor-

[PATCH v14 15/41] compositor-drm: Add blob_id member to drm_mode

2017-12-20 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 v14 16/41] compositor-drm: Add to_drm_mode helper

2017-12-20 Thread Daniel Stone
Much like we already have to_drm_output and to_drm_backend. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index

[PATCH v14 18/41] compositor-drm: Make alpha-to-opaque handling common

2017-12-20 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 v14 27/41] compositor-drm: Extract drm_fb_addfb into a helper

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

[PATCH v14 39/41] compositor-drm: Enable planes for atomic

2017-12-20 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 v14 05/41] compositor-drm: Use drm_plane for cursor plane

2017-12-20 Thread Daniel Stone
e. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 463 +++-- 1 file changed, 358 insertions(+), 105 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 403438398..a600ef40b 100644 --- a/libweston/compos

[PATCH v14 37/41] compositor-drm: Add test-only mode to state application

2017-12-20 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 v14 13/41] compositor-drm: Don't restore original CRTC mode

2017-12-20 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 v14 08/41] compositor-drm: Don't repaint if no damage

2017-12-20 Thread Daniel Stone
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. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-)

[PATCH v14 25/41] compositor-drm: Use plane FB-import helper for scanout

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

[PATCH v14 04/41] compositor-drm: Introduce drm_plane_is_available

2017-12-20 Thread Daniel Stone
Helper for the pattern of checking whether or not a plane can be used on an output during the current repaint cycle. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/libweston/compositor

[PATCH v14 12/41] compositor-drm: Use apply_state for starting repaint

2017-12-20 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 v14 41/41] compositor-drm: Support modifiers with GBM

2017-12-20 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 v14 17/41] compositor-drm: Atomic modesetting support

2017-12-20 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 v14 32/41] compositor-drm: Split drm_assign_planes in two

2017-12-20 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 --- libweston/compositor-drm.c

[PATCH v14 36/41] compositor-drm: Return plane state from plane preparation

2017-12-20 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 v14 09/41] compositor-drm: Track unused connectors and CRTCs

2017-12-20 Thread Daniel Stone
Rather than a more piecemeal approach at backend creation, explicitly track connectors and CRTCs we do not intend to use, so we can ensure they are disabled where appropriate. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 86 ++ 1 file

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

2017-12-20 Thread Daniel Stone
Use a real drm_plane to back the scanout plane, displacing output->fb_{last,cur,pending} to their plane-tracked equivalents. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 222 ++--- 1 file changed, 149 insertions(+), 73 deletions(-) d

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

2017-12-20 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 v14 24/41] compositor-drm: Extract overlay FB import to helper

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

[PATCH v14 19/41] compositor-drm: Extract buffer->plane co-ord translation

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

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

2017-12-20 Thread Daniel Stone
_dpms generating a synchronous state update. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 366 - 1 file changed, 292 insertions(+), 74 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 87c2603c7..2bb13f3a2 1

[PATCH v14 40/41] compositor-drm: Support plane IN_FORMATS

2017-12-20 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 8d0d

[PATCH v14 33/41] compositor-drm: Ignore views on other outputs

2017-12-20 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 --- libweston/compositor-drm.c | 23

[PATCH v14 31/41] compositor-drm: Rename region variable

2017-12-20 Thread Daniel Stone
Make it a bit more clear what the purpose of the variable is. Signed-off-by: Daniel Stone --- 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 19aeb5326..3ff06c01c 100644

[PATCH v14 29/41] compositor-drm: Add modifiers to GBM dmabuf import

2017-12-20 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 v14 34/41] compositor-drm: Ignore occluded views

2017-12-20 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 v14 10/41] compositor-drm: Disable unused CRTCs/connectors

2017-12-20 Thread Daniel Stone
matches the mechanics of later commits, where we move to a global repaint-flush hook, applying the state for all outputs in one go. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a

[PATCH v14 26/41] compositor-drm: Remove no_addfb2 handling

2017-12-20 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 --- libweston/compositor-drm.c | 46 -- 1 file change

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

2017-12-20 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 v14 30/41] compositor-drm: Don't need safe view-list traversal

2017-12-20 Thread Daniel Stone
Nothing in this loop reorders views within the compositor's view_list. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index b030234e4..19aeb5326 1

[PATCH v14 38/41] compositor-drm: Relax plane restrictions for atomic

2017-12-20 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 v14 20/41] compositor-drm: Fully account for buffer transformation

2017-12-20 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 v14 28/41] compositor-drm: Support modifiers for drm_fb

2017-12-20 Thread Daniel Stone
Use the new drmModeAddFB2WithModifiers interface to import buffers with modifiers. Signed-off-by: Daniel Stone --- configure.ac | 3 +++ libweston/compositor-drm.c | 26 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/configure.ac b

[PATCH v14 23/41] compositor-drm: Use plane_coords_for_view for cursor

2017-12-20 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

Re: [PATCH v14 00/41] Atomic modesetting

2017-12-20 Thread Daniel Stone
Hi, On 20 December 2017 at 12:26, Daniel Stone wrote: > Please find attached another iteration of the atomic series. This round > has mostly seen cleanups and correctness fixes through 03-11. In the festive rush, I forgot to mention that it can also be found here: https://gitlab.collabo

Re: [PATCH wayland v3 03/10] connection: Refactor out closure allocation

2017-12-27 Thread Daniel Stone
Hi Derek, On 6 December 2017 at 17:22, Derek Foreman wrote: > Moves the common/similar bits into one place. > > This has a minor functional change - count and message are now initialized > immediately, previously they'd only be set if (de)marshal was successful. I've reviewed this does what it s

Re: [PATCH wayland v3 04/10] connection: Clear fds we shouldn't close to -1

2017-12-27 Thread Daniel Stone
Hi Derek, On 6 December 2017 at 17:22, Derek Foreman wrote: > This initializes all the fd arguments in closures to -1 and clears > them back to -1 when they've been dispatched or serialized. > > This means that any valid fd in a closure is currently libwayland's > responsibility to close in the c

Re: [PATCH wayland v3 03/10] connection: Refactor out closure allocation

2017-12-27 Thread Daniel Stone
Hi, On 27 December 2017 at 14:08, Daniel Stone wrote: > On 6 December 2017 at 17:22, Derek Foreman wrote: >> Moves the common/similar bits into one place. >> >> This has a minor functional change - count and message are now initialized >> immediately, previousl

Re: [PATCH wayland v3 06/10] util: Pass flags to map iterators

2017-12-27 Thread Daniel Stone
Hi, On 6 December 2017 at 17:22, Derek Foreman wrote: > static enum wl_iterator_result > -destroy_resource(void *element, void *data) > +_destroy_resource(void *element, void *data, uint32_t flags) > { > struct wl_resource *resource = element; > - struct wl_client *client = resour

  1   2   3   4   5   6   7   8   9   10   >