Re: [RFC wayland-protocols] inputfd - direct input access protocol

2017-04-04 Thread The Rasterman
On Tue, 04 Apr 2017 14:45:13 +0200 Bastien Nocera said: > On Tue, 2017-04-04 at 20:32 +0900, Carsten Haitzler wrote: > > On Tue, 4 Apr 2017 10:22:24 +1000 Peter Hutterer > t.net> > > said: > > > > > On Tue, Apr 04, 2017 at 08:16:03AM +0900, Carsten Haitzler wrote: > > > > On Fri, 31 Mar 2017 17

Re: libinput 1.7.0, intermittently erratic touchpad

2017-04-04 Thread Chris Murphy
On Tue, Apr 4, 2017 at 6:25 PM, Peter Hutterer wrote: > On Tue, Apr 04, 2017 at 05:01:53PM -0600, Chris Murphy wrote: >> On Tue, Apr 4, 2017 at 4:36 PM, Peter Hutterer >> wrote: >> > On Tue, Apr 04, 2017 at 12:33:32PM -0600, Chris Murphy wrote: >> >> Before filing a bug... >> >> >> >> I'm having

Re: libinput 1.7.0, intermittently erratic touchpad

2017-04-04 Thread Peter Hutterer
On Tue, Apr 04, 2017 at 05:01:53PM -0600, Chris Murphy wrote: > On Tue, Apr 4, 2017 at 4:36 PM, Peter Hutterer > wrote: > > On Tue, Apr 04, 2017 at 12:33:32PM -0600, Chris Murphy wrote: > >> Before filing a bug... > >> > >> I'm having tap to click annoyances. When typing, the cursor insert > >> p

Re: libinput 1.7.0, intermittently erratic touchpad

2017-04-04 Thread Chris Murphy
On Tue, Apr 4, 2017 at 4:36 PM, Peter Hutterer wrote: > On Tue, Apr 04, 2017 at 12:33:32PM -0600, Chris Murphy wrote: >> Before filing a bug... >> >> I'm having tap to click annoyances. When typing, the cursor insert >> point changes somewhere else, and suddenly I'm typing where I don't >> want to

Re: libinput 1.7.0, intermittently erratic touchpad

2017-04-04 Thread Peter Hutterer
On Tue, Apr 04, 2017 at 12:33:32PM -0600, Chris Murphy wrote: > Before filing a bug... > > I'm having tap to click annoyances. When typing, the cursor insert > point changes somewhere else, and suddenly I'm typing where I don't > want to be; a nearby background application gets "palm tapped" and >

Re: [PATCH weston 01/15] libweston: improve weston_output_disable() comments

2017-04-04 Thread Daniel Stone
Hi, On 4 April 2017 at 20:22, Armin Krezović wrote: > On 04.04.2017 12:58, Pekka Paalanen wrote: >> Reorder some paragraphs to be more logically ordered. Rewrite the >> description of the backend-specific disable function to explain the >> semantics instead of the mechanics. Remove the paragraph

Re: [PATCH weston 15/15] libweston: introduce weston_output_from_resource()

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > This is a simple wrapper for casting the user data of a wl_resource into > a struct weston_output pointer. Using the wrapper clearly marks all the > places where a wl_output protocol object is used. > > Replace ALL wl_output r

Re: [PATCH weston 14/15] libweston: make weston_output::connection_internal a bool

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > It really is a boolean. > > Signed-off-by: Pekka Paalanen Reviewed-by: Armin Krezović Thanks, Armin. > --- > libweston/compositor-drm.c | 2 +- > libweston/compositor.h | 2 +- > 2 files changed, 2 insertions(+), 2 d

Re: [PATCH weston 13/15] libweston: extend output->region lifetime

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > It's a little awkward to try to keep the weston_output::region and > weston_output::previous_damage allocate exactly only when the output is > enabled. There was also a leak: weston_output_move() was calling > weston_output_ini

Re: [PATCH weston 12/15] libweston: move globals to weston_compositor_add_output()

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > Move the wl_output global management into weston_compositor_add_output() > and weston_compositor_remove_output(). > > If weston_output_enable() fails, there is no need to clean up the global > and the clients will not see a wl

Re: [PATCH weston 11/15] libweston: move output id into add/remove_output()

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > Move the output id management into weston_compositor_add_output() and > weston_compositor_remove_output(). This is a more logical place, and > works towards assimilating weston_output_enable_undo(). > > The output id is no lon

Re: [PATCH weston 10/15] libweston: prevent double weston_output_enable()

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > Hi, > Enabling an already enabled output is an error, at least with the > current implementation. Ouch, how embarrasing. > > However, disabling and output that has not been enabled is ok. an output ^ > > Cope w

Re: [PATCH weston 09/15] libweston: specify weston_output::enabled

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > Hi, > It was ambiguous what this flag meant - it did not mean whether the > backend is considering this output to be enabled, because > weston_output_destroy() unsets it while deliberately not calling the > backend disable() vf

Re: [PATCH weston 08/15] libweston: move asserts to add_pending_output()

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > weston_compositor_add_pending_output() is the point through which all > backends must go when creating a new output. The enable and disable > vfuns are essential for anything to be done with the output, so it makes > sense to c

Re: [PATCH weston 07/15] libweston: unexport weston_output_update_matrix()

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > Only used internally in core. Needs to happen automatically when > something changes, so there should no need to call it from outside. > > Signed-off-by: Pekka Paalanen Reviewed-by: Armin Krezović Thanks, Armin. > --- >

Re: [PATCH weston 06/15] libweston: unexport weston_compositor_add_output()

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > Only used by weston_output_enable(). > > Signed-off-by: Pekka Paalanen Reviewed-by: Armin Krezović Thanks, Armin. > --- > libweston/compositor.c | 2 +- > libweston/compositor.h | 3 --- > 2 files changed, 1 insertion(+)

Re: [PATCH weston 05/15] libweston: two more weston_output docs

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > Document two more functions of the weston_output API. > > Exported functions marked internal are meant for backends only. > Exported functions not marked internal are meant for libweston users. > > Signed-off-by: Pekka Paalan

Re: [PATCH weston 04/15] libweston: let add/remove_output handle the lists

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > A weston_output available to the compositor should always be either in > the pending or the live outputs list. Let weston_compositor_add_output() > and weston_compositor_remove_output() handle the moves between the > lists. >

Re: [PATCH weston 03/15] libweston: use helper var in weston_compositor_remove_output

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > To shorten lines. > > Signed-off-by: Pekka Paalanen Trivial. Reviewed-by: Armin Krezović Thanks, Armin. > --- > libweston/compositor.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/lib

Re: [PATCH weston 02/15] libweston: untangle weston_compositor_remove_output doc

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > Trying to make it more readable. Things that happen in the same step are > kept in the same paragraph. > > Signed-off-by: Pekka Paalanen > --- > libweston/compositor.c | 24 > 1 file changed, 16 inse

Re: [PATCH weston 01/15] libweston: improve weston_output_disable() comments

2017-04-04 Thread Armin Krezović
On 04.04.2017 12:58, Pekka Paalanen wrote: > From: Pekka Paalanen > > Reorder some paragraphs to be more logically ordered. Rewrite the > description of the backend-specific disable function to explain the > semantics instead of the mechanics. Remove the paragraph about > pending_output_list as u

libinput 1.7.0, intermittently erratic touchpad

2017-04-04 Thread Chris Murphy
Before filing a bug... I'm having tap to click annoyances. When typing, the cursor insert point changes somewhere else, and suddenly I'm typing where I don't want to be; a nearby background application gets "palm tapped" and becomes foreground. That sort of thing. So it's taken some getting used t

[PATCH weston v2] desktop-shell: Position maximized surfaces on the correct output.

2017-04-04 Thread Emmanuel Gil Peyrot
During a maximize event, a surface was previously always put back to the primary output after one frame on the correct output, while keeping its size. This was caused by the shell surface’s last_{width,height} not being reset when it was either fullscreen or maximized, leading to the unmaximize/ma

[PATCH weston] compositor-drm: correctly set the version of the drmEventContext

2017-04-04 Thread Emil Velikov
From: Emil Velikov We implement v2 so use that instead of the DRM_EVENT_CONTEXT_VERSION macro. The latter defines the version of the drmEventContext struct declared in the header [used in the current build] and can be 2, 3 or even 1000. Cc: Daniel Stone Signed-off-by: Emil Velikov --- libwes

[PATCH weston v10 58/61] compositor-drm: Relax plane restrictions for atomic

2017-04-04 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 Differential Revision: https://phabricator.freedesktop.org/D1536 Signed-off-by: Daniel Stone ---

[PATCH weston] desktop-shell: Position maximized surfaces on the correct output.

2017-04-04 Thread Emmanuel Gil Peyrot
During a maximize event, a surface was previously always put back to the primary output after one frame on the correct output, while keeping its size. This was due to unset_maximized() resetting the output of the shell surface to the primary output whenever the surface received a commit. This fix

[PATCH weston v10 57/61] compositor-drm: Add test-only mode to state application

2017-04-04 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. Differential Revision: https://phabricator.freedesktop.org/D1533 Signed-off-by: Daniel Stone --- l

[PATCH weston v10 34/61] compositor-drm: Add blob_id member to drm_mode

2017-04-04 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. Differential Revision: https://phabricator.freedesktop.org/D1504 Signed-of

[PATCH weston v10 59/61] compositor-drm: Enable planes for atomic

2017-04-04 Thread Daniel Stone
Now that we can sensibly test proposed plane configurations with atomic, sprites are not broken. Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1537 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 22 +++--- 1 file changed,

[PATCH weston v10 48/61] compositor-drm: Avoid GBM for dmabuf import

2017-04-04 Thread Daniel Stone
From: Tomohito Esaki Rather than relying on GBM for dmabuf import, perform the import directly through libdrm. This creates a specialised drm_fb type for dmabufs. This also supports multi-planar dmabuf. [daniels: Rebased on top of recent drm_fb/drm_plane_state/etc.] Signed-off-by: Daniel Stone

[PATCH weston v10 31/61] compositor-drm: Use apply_state for starting repaint

2017-04-04 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 Differential Revision: https://phabricator.freedesktop.org/D1514 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 33 +---

[PATCH weston v10 46/61] compositor-drm: Extract drm_fb_addfb into a helper

2017-04-04 Thread Daniel Stone
We currently do the same thing in two places, and will soon have a third. Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1523 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 63 +++--- 1 file changed

[PATCH weston v10 45/61] compositor-drm: Remove no_addfb2 handling

2017-04-04 Thread Daniel Stone
If AddFB2 ever fails for any reason, we fall back to legacy AddFB, which doesn't support the same swathe of formats, or multi-planar formats, or modifiers. This can happen with arbitrary client buffers, condemning us to the fallback forever more. Remove this, at the cost of an unnecessary ioctl fo

[PATCH weston v10 26/61] compositor-drm: Use drm_plane for scanout plane

2017-04-04 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 Differential Revision: https://phabricator.freedesktop.org/D1416 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 156 ++

[PATCH weston v10 22/61] compositor-drm: Introduce drm_pending_state structure

2017-04-04 Thread Daniel Stone
drm_pending_state is currently skeletal, but will be used to retain data through begin_repaint -> assign_planes -> repaint -> repaint_flush. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 100 + 1 file changed, 100 insertions(+) diff --g

[PATCH weston v10 61/61] compositor-drm: Support modifiers with GBM

2017-04-04 Thread Daniel Stone
Use the extended GBM allocator interface to support modifiers and multi-planar BOs. Depends on bwidawsk's 'modifiers' tree. Signed-off-by: Daniel Stone --- configure.ac | 3 +++ libweston/compositor-drm.c | 52 +++--- libweston/meson.build

[PATCH weston v10 06/61] compositor-drm: Refactor destroy drm_fb function

2017-04-04 Thread Daniel Stone
From: 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. [daniels: Rebased on top of fb->fd changes, cosmetic changes.]

[PATCH weston v10 55/61] compositor-drm: Add modes to drm_output_propose_state

2017-04-04 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 Differential Revision: https://phabricator.freedesktop

[PATCH weston v10 18/61] compositor-drm: Rename fb_plane to scanout_plane

2017-04-04 Thread Daniel Stone
All planes being displayed have a framebuffer. What makes 'fb_plane' special is that it's being displayed as the primary plane by KMS. Previous patchsets renamed this to 'primary_plane' to match the KMS terminology, namely the CRTC's base plane, which is controlled by drmModeSetCrtc in the legacy

[PATCH weston v10 60/61] [XXX] compositor-drm: Support drmModeGetPlane2

2017-04-04 Thread Daniel Stone
GetPlane2 adds information about format modifiers; we can use these to both feed GBM with the set of modifiers we want to use for rendering, and also as an early-out test when we're trying to see if a FB will go on a particular plane. XXX: Depends on krh/bwidawsk's unmerged kernel/libdrm patches.

[PATCH weston v10 52/61] compositor-drm: Split drm_assign_planes in two

2017-04-04 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 Differential Revision: https://pha

[PATCH weston v10 42/61] compositor-drm: Use plane_coords_for_view for cursor

2017-04-04 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 Differential Revision: https://phabricator.freedesktop.org/D1519 Signed-off-by: Daniel Stone ---

[PATCH weston v10 21/61] compositor-drm: Track all plane types

2017-04-04 Thread Daniel Stone
Retain drm_plane tracking objects for all actual DRM planes when using universal planes, not just overlay planes. Rename uses of 'sprite' to 'plane' to make it clear that it can now be any kind of plane, not just an overlay/sprite. These are currently unused. Differential Revision: https://phabri

[PATCH weston v10 16/61] compositor-drm: Rename drm_sprite to drm_plane

2017-04-04 Thread Daniel Stone
We make the differentiation where planes are an abstract framebuffer with a position within a CRTC/output, and sprites are special cases of planes that are neither the primary (base/framebuffer) nor cursor plane. drm_sprite, OTOH, contains nothing that's actually specific to sprites, and we end up

[PATCH weston v10 54/61] compositor-drm: Ignore occluded views

2017-04-04 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 Diff

[PATCH weston v10 51/61] compositor-drm: Rename region variable

2017-04-04 Thread Daniel Stone
Make it a bit more clear what the purpose of the variable is. Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1528 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a

[PATCH weston v10 49/61] compositor-drm: Support modifiers for drm_fb

2017-04-04 Thread Daniel Stone
Use the new drmModeAddFB2WithModifiers interface to import buffers with modifiers. Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1526 Signed-off-by: Daniel Stone --- configure.ac | 3 +++ libweston/compositor-drm.c | 25

[PATCH weston v10 20/61] compositor-drm: Add universal plane awareness

2017-04-04 Thread Daniel Stone
From: Pekka Paalanen Add awareness of, rather than support for, universal planes. Activate the client cap when we start if possible, and if this is activated, studiously ignore non-overlay planes. For now. Differential Revision: https://phabricator.freedesktop.org/D1495 Signed-off-by: Daniel St

[PATCH weston v10 36/61] compositor-drm: Atomic modesetting support

2017-04-04 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. Differential Revision: https://phabricator.freedesktop.org/D1507 Signed-off-by:

[PATCH weston v10 08/61] compositor-drm: Refcount drm_fb

2017-04-04 Thread Daniel Stone
Sometimes we need to duplicate an existing drm_fb, e.g. when pageflipping to the same buffer to kickstart the repaint loop. To handle situations like these, and simplify resource management for dumb and cursor buffers, refcount drm_fb. drm_fb_get_from_bo has a path where it may reuse a drm_fb, if

[PATCH weston v10 35/61] compositor-drm: Add to_drm_mode helper

2017-04-04 Thread Daniel Stone
Much like we already have to_drm_output and to_drm_backend. Differential Revision: https://phabricator.freedesktop.org/D1505 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libweston/compositor-drm.c b/libwest

[PATCH weston v10 47/61] compositor-drm: Support multi-planar drm_fb

2017-04-04 Thread Daniel Stone
Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1524 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/libweston/compositor-drm.c

[PATCH weston v10 07/61] compositor-drm: Drop output from release_fb

2017-04-04 Thread Daniel Stone
We only need it for the GBM surface the FB was originally created against; a mismatch here is very bad indeed, so no reason to pass it in explictly every time rather than store it. Following patches change drm_fb to be explicitly reference counted; in order to reduce churn, rename drm_output_relea

[PATCH weston v10 56/61] compositor-drm: Return plane state from plane preparation

2017-04-04 Thread Daniel Stone
Return a pointer to the plane state, rather than indirecting via a weston_plane. Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1534 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 54 -- 1 file

[PATCH weston v10 39/61] compositor-drm: Fully account for buffer transformation

2017-04-04 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 Re

[PATCH weston v10 44/61] compositor-drm: Use plane FB-import helper for scanout

2017-04-04 Thread Daniel Stone
Use the same codepath, which has the added advantage of being able to import dmabufs. Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1521 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 54 +++--- 1

[PATCH weston v10 33/61] compositor-drm: Discover atomic properties

2017-04-04 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. Differential Revision: https://phabricator.freedesktop.org/D1503 Signed-off-by: Daniel Stone Co-authored-by: Pekka Paalanen --- con

[PATCH weston v10 30/61] compositor-drm: Move repaint state application to flush

2017-04-04 Thread Daniel Stone
Split repaint into two stages, as implied by the grouped-repaint interface: drm_output_repaint generates the repaint state only, and drm_repaint_flush applies it. This also moves DPMS into output state. Previously, the usual way to DPMS off was that repaint would be called and apply its state, fol

[PATCH weston v10 53/61] compositor-drm: Ignore views on other outputs

2017-04-04 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 Differential Revision: https://phabricator.freedesktop.

[PATCH weston v10 37/61] compositor-drm: Make alpha-to-opaque handling common

2017-04-04 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 Differential Revision: https://phabricator.freedesktop.org/D1515

[PATCH weston v10 43/61] compositor-drm: Extract overlay FB import to helper

2017-04-04 Thread Daniel Stone
... in order to be able to use it from scanout as well. Differential Revision: https://phabricator.freedesktop.org/D1520 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 221 - 1 file changed, 119 insertions(+), 102 deletions(-) diff --gi

[PATCH weston v10 50/61] compositor-drm: Don't need safe view-list traversal

2017-04-04 Thread Daniel Stone
Nothing in this loop reorders views within the compositor's view_list. Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1527 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH weston v10 19/61] compositor-drm: Add DRM property cache

2017-04-04 Thread Daniel Stone
Add a cache for DRM property IDs and values, and use it for the two connector properties we currently update: DPMS and EDID. As DRM property ID values are not stable, we need to do a name -> ID lookup each run in order to discover the property IDs and enum values to use for those properties. Rathe

[PATCH weston v10 25/61] compositor-drm: Track cursor_plane with a drm_plane

2017-04-04 Thread Daniel Stone
Change the type of cursor_plane from a weston_plane (base tracking structure) to a drm_plane (wrapper containing additional DRM-specific details), and make it a dynamically-allocated pointer. Using the standard drm_plane allows us to reuse code which already deals with drm_planes, e.g. a common cl

[PATCH weston v10 32/61] compositor-drm: Don't restore original CRTC mode

2017-04-04 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. Differential Revision: https://phabricator.freedesktop.org/D1502 Signed-off-by: Daniel St

[PATCH weston v10 23/61] compositor-drm: Introduce drm_output_state structure

2017-04-04 Thread Daniel Stone
Currently this doesn't actually really do anything, but will be used in the future to track the state for both modeset and repaint requests. Completion of the request gives us a single request-completion path for both pageflip and vblank events. Differential Revision: https://phabricator.freedeskt

[PATCH weston v10 38/61] compositor-drm: Extract buffer->plane co-ord translation

2017-04-04 Thread Daniel Stone
Pull this into a helper function, so we can use it everywhere. Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1516 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 157 + 1 file changed, 88 insert

[PATCH weston v10 29/61] compositor-drm: Disable unused CRTCs/connectors

2017-04-04 Thread Daniel Stone
If we have an unused CRTC or connector, explicitly disable it during the end of the repaint cycle, or when we get VT-switched back in. Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/li

[PATCH weston v10 17/61] compositor-drm: Refactor sprite create/destroy into helpers

2017-04-04 Thread Daniel Stone
From: Pekka Paalanen This moves the single sprite creation code from create_sprites() into a new function. The readability clean-up is small, but my intention is to write an alternate version of create_sprites(), and sharing the single sprite creation code is useful. [daniels: Genericised from d

[PATCH weston v10 40/61] [XXX] compositor-drm: Only disallow scaling for overlay planes

2017-04-04 Thread Daniel Stone
Now we have a more comprehensive overview of the transform we're going to apply, use this to explicitly disallow scaling and rotation. XXX: This does not actually disallow rotation for square surfaces. We would have to build up a full buffer->view->output transform matrix, and then analy

[PATCH weston v10 09/61] compositor-drm: Use drm_fb for cursor buffers

2017-04-04 Thread Daniel Stone
Now that we have better types in drm_fb, use it for cursor buffers as well. This gives us easier refcounting for our cursors, as well as a unified buffer-destruction path. Currently this makes no difference, as the KMS legacy cursor update API uses GEM names directly, and never touches DRM FBs. Ho

[PATCH weston v10 41/61] compositor-drm: Use plane_state_coords_for_view for scanout

2017-04-04 Thread Daniel Stone
Use the shiny new helper we have for working through scanout as well. Signed-off-by: Daniel Stone Differential Revision: https://phabricator.freedesktop.org/D1518 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 66 -- 1 file changed, 23

[PATCH weston v10 24/61] compositor-drm: Introduce drm_plane_state structure

2017-04-04 Thread Daniel Stone
Track dynamic plane state (CRTC, FB, position) in separate structures, rather than as part of the plane. This will make it easier to handle state management later, and much more closely tracks what the kernel does with atomic modesets. The fb_last pointer previously used in drm_plane now becomes p

[PATCH weston v10 27/61] compositor-drm: Don't repaint if no damage

2017-04-04 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. Differential Revision: https://phabricator.freedesktop.org/D1499 Signed-off-by: Daniel Stone --- libweston/compositor-drm.c | 15 +-- 1 file changed, 13 insert

[PATCH weston v10 28/61] compositor-drm: Track unused connectors and CRTCs

2017-04-04 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 | 53 ++ 1 file c

[PATCH weston v10 15/61] compositor-drm: Clean up page_flip_pending path

2017-04-04 Thread Daniel Stone
page_flip_pending is only be set when do a pageflip to a newly-rendered buffer; if the flag is not set, we have landed in the start_repaint_loop path where the vblank query fails, and thus we must pageflip to the same buffer. This test was not sufficient for what it was supposed to guard: releasin

[PATCH weston v10 03/61] compositor-drm: Calculate more cursor state up front

2017-04-04 Thread Daniel Stone
Make drm_output_set_cursor more deterministic, by calculating more state and performing more plane manipulation, inside drm_output_prepare_cursor_view. Signed-off-by: Daniel Stone Reviewed-by: Derek Foreman Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 39 ---

[PATCH weston v10 02/61] libweston: Add pixel-format helpers

2017-04-04 Thread Daniel Stone
Rather than duplicating knowledge of pixel formats across several components, create a custom central repository. Signed-off-by: Daniel Stone --- Makefile.am | 2 + libweston/pixel-formats.c | 430 ++ libweston/pixel-formats.h | 194 +++

[PATCH weston v10 05/61] compositor-drm: Store format in drm_fb

2017-04-04 Thread Daniel Stone
This uses the new pixel-format helpers, so we can also replace depth/bpp with these. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 44 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/libwesto

[PATCH weston v10 13/61] compositor-drm: Introduce fb_last member

2017-04-04 Thread Daniel Stone
Previously, framebuffers were stored as fb_current and fb_pending. In this scheme, current was the last buffer that the kernel/hardware had acknowledged displaying: a framebuffer would be created, set as fb_pending, and Weston would request the kernel display it. When the kernel signals that the re

[PATCH weston v10 11/61] compositor-drm: Reshuffle drm_output_render

2017-04-04 Thread Daniel Stone
Call drm_output_render unconditionally, doing an early exit if we're already rendering a client buffer on the primary plane. Signed-off-by: Daniel Stone Reviewed-by: Pekka Paalanen --- libweston/compositor-drm.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libwest

[PATCH weston v10 04/61] compositor-drm: Add explicit type member to drm_fb

2017-04-04 Thread Daniel Stone
Rather than magically trying to infer what the buffer is and what we should do with it when we go to destroy it, add an explicit type instead. In doing so, the test for dumb images (destroying them, but only if they're not the 'live' ones) is removed. This was dead code, as the only path which cou

[PATCH weston v10 01/61] Clip co-ordinates in surface->buffer translation

2017-04-04 Thread Daniel Stone
Since performing the surface -> buffer translation may introduce rounding error taking our desired co-ordinates out of bounds, introduce a hard clip to the bounds specified by the client's viewport. Signed-off-by: Daniel Stone --- libweston/compositor.c | 9 + 1 file changed, 9 insertion

[PATCH weston v10 12/61] compositor-drm: Return FB directly from render

2017-04-04 Thread Daniel Stone
Instead of setting state members directly in the drm_output_render functions (to paint using Pixman or GL), just return a drm_fb, and let the core function place it in state. This brings damage handling in line with repaint state, so we do not clear damage if repaint fails. Signed-off-by: Daniel

[PATCH weston v10 10/61] compositor-drm: Rename current/next FB members

2017-04-04 Thread Daniel Stone
'next' is used as a framebuffer which has either been rendered but not had a configuration request (pageflip or CRTC set) applied to it, or when for a framebuffer that has had configuration requested but not applied (delayed pageflip where the event has not been applied). 'current' is used as the

[PATCH weston v10 14/61] compositor-drm: Turn vblank_pending from bool to refcount

2017-04-04 Thread Daniel Stone
vblank_pending is currently a bool, which is reset on every vblank requests (i.e. sprite pageflip). This can occur more than once per frame, so turn it into a callback, so we only fire frame-done when we've collected all the events. This fixes unexpected behaviour when multiple views per output ha

[PATCH v10 00/61] Atomic modesetting rides again

2017-04-04 Thread Daniel Stone
Hi, v10 has very few changes to the end result. Probably most notable is that viewporting now works correctly into planes, including scaling. Mostly though it's a bunch of refactoring to the earlier patches (pixel formats, fb refcounting) to make sure that we don't introduce leaks or asserts in int

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

2017-04-04 Thread Emmanuel Gil Peyrot
From: Emmanuel Gil Peyrot This fetches the _NET_WM_ICON property of the X11 window, and use the first image found as the frame icon. This has been tested with various X11 programs, and improves usability and user-friendliness a bit. Changes since v1: - Changed frame_button_create() to use fra

Re: [RFC wayland-protocols] inputfd - direct input access protocol

2017-04-04 Thread Bastien Nocera
On Tue, 2017-04-04 at 20:32 +0900, Carsten Haitzler wrote: > On Tue, 4 Apr 2017 10:22:24 +1000 Peter Hutterer t.net> > said: > > > On Tue, Apr 04, 2017 at 08:16:03AM +0900, Carsten Haitzler wrote: > > > On Fri, 31 Mar 2017 17:29:19 +1000 Peter Hutterer > > @who-t.net> > > > said: > > > > > > If

Re: [RFC] Interface for injection of input events

2017-04-04 Thread Simon McVittie
On Tue, 28 Mar 2017 at 15:33:41 -0700, Jordan Sissel wrote: > I am interested in the security concerns here, but are there reliable barriers > between different processes run by the same user in the same desktop session? > What is the threat model y'all are defending against? D-Bus was mentioned e

Re: [RFC wayland-protocols] inputfd - direct input access protocol

2017-04-04 Thread The Rasterman
On Tue, 04 Apr 2017 11:29:30 +0200 Bastien Nocera said: > On Tue, 2017-04-04 at 08:16 +0900, Carsten Haitzler wrote: > > On Fri, 31 Mar 2017 17:29:19 +1000 Peter Hutterer > -t.net> > > said: > > > > If you're going to do this ... why not just do it for keyboards, > > mice, touch > > panels etc.

Re: [RFC wayland-protocols] inputfd - direct input access protocol

2017-04-04 Thread The Rasterman
On Tue, 4 Apr 2017 10:22:24 +1000 Peter Hutterer said: > On Tue, Apr 04, 2017 at 08:16:03AM +0900, Carsten Haitzler wrote: > > On Fri, 31 Mar 2017 17:29:19 +1000 Peter Hutterer > > said: > > > > If you're going to do this ... why not just do it for keyboards, mice, touch > > panels etc. too? >

[PATCH weston 15/15] libweston: introduce weston_output_from_resource()

2017-04-04 Thread Pekka Paalanen
From: Pekka Paalanen This is a simple wrapper for casting the user data of a wl_resource into a struct weston_output pointer. Using the wrapper clearly marks all the places where a wl_output protocol object is used. Replace ALL wl_output related calls to wl_resource_get_user_data() with a call t

[PATCH weston 14/15] libweston: make weston_output::connection_internal a bool

2017-04-04 Thread Pekka Paalanen
From: Pekka Paalanen It really is a boolean. Signed-off-by: Pekka Paalanen --- libweston/compositor-drm.c | 2 +- libweston/compositor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 3f7e97e..3de11b8 100

[PATCH weston 05/15] libweston: two more weston_output docs

2017-04-04 Thread Pekka Paalanen
From: Pekka Paalanen Document two more functions of the weston_output API. Exported functions marked internal are meant for backends only. Exported functions not marked internal are meant for libweston users. Signed-off-by: Pekka Paalanen --- libweston/compositor.c | 40 ++

[PATCH weston 13/15] libweston: extend output->region lifetime

2017-04-04 Thread Pekka Paalanen
From: Pekka Paalanen It's a little awkward to try to keep the weston_output::region and weston_output::previous_damage allocate exactly only when the output is enabled. There was also a leak: weston_output_move() was calling weston_output_init_geometry() on an already allocated regions without fi

[PATCH weston 12/15] libweston: move globals to weston_compositor_add_output()

2017-04-04 Thread Pekka Paalanen
From: Pekka Paalanen Move the wl_output global management into weston_compositor_add_output() and weston_compositor_remove_output(). If weston_output_enable() fails, there is no need to clean up the global and the clients will not see a wl_output come and go. Signed-off-by: Pekka Paalanen ---

[PATCH weston 10/15] libweston: prevent double weston_output_enable()

2017-04-04 Thread Pekka Paalanen
From: Pekka Paalanen Enabling an already enabled output is an error, at least with the current implementation. However, disabling and output that has not been enabled is ok. Cope with the first and document the second. Signed-off-by: Pekka Paalanen --- libweston/compositor.c | 13 +++

[PATCH weston 11/15] libweston: move output id into add/remove_output()

2017-04-04 Thread Pekka Paalanen
From: Pekka Paalanen Move the output id management into weston_compositor_add_output() and weston_compositor_remove_output(). This is a more logical place, and works towards assimilating weston_output_enable_undo(). The output id is no longer available to the backend enable() vfuncs, but it was

[PATCH weston 09/15] libweston: specify weston_output::enabled

2017-04-04 Thread Pekka Paalanen
From: Pekka Paalanen It was ambiguous what this flag meant - it did not mean whether the backend is considering this output to be enabled, because weston_output_destroy() unsets it while deliberately not calling the backend disable() vfunc. Perhaps the most clear definition is with respect to th

  1   2   >