Re: [PATCH] [wayland] configure: better check for the C++ compiler

2017-03-07 Thread Peter Hutterer
On Sun, Mar 05, 2017 at 03:17:36PM +0100, Yann E. MORIN wrote:
> When a C++ compiler is not found, then AC_PROG_CXX will set CXX to
> 'false'.

urgh... that is a rather unexpected behaviour.

> However, we test that we can find $CXX, and idneed false exists in

typo, "indeed", should be fixed on merging.

Reviewed-by: Peter Hutterer 

Cheers,
   Peter

> the PATH, for virtually all systems we have a chance to be compiled
> on. So we conclude that we do have a C++ compiler, when this is
> clearly wrong.
> 
> Improve our hack by trying to run the C++ compiler with a benign call,
> that should succeed if the CXX is really a C++ compiler: tell it to dump
> its pre-defined macros.
> 
> Signed-off-by: "Yann E. MORIN" 
> ---
> Note: this is not a replacement for the patch I sent earlier [0].
> It is complementary.
> ---
>  configure.ac | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 96a5575..9939bf4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -33,11 +33,11 @@ AM_PROG_AS
>  # check if we have C++ compiler. This is hacky workaround,
>  # for a reason why it is this way see
>  # http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg1.html
> -have_cpp_compiler=yes
> -
> -if ! which "$CXX" &>/dev/null; then
> - have_cpp_compiler=no
> -fi
> +AS_IF([! which "$CXX" &>/dev/null];
> + [have_cpp_compiler=no],
> + [AS_IF([! $CXX -dM -E - < /dev/null >/dev/null],
> + [have_cpp_compiler=no],
> + [have_cpp_compiler=yes])])
>  
>  AM_CONDITIONAL(ENABLE_CPP_TEST, test "x$have_cpp_compiler" = "xyes")
>  
> -- 
> 2.7.4
> 
> ___
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


waltham ivi-application build failed

2017-03-07 Thread Mizuno, Wataru (ADITJ/SWG)
Hello,

I found ivi-applicaion.xml under data directory and tried to build it.
I had edited data/command.xml and build it then it succeeded so I did same way 
to do ivi-application but it failed.

I guess additional procedures are needed.
Could you please tell me how to build ivi-application.xml?

Best regards,
--
水野 航 / Wataru Mizuno
Advanced Driver Information Technology
Tel: +81-(0)566-56-0946
Extension: (551)43639
--
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH] [wayland] configure: better check for the C++ compiler

2017-03-07 Thread Yann E. MORIN
Bill, All,

On 2017-03-07 10:12 -0800, Bill Spitzak spake thusly:
> Why not just check if $CXX is "false".
> 
> I really doubt anybody wants to run a C++ compiler named "false".

At least, that way it is robust to any future change in autoconf, which
could set it to "no" or "none" or whatever; it would work on virtually
any version and any setting of autoconf (unless it returns an actual
command that still works with those specific flags, but then we'd be
foobared anyway).

I'll wait a bit for others to comment before I switch to comparing
against "false".

Thanks for the feedback! :-)

Regards,
Yann E. MORIN.

