Re: [PATCH weston v2 8/8] clients: add simple-dmabuf client

2015-07-01 Thread Pekka Paalanen
On Wed, 1 Jul 2015 20:39:11 +0200 Carlos Olmedo Escobar wrote: > Hi, > > Sorry for not inlining my comment on the original mail. I don't have it. > > The line with "if (!window->buffers[1].buffer)" at the email "[PATCH > weston v2 8/8] clients: add simple-dmabuf client" by Pekka maybe is > wron

Re: [PATCH libinput 5/9] udev: add Elantech touchpad firmware detection

2015-07-01 Thread Peter Hutterer
On Wed, Jul 01, 2015 at 04:08:49PM +1000, Peter Hutterer wrote: > Only firmware v4 (and probably whatever comes in the future) have resolution > set, for the first couple of touchpads we need size hints. Add a callout that > looks at the properties on the touchpad and decides the firmware version.

Re: [PATCH] xwayland: Always free reply from xcb_get_property_reply()

2015-07-01 Thread Bryce Harrington
On Wed, Jul 01, 2015 at 11:19:09AM +0200, Marek Chalupa wrote: > On Wed, Jul 1, 2015 at 6:35 AM, Bryce Harrington > wrote: > > > Signed-off-by: Bryce Harrington > > --- > > xwayland/selection.c | 10 +++--- > > 1 file changed, 7 insertions(+), 3 deletions(-) > > > > diff --git a/xwayland/se

Re: [RFC wayland 1/2] client: Introduce 'proxy wrapper' concept

2015-07-01 Thread Bill Spitzak
> > > > > > > In short, instead of >> > > > > > >> > > > > > bar = wl_foo_get_bar(foo); >> > > > > > wl_proxy_set_queue((struct wl_proxy *) bar, queue); >> > > > > > wl_bar_add_listener(bar, ...); >> > > > > > >> > > > > > with this RFC a client does >> > > > > > >> > > > >

Re: [RFC libinput 0/9] touchpad: force resolutions for all touchpads

2015-07-01 Thread Peter Hutterer
On Wed, Jul 01, 2015 at 01:22:45PM -0700, Bill Spitzak wrote: > On Tue, Jun 30, 2015 at 11:08 PM, Peter Hutterer > wrote: > > > > > Not all touchpads provide x/y axis resolution. some of them (apple > > touchpads) we fix up in the systemd hwdb but others are harder to detect or > > fix in a gener

Re: [RFC libinput 0/9] touchpad: force resolutions for all touchpads

2015-07-01 Thread Bill Spitzak
On Tue, Jun 30, 2015 at 11:08 PM, Peter Hutterer wrote: > > Not all touchpads provide x/y axis resolution. some of them (apple > touchpads) we fix up in the systemd hwdb but others are harder to detect or > fix in a generic manner. so we set a fake resolution (1 unit/mm), but > that's > just to a

Re: [PATCH weston v2 8/8] clients: add simple-dmabuf client

2015-07-01 Thread Carlos Olmedo Escobar
Hi, Sorry for not inlining my comment on the original mail. I don't have it. The line with "if (!window->buffers[1].buffer)" at the email "[PATCH weston v2 8/8] clients: add simple-dmabuf client" by Pekka maybe is wrong, I'm not 100% sure but perhaps it is meant to be if (!window->buffers[i].buff

[PATCH weston v2 2/8] dmabuf: implement linux_dmabuf extension

2015-07-01 Thread Pekka Paalanen
From: Pekka Paalanen v2 changes: - implement the revised protocol - add basic sanity checks when creating buffer and check for support - add way to attach user data to the dmabuf for renderer use - bump max number of planes to 4 to follow DRM AddFb2 ioctl - improve errors handling - use separate

[PATCH weston v2 5/8] compositor-x11: init linux_dmabuf support

2015-07-01 Thread Pekka Paalanen
From: Pekka Paalanen v2 changes: - only initialize linux_dmabuf if renderer supports it Signed-off-by: Pekka Paalanen Reviewed-by: Daniel Stone --- src/compositor-x11.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 80ed8c0..286fdf

[PATCH weston v2 3/8] gl-renderer: introduce struct egl_image

2015-07-01 Thread Pekka Paalanen
From: Louis-Francis Ratté-Boulianne This is a reference-counted holder of an EGLImage. For now, direct EGLImage usage is simply converted to use egl_image. Use of reference counting will come in a later patch. v2: - this is a new patch, split from gl-renderer dmabuf import support Signed-off-by

[PATCH weston v2 4/8] gl-renderer: add dmabuf import

2015-07-01 Thread Pekka Paalanen
From: Pekka Paalanen Import dmabuf as an EGLImage, and hold on to the EGLImage until we are signalled a content change. On content change, destroy the EGLImage and re-import to trigger GPU cache flushes. We hold on to the EGLImage as long as possible just in case the client does other imports th

[PATCH weston v2 6/8] compositor-drm: init linux_dmabuf support

2015-07-01 Thread Pekka Paalanen
From: Pekka Paalanen v2 changes: - only initialize linux_dmabuf if renderer supports it Signed-off-by: Pekka Paalanen Reviewed-by: Daniel Stone --- src/compositor-drm.c | 16 1 file changed, 16 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index f24f

[PATCH weston v2 7/8] compositor-drm: dmabuf GBM import

2015-07-01 Thread Pekka Paalanen
From: Pekka Paalanen v2: - add TODO note about multi-planar import and how we should do it Signed-off-by: Pekka Paalanen Reviewed-by: Daniel Stone --- src/compositor-drm.c | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/compositor-drm

[PATCH weston v2 8/8] clients: add simple-dmabuf client

2015-07-01 Thread Pekka Paalanen
From: George Kiagiadakis v2: - adapted to protocol changes - added TODO comments - minor clean-up - change y-invert from per-plane boolean to per-buffer flag Signed-off-by: George Kiagiadakis Signed-off-by: Pekka Paalanen Signed-off-by: Louis-Francis Ratté-Boulianne Acked-by: Daniel Stone --

[PATCH weston v2 1/8] protocol: add linux_dmabuf extension (v2)

2015-07-01 Thread Pekka Paalanen
From: Pekka Paalanen An experimental (hence the 'z' prefix) linux_dmabuf Wayland protocol extension for creating dmabuf-based wl_buffers in a generic manner. This does not include proper dmabuf metadata negotiation because there is no way to communicate all dmabuf constraints from the compositor

[PATCH weston v2 0/8] Generic Wayland dmabuf protocol

2015-07-01 Thread Pekka Paalanen
From: Pekka Paalanen Hi all, here is the v2 iteration of the Wayland protocol extension for generic sharing of dmabufs between clients and the compositor. The RFCv1 can be found at http://lists.freedesktop.org/archives/wayland-devel/2014-December/019006.html The related tracking bug is https:/

Re: [PATCH 07/10] compositor-drm: Allow instant start of repaint loop. (v2)

2015-07-01 Thread Daniel Stone
Hi, On 21 June 2015 at 20:25, Mario Kleiner wrote: > drm_output_start_repaint_loop() incurred a delay of > one refresh cycle by using a no-op page-flip to get > an accurate vblank timestamp as reference. This causes > unwanted lag whenever Weston exited its repaint loop, e.g., > whenever an appli

Re: [PATCH wayland 3/3] shm: wl_shm_buffer_get_data() requires a valid pool.

2015-07-01 Thread Marek Chalupa
On Wed, Jul 1, 2015 at 11:25 AM, Marek Chalupa wrote: > > > On Fri, Jun 26, 2015 at 6:35 PM, Derek Foreman > wrote: > >> There's no situation where a shm buffer without a pool makes sense, >> so we enforce the pool's existence a little more rigidly. >> >> Signed-off-by: Derek Foreman >> --- >>

Re: [PATCH weston] logind-util: Use %u for unsigned int in snprintf

2015-07-01 Thread Marek Chalupa
sizeof operator returns size_t, which need not to be unsigned int, but can be long (long) unsigned int. So here the correct fix should be either to use %zu (since C99) or cast it to unsigned long and use %lu Regards, Marek On Sat, Jun 20, 2015 at 1:28 AM, Bryce Harrington wrote: > Addresses thi

Re: [PATCH weston] clients: Simplify memory allocation with xzalloc()

2015-07-01 Thread Marek Chalupa
Reviewed-by: Marek Chalupa On Sat, Jun 20, 2015 at 1:12 AM, Bryce Harrington wrote: > It is redundant to check x*alloc's return value for null pointers, since > they are guaranteed to either return non-NULL or terminate the program. > > In cases where we memset the malloc'd memory to 0, we can

Re: [PATCH] scanner: Close input resource when done to prevent leak

2015-07-01 Thread Marek Chalupa
To be up to good programming practices we should close the input even on the error paths on lines 1381, 1392 and 1400 (it can be stdin, but on exit it doesn't matter). Scanner is sooo leaky, that pedantically closing read-only input file on every error path may seem a little bit useless, but it is

Re: [PATCH] weston-launch: Drop redundant exit()

2015-07-01 Thread Marek Chalupa
Reviewed-by: Marek Chalupa On Sat, Jun 20, 2015 at 12:47 AM, Bryce Harrington wrote: > error(1, ...) already will exit, per man page: "If status has a nonzero > value, then error() calls exit(3) to terminate the program using the > given value as the exit status." So exit(EXIT_FAILURE) is nev

Re: [PATCH wayland 3/3] shm: wl_shm_buffer_get_data() requires a valid pool.

2015-07-01 Thread Marek Chalupa
On Fri, Jun 26, 2015 at 6:35 PM, Derek Foreman wrote: > There's no situation where a shm buffer without a pool makes sense, > so we enforce the pool's existence a little more rigidly. > > Signed-off-by: Derek Foreman > --- > src/wayland-shm.c | 10 ++ > 1 file changed, 6 insertions(+),

Re: [PATCH] xwayland: Always free reply from xcb_get_property_reply()

2015-07-01 Thread Marek Chalupa
On Wed, Jul 1, 2015 at 6:35 AM, Bryce Harrington wrote: > Signed-off-by: Bryce Harrington > --- > xwayland/selection.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/xwayland/selection.c b/xwayland/selection.c > index 572a0b5..451b915 100644 > --- a/xwayland

Re: [PATCH v6 weston 19/19] input: Don't test keyboard/pointer/touch pointers

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:38PM -0500, Derek Foreman wrote: > Keyboards and pointers aren't freed when devices are removed, so we should > really be testing keyboard_device_count and pointer_device_count in most > cases, not the actual pointers. Otherwise we end up with different > behaviour aft

Re: [PATCH weston 18/19] bindings: Make run binding functions take apropriate device instead of a seat

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:37PM -0500, Derek Foreman wrote: > Going from seat to input device requires that we test the device > before relying on the pointer. In all of these binding functions > we can trust exactly one input device type directly. If we pass > that in instead of a seat it's m

Re: [PATCH weston 17/19] bindings: make install_binding_grab take a keyboard instead of a seat

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:36PM -0500, Derek Foreman wrote: > It doesn't need the seat pointer, and the caller should already have > tested that the keyboard pointer is valid. > > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- > src/bindings.c | 17 ++--- > 1 file

Re: [PATCH weston 16/19] desktop-shell: Use the grabbed pointer in popup_grab_button

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:35PM -0500, Derek Foreman wrote: > This should be identical to the pointer in shset->seat. > > A later patch prevents direct access to seat->pointer, using the > known valid pointer in the grab will be nicer than using the > getter functions that patch introduces. >

Re: [PATCH weston 15/19] desktop-shell: Make surface_resize take a pointer instead of a seat

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:34PM -0500, Derek Foreman wrote: > It doesn't actually need the seat and we have to validate that the seat > has a pointer before making the call, so it's safer just to pass > the validated pointer. > > Signed-off-by: Derek Foreman > --- > desktop-shell/shell.c | 18

Re: [PATCH weston 14/19] desktop-shell: Make surface_rotate take a pointer instead of a seat

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:33PM -0500, Derek Foreman wrote: > It doesn't actually need the seat and we have to validate that the seat > has a pointer before making the call, so it's safer just to pass > the validated pointer. > > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- >

Re: [PATCH weston 13/19] desktop-shell: Make surface_move take a pointer instead of a seat

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:32PM -0500, Derek Foreman wrote: > It doesn't actually need the seat and we have to validate that the seat > has a pointer before making the call, so it's safer just to pass > the validated pointer. > > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- >

Re: [PATCH weston 12/19] desktop-shell: Make surface_touch_move take a touch instead of a seat

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:31PM -0500, Derek Foreman wrote: > It never actually needs the seat, and we always verify the touch pointer > before calling it, so let's just pass a touch pointer instead of having > an assumption that the seat's touch pointer has been verified. > > Signed-off-by: De

Re: [PATCH weston 11/19] input: Pass the appropriate pointer type to bindings instead of a seat

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:30PM -0500, Derek Foreman wrote: > Normally we need to check if a seat's [device_type]_count is > 0 before > we can use the associated pointer. However, in a binding you're > guaranteed that the seat has a device of that type. If we pass in > that type instead of the

Re: [PATCH weston 10/19] screenshooter: clean up recorder_binding a little

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:29PM -0500, Derek Foreman wrote: > We already have a pointer to the compositor so change seat->compositor to ec > > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- > src/screenshooter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH weston 09/19] input: clean up seat_get_keyboard a little

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:28PM -0500, Derek Foreman wrote: > We already have a pointer to the keyboard, so we can change all > seat->keyboard to keyboard > > Signed-off-by: Derek Foreman > --- > src/input.c | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > >

Re: [PATCH weston 08/19] input: clean up update_keymap a little

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:27PM -0500, Derek Foreman wrote: > We already have a pointer to the keyboard, so we can change all > seat->keyboard to keyboard. > > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- > src/input.c | 12 ++-- > 1 file changed, 6 insertions(+), 6

Re: [PATCH weston 07/19] input: clean up notify_modifiers a little

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:26PM -0500, Derek Foreman wrote: > We already have a pointer to the keyboard, so we can change all > seat->keyboard to keyboard. > > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- > src/input.c | 18 +- > 1 file changed, 9 insertions(

Re: [RFC wayland 1/2] client: Introduce 'proxy wrapper' concept

2015-07-01 Thread Marek Chalupa
On Wed, Jul 1, 2015 at 10:10 AM, Jonas Ådahl wrote: > On Wed, Jul 01, 2015 at 09:51:41AM +0200, Marek Chalupa wrote: > > On Wed, Jul 1, 2015 at 9:16 AM, Jonas Ådahl wrote: > > > > > On Wed, Jul 01, 2015 at 08:57:05AM +0200, Marek Chalupa wrote: > > > > On Mon, Jun 29, 2015 at 3:37 PM, Giulio Cam

Re: [PATCH weston 06/19] compositor-drm: Simplify logic in setup_output_seat_constraint

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:25PM -0500, Derek Foreman wrote: > Use early return for a slight simplification. > > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- > src/compositor-drm.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/composito

Re: [PATCH weston 05/19] bindings: Stop exporting internal functions

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:24PM -0500, Derek Foreman wrote: > These functions should never be called outside of the core. > > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- > src/bindings.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git

Re: [PATCH weston 04/19] input: minor clean up in weston_seat_repick()

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:23PM -0500, Derek Foreman wrote: > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- > src/input.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/input.c b/src/input.c > index 6604c5d..c56de70 100644 > --- a/src/input.c

Re: [PATCH weston 03/19] desktop-shell: make client_initiated a bool

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:22PM -0500, Derek Foreman wrote: > Make it a bool in both surface_move() and struct weston_move_grab > > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- > desktop-shell/shell.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > >

Re: [PATCH weston 02/19] exposay: Test keyboard presence before using keyboard pointer

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:21PM -0500, Derek Foreman wrote: > We shouldn't actually use the keyboard pointer unless we check that > a keyboard is present. > > Signed-off-by: Derek Foreman > --- > desktop-shell/exposay.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --

Re: [PATCH weston 01/19] text-backend: Replace focus_listener_initialized with a bool

2015-07-01 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:53:20PM -0500, Derek Foreman wrote: > Signed-off-by: Derek Foreman Reviewed-by: Jonas Ådahl > --- > src/text-backend.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/text-backend.c b/src/text-backend.c > index daae03c..de170e8 100

[PATCH wayland] shm: add getters for the fd and offset

2015-07-01 Thread Giulio Camuffo
This allows to share the buffer data by mmapping the fd again. --- src/wayland-server-core.h | 6 ++ src/wayland-shm.c | 16 +++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/wayland-server-core.h b/src/wayland-server-core.h index 7d03789..938cdf7 100

Re: [RFC wayland 1/2] client: Introduce 'proxy wrapper' concept

2015-07-01 Thread Jonas Ådahl
On Wed, Jul 01, 2015 at 09:51:41AM +0200, Marek Chalupa wrote: > On Wed, Jul 1, 2015 at 9:16 AM, Jonas Ådahl wrote: > > > On Wed, Jul 01, 2015 at 08:57:05AM +0200, Marek Chalupa wrote: > > > On Mon, Jun 29, 2015 at 3:37 PM, Giulio Camuffo > > > > > wrote: > > > > > > > 2015-06-29 14:30 GMT+03:00

Re: [RFC wayland 1/2] client: Introduce 'proxy wrapper' concept

2015-07-01 Thread Marek Chalupa
On Wed, Jul 1, 2015 at 9:16 AM, Jonas Ådahl wrote: > On Wed, Jul 01, 2015 at 08:57:05AM +0200, Marek Chalupa wrote: > > On Mon, Jun 29, 2015 at 3:37 PM, Giulio Camuffo > > > wrote: > > > > > 2015-06-29 14:30 GMT+03:00 Jonas Ådahl : > > > > Arnaud Vrac discovered an issue in the libwayland client

Re: [RFC wayland 1/2] client: Introduce 'proxy wrapper' concept

2015-07-01 Thread Jonas Ådahl
On Wed, Jul 01, 2015 at 08:57:05AM +0200, Marek Chalupa wrote: > On Mon, Jun 29, 2015 at 3:37 PM, Giulio Camuffo > wrote: > > > 2015-06-29 14:30 GMT+03:00 Jonas Ådahl : > > > Arnaud Vrac discovered an issue in the libwayland client API causing > > > race conditions when doing round trips using th