[PATCH weston 0/4] RFC: Output layout configuration

2016-09-30 Thread Armin Krezović
This series adds necessary code to support horizontal output layout configuration using weston's config file. The output placement is relative to an output that specifies outputs it should be placed next to, either left of, or right of a given output. If there's a conflicting output on that

[PATCH weston 2/4] weston: Move output position setting to compositor

2016-09-30 Thread Armin Krezović
This moves current output positioning code and scale/transform application to the compositor itself, so the compositor can configure output layouts any way it wants. A helper function for setting x and y coordinates is also added, and couple of assertions to weston_output_enable() as well, to

[PATCH weston 4/4] compositor: Implement horizontal output layout configuration

2016-09-30 Thread Armin Krezović
This patch adds horizontal output layout configuration using the previously added code. When an output is added, it looks for outputs that it should be placed next to, if they are specified. If such output is found, output layout is updated if needed (outputs on a given position are moved right

[PATCH weston 1/4] libweston: Export weston_output_transform_scale_init

2016-09-30 Thread Armin Krezović
This is required for implementing output layout setting which relies on current output width and height, and those are calculated in this function. It also changes the function signature to make use of already stored scale and transform values in the weston_output object. Signed-off-by: Armin

[PATCH weston 3/4] compositor: Add internal output object used for layout configuration

2016-09-30 Thread Armin Krezović
This adds weston specific output object, which contains information about output's position, relative to other outputs. DRM and Windowed backends code has been updated to make use of the new code and parse new configuration options for a given output, if it was specified. New configuration file

[PATCH weston v2] compositor-drm: Don't drop viewported surfaces into the cursor plane

2016-09-30 Thread Derek Foreman
No good can come of this... the cursor plane's constraints are too heavy to make bothering with this worthwhile. To see the bug this fixes, set your output scale to 2 and then launch weston-scaler -s and perform an action that makes the cursor disappear (such as typing in a weston terminal the

Re: [PATCH weston] compositor-drm: Don't drop viewported surfaces into the cursor plane

2016-09-30 Thread Derek Foreman
On 30/09/16 02:39 PM, Daniel Stone wrote: Hi Derek, On Friday, 30 September 2016, Derek Foreman > wrote: +static bool +viewport_is_cursor_compatible(struct weston_buffer_viewport *viewport) +{ + /* While we could

Re: [PATCH weston] compositor-drm: Don't drop viewported surfaces into the cursor plane

2016-09-30 Thread Daniel Stone
Hi Derek, On Friday, 30 September 2016, Derek Foreman wrote: > > +static bool > +viewport_is_cursor_compatible(struct weston_buffer_viewport *viewport) > +{ > + /* While we could technically relax soem of these constraints > +* if we implemented cropping in

Re: [PATCH weston v2 3/3] compositor-drm: Support linux_dmabuf output for sprite planes without gbm

2016-09-30 Thread Derek Foreman
On 30/09/16 04:28 AM, Tomohito Esaki wrote: Multiplanar formats are supported by using drmModeAddFB2 and bypassing gbm. If drmModeAddFB2 isn't available, the existing gbm bo import path is used and multiplanar formats are unsupported. I'm not sure we should be doing anything with the existing

[PATCH weston] compositor-drm: Don't drop viewported surfaces into the cursor plane

2016-09-30 Thread Derek Foreman
No good can come of this... the cursor plane's constraints are too heavy to make bothering with this worthwhile. To see the bug this fixes, set your output scale to 2 and then launch weston-scaler -s and perform an action that makes the cursor disappear (such as typing in a weston terminal the

[PATCH weston] clients: Fix weston-scaler source-only mode to use integer width and height

2016-09-30 Thread Derek Foreman
If only the source of a viewport is set, the width and height must be integer or the protocol mandates that the compositor generate an error. This is because using only the source is a crop, and the width and height become the surface size - all surface sizes must be integer. Weston was fixed to

Re: [PATCH weston v2 2/3] compositor-drm: Add scanout support for linux_dmabuf buffers

2016-09-30 Thread Eric Engestrom
On Fri, Sep 30, 2016 at 06:28:52PM +0900, Tomohito Esaki wrote: > This implementations bypasses gbm and passes the dmabuf handles directly > to libdrm for composition. > > Signed-off-by: Tomohito Esaki > --- > libweston/compositor-drm.c | 125 >

Re: [PATCH weston v2 1/3] compositor-drm: refactor destroy drm_fb function

2016-09-30 Thread Eric Engestrom
On Fri, Sep 30, 2016 at 06:28:51PM +0900, Tomohito Esaki wrote: > The drm_fb destroy callback to mostly the same thing regardless of > whether the buffer is a dumb buffer or gbm buffer. This patch refactors > the common parts into a new function that can be called for both cases. > >

Re: Compiling Weston with musl-libc (WAS: [PATCH weston] weston-launch: use custom error function)

2016-09-30 Thread Eric Engestrom
On Fri, Sep 30, 2016 at 02:07:38PM +0200, Armin Krezović wrote: > On 30.09.2016 13:59, Eric Engestrom wrote: > > On Fri, Sep 30, 2016 at 11:36:24AM +0100, Murray Calavera wrote: > >> On 30 September 2016 at 11:10, Eric Engestrom > >> wrote: > >> > >>> On Thu, Sep 29,

Re: Compiling Weston with musl-libc (WAS: [PATCH weston] weston-launch: use custom error function)

2016-09-30 Thread Murray Calavera
On 30 September 2016 at 12:59, Eric Engestrom wrote: > On Fri, Sep 30, 2016 at 11:36:24AM +0100, Murray Calavera wrote: > > On 30 September 2016 at 11:10, Eric Engestrom > > > wrote: > > > > > On Thu, Sep 29, 2016 at 09:26:16PM +0100,

[PATCH weston] gl-renderer: Use EGL_KHR_no_config_context

2016-09-30 Thread Armin Krezović
This patch makes use of recently implemented EGL_KHR_no_config_context extension in Mesa, which superseeds EGL_MESA_configless_context. See also (and the follow-up patch): https://lists.freedesktop.org/archives/mesa-dev/2016-September/128510.html v2: - Extend existing infrastructure for

Re: [PATCH weston] gl-renderer: Use EGL_KHR_no_config_context

2016-09-30 Thread Armin Krezović
On 30.09.2016 13:04, Emil Velikov wrote: > On 28 September 2016 at 20:54, Armin Krezović > wrote: >> On 27.09.2016 15:18, Emmanuel Gil Peyrot wrote: >>> On Tue, Sep 27, 2016 at 12:29:51PM +0200, Armin Krezović wrote: This patch makes use of recently implemented

[PATCH weston v4 01/14] libweston: Add more functionality for handling weston_output objects

2016-09-30 Thread Armin Krezović
This patch implements additional functionality that will be used for configuring, enabling and disabling weston's outputs. Its indended use is by the compositors or user programs that want to be able to configure, enable or disable an output at any time. An output can only be configured while it's

[PATCH weston v3 09/14] weston: Port X11 backend to new output handling API

2016-09-30 Thread Armin Krezović
This is a complete port of the X11 backend that uses recently added output handling API for output configuration. - Output can be configured at runtime by passing the necessary configuration parameters, which can be filled in manually, obtained from the configuration file or obtained from

[PATCH weston v3 11/14] weston: Rename weston_output_init_pending() to weston_output_init()

2016-09-30 Thread Armin Krezović
v2: - Rebased for latest changes. v3: - Rebased for changes in wayland backend. Reviewed-by: Quentin Glidic Reviewed-by: Pekka Paalanen Signed-off-by: Armin Krezović --- libweston/compositor-drm.c

[PATCH weston v4 08/14] weston: Port Wayland backend to new output handling API

2016-09-30 Thread Armin Krezović
This is a complete port of the Wayland backend that uses the recently added output handling API for output configuration. - Output can be configured at runtime by passing the necessary configuration parameters, which can be filled in manually, obtained from the configuration file or

[PATCH weston 12/14] libweston: Remove weston_backend_output_config structure

2016-09-30 Thread Armin Krezović
Reviewed-by: Quentin Glidic Reviewed-by: Pekka Paalanen Signed-off-by: Armin Krezović --- libweston/compositor.h | 14 -- 1 file changed, 14 deletions(-) diff --git a/libweston/compositor.h

[PATCH weston 14/14] compositor-rdp: Properly destroy the renderer and pixman image

2016-09-30 Thread Armin Krezović
Reviewed-by: Pekka Paalanen Signed-off-by: Armin Krezović --- libweston/compositor-rdp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c index d385a31..223382c 100644 ---

[PATCH weston v3 06/14] weston: Port headless backend to new output handling API

2016-09-30 Thread Armin Krezović
This is a complete port of the headless backend that uses the recently added output handling API for output configuration. - Output can be configured at runtime by passing the necessary configuration parameters, which can be filled in manually, obtained from the configuration file or

[PATCH weston v3 03/14] compositor: Implement output configuration using windowed_output_api

2016-09-30 Thread Armin Krezović
This implements output configuration for outputs which use previously added weston_windowed_output_api. The function takes an output that's to be configured, default configuration that's to be set in case no configuration is specified in the config file or on command line and optional third

[PATCH weston v3 07/14] weston: Port RDP backend to new output handling API

2016-09-30 Thread Armin Krezović
This is a complete port of the RDP backend that uses the recently added output handling API for output configuration. Output can be configured at runtime by passing the necessary configuration parameters, which can be filled in manually or obtained from the command line using previously added

[PATCH weston v4 04/14] weston: Port DRM backend to new output handling API

2016-09-30 Thread Armin Krezović
This is a complete port of the DRM backend that uses the recently added output handling API for output configuration. Output can be configured at runtime by passing the necessary configuration parameters, which can be filled in manually or obtained from the configuration file using previously

[PATCH weston 10/14] libweston: Merge weston_output_init() into weston_output_enable()

2016-09-30 Thread Armin Krezović
Reviewed-by: Quentin Glidic Reviewed-by: Pekka Paalanen Signed-off-by: Armin Krezović --- libweston/compositor.c | 124 - 1 file changed, 41 insertions(+), 83

[PATCH weston 00/14] New output configuration API take 4

2016-09-30 Thread Armin Krezović
This is (hopefully final) take 4 of my new output configuration API. This series addresses some minor issues found during the DRM backend review and contains some (rather major) refactoring of the Wayland backend to bring back old --fullscreen behaviour and address some minor issues. For

[PATCH weston v2 05/14] weston: Port fbdev backend to new output handling API

2016-09-30 Thread Armin Krezović
This is a complete port of the fbdev backend that uses the recently added output handling API for output configuration. It is required that the scale and transform values are set using the previously added functionality. After everything has been set, output needs to be enabled manually using

[PATCH weston 13/14] libweston: Drop requirement of setting mm_width/mm_height in backends

2016-09-30 Thread Armin Krezović
They were required for transitional phase in order not to break previous weston_output_init(). Now, they can even be initialized on enable, or left with defaults if backend doesn't support them. Reviewed-by: Pekka Paalanen Signed-off-by: Armin Krezović

[PATCH weston v3 02/14] libweston: Add initial output API for windowed outputs configuration

2016-09-30 Thread Armin Krezović
This adds new plugin-specific API for configuring outputs on "windowed" backends, such as X11, wayland/non-fullscreen and even headless (although, it doesn't have any windows, its configuration is very similar). It can be used from compositors to configure pending outputs and should be used with

Re: Compiling Weston with musl-libc (WAS: [PATCH weston] weston-launch: use custom error function)

2016-09-30 Thread Armin Krezović
On 30.09.2016 13:59, Eric Engestrom wrote: > On Fri, Sep 30, 2016 at 11:36:24AM +0100, Murray Calavera wrote: >> On 30 September 2016 at 11:10, Eric Engestrom >> wrote: >> >>> On Thu, Sep 29, 2016 at 09:26:16PM +0100, Murray Calavera wrote: error.h is a gnu

Compiling Weston with musl-libc (WAS: [PATCH weston] weston-launch: use custom error function)

2016-09-30 Thread Eric Engestrom
On Fri, Sep 30, 2016 at 11:36:24AM +0100, Murray Calavera wrote: > On 30 September 2016 at 11:10, Eric Engestrom > wrote: > > > On Thu, Sep 29, 2016 at 09:26:16PM +0100, Murray Calavera wrote: > > > error.h is a gnu extension and not available in other > > > popular

Re: [PATCH 00/14] New output configuration API take 3

2016-09-30 Thread Pekka Paalanen
On Thu, 18 Aug 2016 18:42:28 +0200 Armin Krezović wrote: > This is take 3 of my new output configuration API. > > Two major changes happened: > > - weston_output_init_pending() was split into > weston_compositor_add_pending_output(), so >

Re: [PATCH weston] gl-renderer: Use EGL_KHR_no_config_context

2016-09-30 Thread Emil Velikov
On 28 September 2016 at 20:54, Armin Krezović wrote: > On 27.09.2016 15:18, Emmanuel Gil Peyrot wrote: >> On Tue, Sep 27, 2016 at 12:29:51PM +0200, Armin Krezović wrote: >>> This patch makes use of recently implemented >>> EGL_KHR_no_config_context extension in Mesa, >>>

Re: [PATCH weston] weston-launch: use custom error function

2016-09-30 Thread Murray Calavera
On 30 September 2016 at 11:10, Eric Engestrom wrote: > On Thu, Sep 29, 2016 at 09:26:16PM +0100, Murray Calavera wrote: > > error.h is a gnu extension and not available in other > > popular libcs like musl. This patch provides a replacement. > > > > Signed-off-by:

Re: [PATCH weston] weston-launch: use custom error function

2016-09-30 Thread Eric Engestrom
On Thu, Sep 29, 2016 at 09:26:16PM +0100, Murray Calavera wrote: > error.h is a gnu extension and not available in other > popular libcs like musl. This patch provides a replacement. > > Signed-off-by: Murray Calavera How did you test this? For me, `CC=musl-gcc

Re: [PATCH 1/3 v4] wayland-server: Add API to control globals visibility

2016-09-30 Thread Pekka Paalanen
On Tue, 16 Aug 2016 10:05:57 +0200 Olivier Fourdan wrote: > Add a new API to let compositor decide whether or not a wl_global > should be advertised to the clients via wl_registry_bind() or > display_get_registry() > > By using its own filter, the compositor can decide

[PATCH weston] compositor-drm: calculate source rect using viewport top-left for sprite plane

2016-09-30 Thread Tomohito Esaki
Add the viewport offset position into the sprite plane cropping calculation. Without this patch the sprite plane always outputs from the top left corner of the source buffer. Signed-off-by: Tomohito Esaki --- libweston/compositor-drm.c | 13 + 1 file changed, 13

[PATCH weston v2 3/3] compositor-drm: Support linux_dmabuf output for sprite planes without gbm

2016-09-30 Thread Tomohito Esaki
Multiplanar formats are supported by using drmModeAddFB2 and bypassing gbm. If drmModeAddFB2 isn't available, the existing gbm bo import path is used and multiplanar formats are unsupported. Signed-off-by: Tomohito Esaki --- libweston/compositor-drm.c | 53

[PATCH weston v2 2/3] compositor-drm: Add scanout support for linux_dmabuf buffers

2016-09-30 Thread Tomohito Esaki
This implementations bypasses gbm and passes the dmabuf handles directly to libdrm for composition. Signed-off-by: Tomohito Esaki --- libweston/compositor-drm.c | 125 ++--- 1 file changed, 107 insertions(+), 18 deletions(-) diff --git

[PATCH weston v2 1/3] compositor-drm: refactor destroy drm_fb function

2016-09-30 Thread Tomohito Esaki
The drm_fb destroy callback to mostly the same thing regardless of whether the buffer is a dumb buffer or gbm buffer. This patch refactors the common parts into a new function that can be called for both cases. Signed-off-by: Tomohito Esaki --- libweston/compositor-drm.c | 31

[PATCH weston v2 0/3] compositor: Support linux_dmabuf multiplanar formats for scanout/sprite planes

2016-09-30 Thread Tomohito Esaki
These patches add support multiplanar formats by using linux_dmabuf instead of gbm for scanout/sprite plane importing. When rendering linux_dmabuf buffers, gbm isn't required, and multiplanar formats can be supported by using drmModeAddFB2() instead of gbm_import(). The first patch refactors

[PATCH wayland 1/2] protocol: Describe wl_registry as singleton

2016-09-30 Thread Yong Bakos
From: Yong Bakos Other singleton objects in the protocol are described as such. Add a singleton adjective to the wl_registry description, making it similar to other descriptions. Signed-off-by: Yong Bakos --- protocol/wayland.xml | 4 ++--