> On Sun, Mar 5, 2017 at 6:17 AM, Yann E. MORIN  wrote:
> > When a C++ compiler is not found, then AC_PROG_CXX will set CXX to
> > 'false'.
> >
> > However, we test that we can find $CXX, and idneed false exists in
> > the PATH, for virtually all systems we have a chance to be compiled
> > on. So we conclude that we do have a C++ compiler, when this is
> > clearly wrong.
> >
> > Improve our hack by trying to run the C++ compiler with a benign call,
> > that should succeed if the CXX is really a C++ compiler: tell it to dump
> > its pre-defined macros.
> >
> > Signed-off-by: "Yann E. MORIN" 
> > ---
> > Note: this is not a replacement for the patch I sent earlier [0].
> > It is complementary.
> > ---
> >  configure.ac | 10 +-
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 96a5575..9939bf4 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -33,11 +33,11 @@ AM_PROG_AS
> >  # check if we have C++ compiler. This is hacky workaround,
> >  # for a reason why it is this way see
> >  # http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg1.html
> > -have_cpp_compiler=yes
> > -
> > -if ! which "$CXX" &>/dev/null; then
> > -   have_cpp_compiler=no
> > -fi
> > +AS_IF([! which "$CXX" &>/dev/null];
> > +   [have_cpp_compiler=no],
> > +   [AS_IF([! $CXX -dM -E - < /dev/null >/dev/null],
> > +   [have_cpp_compiler=no],
> > +   [have_cpp_compiler=yes])])
> >
> >  AM_CONDITIONAL(ENABLE_CPP_TEST, test "x$have_cpp_compiler" = "xyes")
> >
> > --
> > 2.7.4
> >
> > ___
> > wayland-devel mailing list
> > wayland-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN |  ___   |
| +33 223 225 172 `.---:  X  AGAINST  |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL|   v   conspiracy.  |
'--^---^--^'
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH wayland v3] doc: start documenting Xwayland

2017-03-07 Thread Yong Bakos
Hi Pekka,
One misspelling and some minor writing nits noted inline below.


> On Jan 30, 2017, at 6:55 AM, Pekka Paalanen  wrote:
> 
> From: Pekka Paalanen 
> 
> This is a rough intro to what Xwayland is and does, with just one
> implementation detail so far (Window identification).
> 
> I paid no attention to formatting details, those can be polished in
> follow-ups. I just want the prose out.
> 
> I also just quickly whacked up the diagram, would be happy to see
> someone replace it with a nicer one. I just didn't have time to learn
> dot for now.
> 
> v2:
> - typo fix
> - rephrase "talking to hardware" as "driving the displays"
> - mention circular dependency in intro
> - add section to explain rootless and rootful modes
> - remove paragraph about Xwayland protocol usage
> - move TBD part to the end under a new section header
> 
> v3:
> - use "advantage" and "disadvantage" instead of "pro" and "con"
> - slight rewording on rootful mode and rootless mode paragraphs
> - removed the paragraph about the lack of shell and special Wayland
>  protocol extensions
> - removed the commented out list of ideas to write
> 
> Cc: Olivier Fourdan 
> Cc: Jonas Ådahl 
> Cc: Daniel Stone 
> Signed-off-by: Pekka Paalanen 
> ---
> doc/publican/Makefile.am   |   5 +-
> doc/publican/sources/Wayland.xml   |   1 +
> doc/publican/sources/Xwayland.xml  | 170 +
> .../sources/images/xwayland-architecture.png   | Bin 0 -> 7611 bytes
> 4 files changed, 175 insertions(+), 1 deletion(-)
> create mode 100644 doc/publican/sources/Xwayland.xml
> create mode 100644 doc/publican/sources/images/xwayland-architecture.png
> 
> diff --git a/doc/publican/Makefile.am b/doc/publican/Makefile.am
> index 57728a0..e861fe6 100644
> --- a/doc/publican/Makefile.am
> +++ b/doc/publican/Makefile.am
> @@ -24,9 +24,11 @@ publican_sources = \
>   $(srcdir)/sources/Preface.xml \
>   $(srcdir)/sources/Revision_History.xml \
>   $(srcdir)/sources/Protocol.xml \
> + $(srcdir)/sources/Xwayland.xml \
>   $(srcdir)/sources/Compositors.xml \
>   $(srcdir)/sources/images/icon.svg  \
>   $(srcdir)/sources/images/wayland.png \
> + $(srcdir)/sources/images/xwayland-architecture.png \
>   $(srcdir)/sources/Client.xml \
>   $(srcdir)/sources/Server.xml
> 
> @@ -43,7 +45,8 @@ css_sources = \
> 
> img_sources = \
>   $(srcdir)/sources/images/icon.svg \
> - $(srcdir)/sources/images/wayland.png
> + $(srcdir)/sources/images/wayland.png \
> + $(srcdir)/sources/images/xwayland-architecture.png
> 
> doxygen_img_sources := \
>   $(doxydir)/xml/wayland-architecture.png \
> diff --git a/doc/publican/sources/Wayland.xml 
> b/doc/publican/sources/Wayland.xml
> index 2f47f13..0457c15 100644
> --- a/doc/publican/sources/Wayland.xml
> +++ b/doc/publican/sources/Wayland.xml
> @@ -11,6 +11,7 @@
>xmlns:xi="http://www.w3.org/2001/XInclude; />
>xmlns:xi="http://www.w3.org/2001/XInclude; />
>   http://www.w3.org/2001/XInclude; 
> />
> +  http://www.w3.org/2001/XInclude; 
> />
>xmlns:xi="http://www.w3.org/2001/XInclude; />
>   http://www.w3.org/2001/XInclude"/>
>   http://www.w3.org/2001/XInclude"/>
> diff --git a/doc/publican/sources/Xwayland.xml 
> b/doc/publican/sources/Xwayland.xml
> new file mode 100644
> index 000..06f6249
> --- /dev/null
> +++ b/doc/publican/sources/Xwayland.xml
> @@ -0,0 +1,170 @@
> +
> + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd; [
> +
> +%BOOK_ENTITIES;
> +]>
> +
> +  X11 Application Support
> +  
> +Introduction
> +
> +  Being able to run existing X11 applications is crucial for the adoption
> +  of Wayland, especially on desktops, as there will always be X11
> +  applications that have not been or cannot be converted into Wayland
> +  applications, and throwing them all away would be prohibitive.
> +  Therefore a Wayland compositor often needs to support running X11
> +  applications.
> +
> +
> +  X11 and Wayland are different enough that there is no "simple" way to
> +  translate between them. Most of X11 is uninteresting to a Wayland
> +  compositor. That combined with the gigantic implementation effort 
> needed

That, combined... to support X11, makes...


> +  to support X11 makes it intractable to just write X11 support directly 
> in
> +  a Wayland compositor. The implementation would be nothing short from a

short of a


> +  real X11 server.
> +
> +
> +  Therefore Wayland compositors should use Xwayland, the X11 server that

Therefore, Wayland...


> +  lives in the Xorg server source code repository and shares most of the
> +  implementation with the Xorg server. Xwayland is a complete X11 server,
> +  just like Xorg is, but instead of driving the displays 

Re: [PATCH weston v4] compositor-drm: pageflip timeout implementation

2017-03-07 Thread Pekka Paalanen
On Tue,  7 Mar 2017 13:27:54 +
Emmanuel Gil Peyrot  wrote:

> Weston will not repaint until previous update has been acked by a
> pageflip event coming from the drm driver. However, some buggy drivers
> won’t return those events or will stop sending them at some point and
> Weston output repaints will completely freeze. To ease developers’ task
> in testing their drivers, this patch makes compositor-drm use a timer
> to detect cases where those pageflip events stop coming.
> 
> This timeout implementation is software only and includes basic
> features usually found in a watchdog. We simply exit Weston gracefully
> with a log message and an exit code when the timout is reached.
> 
> The timeout value can be set via weston.ini by adding a
> pageflip-timeout= entry under a new [compositor-drm]

Hi,

I fixed the above to say "[core]" instead. ;-)

> section. Setting it to 0 disables the timeout feature.
> 
> v2:
> - Made sure we would get both the pageflip and the vblank events before
>   stopping the timer.
> - Reordered the error and success cases in
>   drm_output_pageflip_timer_create() to be more in line with the rest
>   of the code.
> 
> v3:
> - Reordered (de)arming of the timer with the code around it to avoid it
>   being rearmed before the current dearming.
> - Return the proper value for the dispatcher in the pageflip_timeout
>   callback.
> - Also display the output name in case the timer fires.
> 
> v4:
> - Reordered a forgotten timer rearming after its drmModePageFlip().
> 
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83884
> Signed-off-by: Frederic Plourde 
> Signed-off-by: Emmanuel Gil Peyrot 
> Reviewed-by: Daniel Stone 
> ---
>  compositor/main.c  |  2 ++
>  libweston/compositor-drm.c | 65 
> ++
>  libweston/compositor-drm.h |  7 +
>  man/weston.ini.man |  5 
>  4 files changed, 79 insertions(+)

Pushed:
   8a888a5..11ae2a3  master -> master


Thanks,
pq


pgpFtQuehmuzS.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH libinput] touchpad: add elantech-specific pressure values

2017-03-07 Thread Hans de Goede

Hi,

On 07-03-17 04:22, Peter Hutterer wrote:

https://bugs.freedesktop.org/show_bug.cgi?id=99975

Signed-off-by: Peter Hutterer 


Patch looks good to me:

Reviewed-by: Hans de Goede 

Regards,

Hans



---
 src/evdev-mt-touchpad.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index c8e434e..e2866df 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -2382,9 +2382,14 @@ tp_init_pressure(struct tp_dispatch *tp,

range = abs->maximum - abs->minimum;

-   /* Approximately the synaptics defaults */
-   tp->pressure.high = abs->minimum + 0.12 * range;
-   tp->pressure.low = abs->minimum + 0.10 * range;
+   if (device->model_flags & EVDEV_MODEL_ELANTECH_TOUCHPAD) {
+   tp->pressure.high = 24;
+   tp->pressure.low = 10;
+   } else {
+   /* Approximately the synaptics defaults */
+   tp->pressure.high = abs->minimum + 0.12 * range;
+   tp->pressure.low = abs->minimum + 0.10 * range;
+   }

evdev_log_debug(device,
"using pressure-based touch detection\n",


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH weston v4] compositor-drm: pageflip timeout implementation

2017-03-07 Thread Emmanuel Gil Peyrot
Weston will not repaint until previous update has been acked by a
pageflip event coming from the drm driver. However, some buggy drivers
won’t return those events or will stop sending them at some point and
Weston output repaints will completely freeze. To ease developers’ task
in testing their drivers, this patch makes compositor-drm use a timer
to detect cases where those pageflip events stop coming.

This timeout implementation is software only and includes basic
features usually found in a watchdog. We simply exit Weston gracefully
with a log message and an exit code when the timout is reached.

The timeout value can be set via weston.ini by adding a
pageflip-timeout= entry under a new [compositor-drm]
section. Setting it to 0 disables the timeout feature.

v2:
- Made sure we would get both the pageflip and the vblank events before
  stopping the timer.
- Reordered the error and success cases in
  drm_output_pageflip_timer_create() to be more in line with the rest
  of the code.

v3:
- Reordered (de)arming of the timer with the code around it to avoid it
  being rearmed before the current dearming.
- Return the proper value for the dispatcher in the pageflip_timeout
  callback.
- Also display the output name in case the timer fires.

v4:
- Reordered a forgotten timer rearming after its drmModePageFlip().

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83884
Signed-off-by: Frederic Plourde 
Signed-off-by: Emmanuel Gil Peyrot 
Reviewed-by: Daniel Stone 
---
 compositor/main.c  |  2 ++
 libweston/compositor-drm.c | 65 ++
 libweston/compositor-drm.h |  7 +
 man/weston.ini.man |  5 
 4 files changed, 79 insertions(+)

diff --git a/compositor/main.c b/compositor/main.c
index 72c3cd10..e870dd4a 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -1235,6 +1235,8 @@ load_drm_backend(struct weston_compositor *c,
weston_config_section_get_string(section,
 "gbm-format", _format,
 NULL);
+   weston_config_section_get_uint(section, "pageflip-timeout",
+  _timeout, 0);
 
config.base.struct_version = WESTON_DRM_BACKEND_CONFIG_VERSION;
config.base.struct_size = sizeof(struct weston_drm_backend_config);
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 7f78699c..00623076 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -119,6 +119,7 @@ struct drm_backend {
int32_t cursor_height;
 
uint32_t connector;
+   uint32_t pageflip_timeout;
 };
 
 struct drm_mode {
@@ -182,6 +183,8 @@ struct drm_output {
 
struct vaapi_recorder *recorder;
struct wl_listener recorder_frame_listener;
+
+   struct wl_event_source *pageflip_timer;
 };
 
 /*
@@ -225,6 +228,45 @@ to_drm_backend(struct weston_compositor *base)
return container_of(base->backend, struct drm_backend, base);
 }
 
+static int
+pageflip_timeout(void *data) {
+   /*
+* Our timer just went off, that means we're not receiving drm
+* page flip events anymore for that output. Let's gracefully exit
+* weston with a return value so devs can debug what's going on.
+*/
+   struct drm_output *output = data;
+   struct weston_compositor *compositor = output->base.compositor;
+
+   weston_log("Pageflip timeout reached on output %s, your "
+  "driver is probably buggy!  Exiting.\n",
+  output->base.name);
+   weston_compositor_exit_with_code(compositor, EXIT_FAILURE);
+
+   return 0;
+}
+
+/* Creates the pageflip timer. Note that it isn't armed by default */
+static int
+drm_output_pageflip_timer_create(struct drm_output *output)
+{
+   struct wl_event_loop *loop = NULL;
+   struct weston_compositor *ec = output->base.compositor;
+
+   loop = wl_display_get_event_loop(ec->wl_display);
+   assert(loop);
+   output->pageflip_timer = wl_event_loop_add_timer(loop,
+pageflip_timeout,
+output);
+
+   if (output->pageflip_timer == NULL) {
+   weston_log("creating drm pageflip timer failed: %m\n");
+   return -1;
+   }
+
+   return 0;
+}
+
 static void
 drm_output_set_cursor(struct drm_output *output);
 
@@ -758,6 +800,10 @@ drm_output_repaint(struct weston_output *output_base,
 
output->page_flip_pending = 1;
 
+   if (output->pageflip_timer)
+   wl_event_source_timer_update(output->pageflip_timer,
+backend->pageflip_timeout);
+
drm_output_set_cursor(output);
 
/*
@@ -878,6 +924,10 @@ drm_output_start_repaint_loop(struct weston_output 
*output_base)
goto finish_frame;

Re: [PATCH weston v3] compositor-drm: pageflip timeout implementation

2017-03-07 Thread Pekka Paalanen
On Mon,  6 Mar 2017 20:15:05 +
Emmanuel Gil Peyrot  wrote:

> Weston will not repaint until previous update has been acked by a
> pageflip event coming from the drm driver. However, some buggy drivers
> won’t return those events or will stop sending them at some point and
> Weston output repaints will completely freeze. To ease developers’ task
> in testing their drivers, this patch makes compositor-drm use a timer
> to detect cases where those pageflip events stop coming.
> 
> This timeout implementation is software only and includes basic
> features usually found in a watchdog. We simply exit Weston gracefully
> with a log message and an exit code when the timout is reached.
> 
> The timeout value can be set via weston.ini by adding a
> pageflip-timeout= entry under a new [compositor-drm]
> section. Setting it to 0 disables the timeout feature.
> 
> v2:
> - Made sure we would get both the pageflip and the vblank events before
>   stopping the timer.
> - Reordered the error and success cases in
>   drm_output_pageflip_timer_create() to be more in line with the rest
>   of the code.
> 
> v3:
> - Reordered (de)arming of the timer with the code around it to avoid it
>   being rearmed before the current dearming.
> - Return the proper value for the dispatcher in the pageflip_timeout
>   callback.
> - Also display the output name in case the timer fires.
> 
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83884
> Signed-off-by: Frederic Plourde 
> Signed-off-by: Emmanuel Gil Peyrot 
> Reviewed-by: Daniel Stone 
> ---
>  compositor/main.c  |  2 ++
>  libweston/compositor-drm.c | 65 
> ++
>  libweston/compositor-drm.h |  7 +
>  man/weston.ini.man |  5 
>  4 files changed, 79 insertions(+)

> @@ -749,6 +791,10 @@ drm_output_repaint(struct weston_output *output_base,
>   output_base->set_dpms(output_base, WESTON_DPMS_ON);
>   }
>  
> + if (output->pageflip_timer)
> + wl_event_source_timer_update(output->pageflip_timer,
> +  backend->pageflip_timeout);
> +
>   if (drmModePageFlip(backend->drm.fd, output->crtc_id,

Hi,

looks like you forgot to flip the order here. Should try to pageflip
first, arm the timer then.

Otherwise it all looks good, and I'll probably merge the next revision
immediately.


Thanks,
pq

>   output->next->fb_id,
>   DRM_MODE_PAGE_FLIP_EVENT, output) < 0) {


pgpNwKJnrBM8o.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel