Re: [PATCH wayland-protocols] Add zwp_linux_explicit_synchronization_v1

2017-09-22 Thread Matt Hoosier
On Fri, Sep 22, 2017 at 10:24 AM, Pekka Paalanen wrote: > On Wed, 20 Sep 2017 07:11:57 -0700 > Daniel Stone wrote: > >> Hi Matt, >> >> On 20 September 2017 at 05:48, Matt Hoosier wrote: >> > On a related subject, there was discussion back at >> > https://lists.freedesktop.org/archives/wayland-de

Re: [PATCH weston v11 09/13] compositor-drm: Track cursor_plane with a drm_plane

2017-09-22 Thread Daniel Stone
Hi, On 21 July 2017 at 04:56, Pekka Paalanen wrote: > On Tue, 18 Jul 2017 14:14:31 +0100 > Daniel Stone wrote: >> @@ -3634,10 +3844,11 @@ drm_output_deinit(struct weston_output *base) >> drm_output_fini_egl(output); >> >> weston_plane_release(&output->scanout_plane); >> -

Re: [PATCH weston 14/21] compositor-fbdev: MAP_FAILED is not NULL

2017-09-22 Thread Daniel Stone
On 22 September 2017 at 07:31, Pekka Paalanen wrote: > Fix the assumption that MAP_FAILED would be equal to NULL. It is not. > Set 'fb' explicitly to NULL on mmap failure so that comparisons to NULL > would produce the expected result. > > Signed-off-by: Pekka Paalanen Reviewed-by: Daniel Stone

Re: [PATCH wayland-protocols] Add zwp_linux_explicit_synchronization_v1

2017-09-22 Thread Pekka Paalanen
On Wed, 20 Sep 2017 07:11:57 -0700 Daniel Stone wrote: > Hi Matt, > > On 20 September 2017 at 05:48, Matt Hoosier wrote: > > On a related subject, there was discussion back at > > https://lists.freedesktop.org/archives/wayland-devel/2013-September/011091.html > > that acknowledged a longstandin

[PATCH weston 21/21] compositor-drm: unref udev on backend destruction

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Fixes a small memory leak, spotted with Valgrind. Signed-off-by: Pekka Paalanen --- libweston/compositor-drm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 58860c0b..dc907818 100644 --- a/libweston/comp

[PATCH weston 20/21] compositor-fbdev: unref udev on backend destruction

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Fixes a small memory leak, spotted with Valgrind. Signed-off-by: Pekka Paalanen --- libweston/compositor-fbdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c index 2e300f47..4b3605cf 100644 --- a/libwesto

[PATCH weston 11/21] libweston: ensure backend is not loaded twice

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Check and ensure that a compositor can only load one backend successfully. If a backend fails to load, it is theoretically possible to try another backend. Once loading succeeds, only destroying the compositor would allow "unloading" a backend. If backend init fail, ensure t

[PATCH weston 19/21] compositor-fbdev: remove unused field 'depth'

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Not referenced anywhere ever, has been there since the introduction of fbdev-backend. Signed-off-by: Pekka Paalanen --- libweston/compositor-fbdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c index c981c52

[PATCH weston 16/21] compositor-fbdev: always destroy renderer-output on disable

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen If we pass the base->enabled test, then the renderer output is guaranteed to be there, so we can just destroy it. Destroying it before unmap makes the sequence match better the enable path. Signed-off-by: Pekka Paalanen --- libweston/compositor-fbdev.c | 4 +--- 1 file ch

[PATCH weston 17/21] compositor-fbdev: rename fbdev_output_disable_handler()

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen This is a more logical name for the function, matching the pattern used in other backends and the hook names. Signed-off-by: Pekka Paalanen --- libweston/compositor-fbdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libweston/compositor-fbdev

[PATCH weston 18/21] compositor-fbdev: fix finish_frame_timer leak

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen The timer was never removed anywhere. Remove it in disable() to match what happens in enable(). Signed-off-by: Pekka Paalanen --- libweston/compositor-fbdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c

[PATCH weston 15/21] compositor-fbdev: simplify FB destroy/unmap/disable

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Rename fbdev_frame_buffer_destroy() to fbdev_frame_buffer_unmap() because that is what it does. Adding the destruction of hw_surface in it makes it the perfect counterpart to fbdev_frame_buffer_map() which simplifies the code. fbdev_frame_buffer_map() can no longer call that

[PATCH weston 14/21] compositor-fbdev: MAP_FAILED is not NULL

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Fix the assumption that MAP_FAILED would be equal to NULL. It is not. Set 'fb' explicitly to NULL on mmap failure so that comparisons to NULL would produce the expected result. Signed-off-by: Pekka Paalanen --- libweston/compositor-fbdev.c | 1 + 1 file changed, 1 insertio

[PATCH weston 13/21] compositor-fbdev: remove unused output arguments

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen A few functions had argument 'output' which was not used at all. Remove such unused arguments. The coming migration to the head-based output API would have made it awkward to come up with the output argument for these, but luckily they are not actually needed. Signed-off-by

[PATCH weston 07/21] compositor-drm: set output make/model/serial once

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen This fixes a regression where monitor make and model would always be advertised as "unknown" to Wayland clients. The EDID strings were parsed at create_output_for_connector() time, but the fallback "unknown" values were set in weston_drm_output_api::set_mode vfunc later. This

[PATCH weston 10/21] libweston: rename weston_output_destroy() to weston_output_release()

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen 'release' is a more appropriate name because the function does not free the underlying memory. The main reason for this is that we need the name weston_output_destroy() for new API that actually will free also the underlying memory. Since the function is only used in backend

[PATCH weston 12/21] libweston: set backend pointer earlier

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Change all backends to set the core backend pointer early. This is necessary for libweston core to be able to access the backend vfuncs before the backend init function returns. Particularly, weston_output_init() will be needing to inspect the backend vfuncs to see if the ba

[PATCH weston 08/21] compositor-drm: set all properties in create_output_for_connector

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Move the remaining scattered setup of the fixed properties into create_output_for_connector(). All these are already known and they cannot change. This helps future refactoring. Signed-off-by: Pekka Paalanen --- libweston/compositor-drm.c | 18 +- 1 file c

[PATCH weston 09/21] libweston: send more wl_surface.enter/leave events

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen A client may have bound the same wl_output multiple times, for who knows what reason. As the server cannot know which wl_output resource to use for which wl_surface, send enter/leave events for all of them. This is a protocol correctness fix. Signed-off-by: Pekka Paalanen

[PATCH weston 06/21] compositor-wayland: move output init into common, fix error path

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Move the weston_output_init() call into wayland_output_create_common(). This avoids passing the name twice to different functions, and follows the precedent set in "libweston: weston_output_init(..., +name)" for calling init before accessing fields. Since the error paths in

[PATCH weston 02/21] compositor-drm: use asprintf in make_connector_name()

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Gets rid of the constant size char array. While here, document the function. Signed-off-by: Pekka Paalanen --- libweston/compositor-drm.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/composit

[PATCH weston 01/21] libweston: move weston_output::mode_list init to core

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Initialize the list in weston_output_init() instead of doing it separately in each backend. One would expect weston_output_init() to initialize all weston_output members, at least those that are not NULL. We rely on the set_size() functions to be called only once, as is ass

[PATCH weston 03/21] compositor-wayland: use asprintf for output title

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Simplifies the code, and makes moving weston_output_init() into wayland_output_create_common() a little easier. Signed-off-by: Pekka Paalanen --- libweston/compositor-wayland.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/libwest

[PATCH weston 04/21] tests: ensure output dependent IVI tests run

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen There are IVI tests that require an output. Previously these tests would silently skip if no outputs were present. However, a test setup should always have outputs with these tests. Skipping could easily leave the tests dead without notice. Make these tests fail instead of s

[PATCH weston 05/21] libweston: weston_output_init(..., +name)

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Add 'name' argument to weston_output_init(). This is much more obvious than the assert inside weston_output_init() to ensure the caller has set a field in weston_output first. Now weston_output_init() will strdup() the name itself, which means we can drop a whole bunch of st

[PATCH weston 00/21] Fixes and reorganization, clone mode prep

2017-09-22 Thread Pekka Paalanen
From: Pekka Paalanen Hi, I have been working towards clone mode[1] and thought it would be a time to shorten my patch series. This series here is a selection of patches from my clone mode preparations. It's a colorful bunch. There are refactorings, memory leak fixes, protocol correctness fix, s

[PATCH weston v3 8/8] compositor: protocol logger

2017-09-22 Thread Maniraj Devadoss
From: Pekka Paalanen This is better than running Weston with WAYLAND_DEBUG=server: - It is enabled on demand, no unnecessary flooding and no need to restart the compositor if debug was enabled. - It prints client pointers so that messages with different clients can be seen apart. Signed-off-

[PATCH weston v3 6/8] xwm: move FILE to the callers of dump_property()

2017-09-22 Thread Maniraj Devadoss
From: Pekka Paalanen This is preparation for using the weston-debug infrastructure for WM_DEBUG. dump_property() may be called from different debugging contexts and often needs to be prefixed with more information. An alternative to this patch would be to pass in the weston_debug_scope as an arg

[PATCH weston v3 1/8] libweston: add weston_debug API and implementation

2017-09-22 Thread Maniraj Devadoss
From: Pekka Paalanen weston_debug is both a libweston API for relaying debugging messages, and the compositor-debug wayland protocol implementation for accessing those debug messages from a Wayland client. weston_debug_compositor_{create,destroy}() are private API, hence not exported. Signed-of

[PATCH weston v3 7/8] xwm: convert WM_DEBUG into a weston-debug scope

2017-09-22 Thread Maniraj Devadoss
From: Pekka Paalanen Instead of a compile time choice, offer the XWM debugging messages through the weston-debug protocol and tool on demand. Users will not need to recompile weston to get XWM debugging, and it won't flood the weston log. The debug scope needs to be initialized in launcher.c for

[PATCH weston v3 0/8] weston-debug API and tool

2017-09-22 Thread Maniraj Devadoss
This series of patches are from weston debug protocol RFC posted by Pekka Paalanen along with the modifications done by me. https://lists.freedesktop.org/archives/wayland-devel/2017-June/034227.html This series depends on the compositor-debug wayland protocol which is not released yet. So a wa

[PATCH weston v3 2/8] compositor: add option to enable weston_debug

2017-09-22 Thread Maniraj Devadoss
From: Pekka Paalanen Let users enable the compositor debug protocol on the compositor command line. This allows weston-debug tool to work. Signed-off-by: Pekka Paalanen Renamed the protocol name in weston.man from weston-debug to compositor_debug_v1 Signed-off-by: Maniraj Devadoss --- compo

[PATCH weston v3 3/8] clients: add weston-debug

2017-09-22 Thread Maniraj Devadoss
From: Pekka Paalanen A tool for accessing the zcompositor_debug_v1 interface features. Installed along weston-info, because it should be potentially useful for people running libweston-based compositors. Signed-off-by: Pekka Paalanen Added a man page for weston-debug client Signed-off-by: Ma

[PATCH weston v3 5/8] xwm: dump_property() to use FILE internally

2017-09-22 Thread Maniraj Devadoss
From: Pekka Paalanen Write the output of dump_property() out in one log call. When multiple processes (weston and Xwayland) are writing to the same file, this will keep the property dump uninterrupted by Xwayland debug prints. This is also preparation for more development in the same direction.

[PATCH weston v3 4/8] compositor: offer logs via weston-debug

2017-09-22 Thread Maniraj Devadoss
From: Pekka Paalanen This registers a new weston-debug scope "log" through which one can get live log output interspersed with possible other debugging prints. Signed-off-by: Pekka Paalanen pass the log_scope to weston_debug_scope_timestamp API to append the scope name to the timestamp Signed

[PATCH wayland-protocols v3] protocol: add compositor-debug.xml

2017-09-22 Thread Maniraj Devadoss
From: Pekka Paalanen This is a new debugging extension for non-production environments. The aim is to replace all build-time choosable debug prints in the compositor with runtime subscribable debug streams. Signed-off-by: Pekka Paalanen Signed-off-by: Maniraj Devadoss --- Makefile.am

[PATCH wayland-protocols v3] Introduce compositor-debug protocol

2017-09-22 Thread Maniraj Devadoss
This protocol is a new debugging extension for non-production environments. The aim of this protocol is to replace all the build-time choosable debug prints in the compositor with runtime subscribable debug streams. This protocol is extracted from the weston-debug protocol RFC posted by Pekka Pa

[PATCH] Fix API troubles with FreeRDP 2.0

2017-09-22 Thread David Fort
With FreeRDP 2.0 the crypto needs to be initialized or we fail as soon as we try to compute a md5. The API also changed for the suppress output callback. --- libweston/compositor-rdp.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libweston/compositor-rdp.c b

Re: [PATCH libinput] udev: add quirk for Chalkboard Electronics HID Touchscreen

2017-09-22 Thread Hans de Goede
Hi, On 21-09-17 16:00, Matt Porter wrote: On Thu, Sep 21, 2017 at 10:59:08AM +0200, Hans de Goede wrote: Hi, On 19-09-17 18:41, Matt Porter wrote: The Chalkboard Electronics HID Touchscreen is classified as a tablet device by systemd udev because it has BTN_TOOL_PEN support. It also reports a

RE: [PATCH wayland-protocols v2] protocol: add compositor-debug.xml

2017-09-22 Thread Devadoss, Maniraj (RBEI/ECF3; ADITG/SWG)
Hi Pekka, Sorry, I will upstream the patches again. Best regards Maniraj Devadoss Software Group (ADITG/SWG) Tel. +49 5121 49 6933 -Original Message- From: Pekka Paalanen [mailto:ppaala...@gmail.com] Sent: Freitag, 22. September 2017 09:36 To: Devadoss, Maniraj (RBEI/ECF3; ADITG/SWG)

Re: [PATCH wayland-protocols v2] protocol: add compositor-debug.xml

2017-09-22 Thread Pekka Paalanen
On Mon, 11 Sep 2017 17:33:58 +0200 Maniraj Devadoss wrote: > This is a new debugging extension for non-production environments. The > aim is to replace all build-time choosable debug prints in the > compositor with runtime subscribable debug streams. > > Signed-off-by: Pekka Paalanen > Signed-o