wayland-devel Digest, Vol 83, Issue 72

saikishore saik710 at gmail.com
Wed Jul 26 14:44:59 UTC 2017


On 26-Jul-2017 7:32 PM, <wayland-devel-request at lists.freedesktop.org> wrote:

Send wayland-devel mailing list submissions to
        wayland-devel at lists.freedesktop.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.freedesktop.org/mailman/listinfo/wayland-devel
or, via email, send a message with subject or body 'help' to
        wayland-devel-request at lists.freedesktop.org

You can reach the person managing the list at
        wayland-devel-owner at lists.freedesktop.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of wayland-devel digest..."


Today's Topics:

   1. Re: Weston with fbdev-backend shows blank screen on display
      (Pekka Paalanen)
   2. Re: [PATCH weston] ivi-shell: Added tests for
      screen-remove-layer API (Pekka Paalanen)
   3. [PATCH 0/5] Allow user to specify how the code is used
      (Emil Velikov)
   4. [PATCH 1/5] scanner: remove unused scanner.mk (Emil Velikov)
   5. [PATCH 2/5] scanner: use tabs for indentation. (Emil Velikov)
   6. [PATCH 3/5] scanner: introduce --object-type option (Emil Velikov)


----------------------------------------------------------------------

Message: 1
Date: Wed, 26 Jul 2017 16:38:53 +0300
From: Pekka Paalanen <ppaalanen at gmail.com>
To: saikishore <saik710 at gmail.com>
Cc: wayland-devel at lists.freedesktop.org
Subject: Re: Weston with fbdev-backend shows blank screen on display
Message-ID: <20170726163853.4ec8913f at eldfell>
Content-Type: text/plain; charset="utf-8"

On Wed, 26 Jul 2017 17:24:33 +0530
saikishore <saik710 at gmail.com> wrote:

> Hi,
> I have ran weston with fbdev-backend  on my embedded platform with no
input
> devices (evdev is not enabled) and the below is log and i see blank
screen.
> Any advice on this please? it will be great help to me
>
>
> #  weston-launch -- --backend=fbdev-backend.so
>
>
> Date: 1970-01-01 UTC
> [00:00:00.439] weston 1.7.0

Hi,

any reason why so old Weston?

Nothing in the log looks wrong, Weston thinks everything works fine.
Try running weston-simple-shm when Weston is running. If that shows up,
then weston-desktop-shell has problems.

Weston usually does not like running without input devices, but in that
case it should just exit gracefully.

Is fbcon working right? Can you run any old fbdev programs like 'fbi'?


Thanks,
pq


Hi pekka
Thanks for your reply. We internally use buildroot for building embedded
Linux and in that when I enable Weston package it's coming as 1.7 version
hence using it.

And in weston-launch app I have commented out code lines of ioctl call for
input devices because I am running on emulation environment hence initally
trying to bring up Weston on FB first.

On FB we are booting with default image which is coming fine with Linux
boot.

After Linux boot I have launched this weston-launch app then immediately
this display goes blank screen.

By the way I didn't used any Weston.ini file and as per log it is taking
some default. How to give Weston.ini as input this app weston-launch??.

Is weston-simple-shm can also run similar to weston-launch ? By the way I
am running from shell terminal of Linux boot. And what is the command line
parameters of weston-simple-shm.



Thanks
Sai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/
attachments/20170726/51ddd8d2/attachment-0001.sig>

------------------------------

Message: 2
Date: Wed, 26 Jul 2017 16:55:40 +0300
From: Pekka Paalanen <ppaalanen at gmail.com>
To: Michael Teyfel <mteyfel at de.adit-jv.com>
Cc: efriedrich at de.adit-jv.com, eucan at de.adit-jv.com,
        wayland-devel at lists.freedesktop.org
Subject: Re: [PATCH weston] ivi-shell: Added tests for
        screen-remove-layer API
Message-ID: <20170726165540.7f3ef300 at eldfell>
Content-Type: text/plain; charset="utf-8"

On Wed, 26 Jul 2017 14:22:49 +0200
Michael Teyfel <mteyfel at de.adit-jv.com> wrote:

> Two cases are tested: success and fail case of the screen-remove-layer
API.
>
> Signed-off-by: Michael Teyfel <mteyfel at de.adit-jv.com>
> ---
>  tests/ivi_layout-internal-test.c | 69 ++++++++++++++++++++++++++++++
++++++++++
>  1 file changed, 69 insertions(+)

Hi Michael,

looks good, so:
Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

Unfortunately we are past the beta release, so I believe merging this
needs to wait for the next development cycle. I'll try to remember to
push this then.

Or if I get a second opinion that this is ok to push before the RC, I
can do that too.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/
attachments/20170726/80460d2c/attachment-0001.sig>

------------------------------

Message: 3
Date: Wed, 26 Jul 2017 14:56:16 +0100
From: Emil Velikov <emil.l.velikov at gmail.com>
To: wayland-devel at lists.freedesktop.org
Cc: emil.l.velikov at gmail.com
Subject: [PATCH 0/5] Allow user to specify how the code is used
Message-ID: <20170726135621.5179-1-emil.l.velikov at gmail.com>

Hi all,

Here is an alternative version of the "symbol visibility" series by Jonas.

It starts with a couple of mildly related cleanups, which are trivial and
can be applied irrespective of the rest.

Key goals/differences:
 - use "object type" as opposed to "symbol visibility"
Defines the goal, as opposed to the means.
 - there's no "static" option
Including .c files from another is considered a bad practise - don't trick
people into using it.
 - The default option, as provided by wayland-scanner.mk, is STATIC
 - No tests, yet
If people are OK with the idea/approach I can spin some.


Emil Velikov (5):
  scanner: remove unused scanner.mk
  scanner: use tabs for indentation.
  scanner: introduce --object-type option
  build: set the scanner --object-type option
  wayland-scanner.mk: default --object-type to static

 Makefile.am        |  2 +-
 src/scanner.c      | 67 ++++++++++++++++++++++++++++++
+++++++++++++++++-------
 src/scanner.mk     |  8 -------
 wayland-scanner.mk |  2 +-
 4 files changed, 61 insertions(+), 18 deletions(-)
 delete mode 100644 src/scanner.mk

--
2.13.0



------------------------------

Message: 4
Date: Wed, 26 Jul 2017 14:56:17 +0100
From: Emil Velikov <emil.l.velikov at gmail.com>
To: wayland-devel at lists.freedesktop.org
Cc: emil.l.velikov at gmail.com
Subject: [PATCH 1/5] scanner: remove unused scanner.mk
Message-ID: <20170726135621.5179-2-emil.l.velikov at gmail.com>

From: Emil Velikov <emil.velikov at collabora.com>

Nothing in the existing codebase references the file.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/scanner.mk | 8 --------
 1 file changed, 8 deletions(-)
 delete mode 100644 src/scanner.mk

diff --git a/src/scanner.mk b/src/scanner.mk
deleted file mode 100644
index 1b6963c..0000000
--- a/src/scanner.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-%-protocol.c : $(protocoldir)/%.xml
-       $(AM_V_GEN)$(wayland_scanner) code < $< > $@
-
-%-server-protocol.h : $(protocoldir)/%.xml
-       $(AM_V_GEN)$(wayland_scanner) server-header < $< > $@
-
-%-client-protocol.h : $(protocoldir)/%.xml
-       $(AM_V_GEN)$(wayland_scanner) client-header < $< > $@
--
2.13.0



------------------------------

Message: 5
Date: Wed, 26 Jul 2017 14:56:18 +0100
From: Emil Velikov <emil.l.velikov at gmail.com>
To: wayland-devel at lists.freedesktop.org
Cc: emil.l.velikov at gmail.com
Subject: [PATCH 2/5] scanner: use tabs for indentation.
Message-ID: <20170726135621.5179-3-emil.l.velikov at gmail.com>

From: Emil Velikov <emil.velikov at collabora.com>

File uses tabs, barring the few instances fixed with this patch.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/scanner.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/scanner.c b/src/scanner.c
index 517068c..c345ed6 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -70,9 +70,9 @@ usage(int ret)
        fprintf(stderr, "    -h,  --help                  display this help
and exit.\n"
                        "    -v,  --version               print the wayland
library version that\n"
                        "                                 the scanner was
built against.\n"
-                       "    -c,  --include-core-only     include the core
version of the headers,\n"
-                       "                                 that is e.g.
wayland-client-core.h instead\n"
-                       "                                 of
wayland-client.h.\n");
+                       "    -c,  --include-core-only     include the core
version of the headers,\n"
+                       "                                 that is e.g.
wayland-client-core.h instead\n"
+                       "                                 of
wayland-client.h.\n");
        exit(ret);
 }

--
2.13.0



------------------------------

Message: 6
Date: Wed, 26 Jul 2017 14:56:19 +0100
From: Emil Velikov <emil.l.velikov at gmail.com>
To: wayland-devel at lists.freedesktop.org
Cc: emil.l.velikov at gmail.com
Subject: [PATCH 3/5] scanner: introduce --object-type option
Message-ID: <20170726135621.5179-4-emil.l.velikov at gmail.com>

From: Emil Velikov <emil.velikov at collabora.com>

The option is used to indicate how the code will be used - would it be a
part of shared or static one.

In the former case one needs to export the specific symbols, although
normally people want to statically build the protocol code into their
project.

If the option is missing a warning is emitted, to point people and do
the right thing.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/scanner.c | 61 ++++++++++++++++++++++++++++++
++++++++++++++++++++++++-----
 1 file changed, 56 insertions(+), 5 deletions(-)

diff --git a/src/scanner.c b/src/scanner.c
index c345ed6..cc45b74 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -57,6 +57,11 @@ enum side {
        SERVER,
 };

+enum object_type {
+       SHARED,
+       STATIC,
+};
+
 static int
 usage(int ret)
 {
@@ -70,6 +75,11 @@ usage(int ret)
        fprintf(stderr, "    -h,  --help                  display this help
and exit.\n"
                        "    -v,  --version               print the wayland
library version that\n"
                        "                                 the scanner was
built against.\n"
+                       "    -t,  --object-type=[static,shared]\n"
+                       "                                 How is the
resulting code going to be built/used\n"
+                       "                                 static -
standalone static object, used internally\n"
+                       "                                 shared - shared
library, to be used by multiple projects\n"
+                       "                                 Using static is
highly recommened.\n"
                        "    -c,  --include-core-only     include the core
version of the headers,\n"
                        "                                 that is e.g.
wayland-client-core.h instead\n"
                        "                                 of
wayland-client.h.\n");
@@ -1712,9 +1722,11 @@ emit_messages(struct wl_list *message_list,
        printf("};\n\n");
 }

+
 static void
-emit_code(struct protocol *protocol)
+emit_code(struct protocol *protocol, enum object_type obj_type)
 {
+       const char *symbol_visibility;
        struct interface *i, *next;
        struct wl_array types;
        char **p, *prev;
@@ -1728,6 +1740,19 @@ emit_code(struct protocol *protocol)
               "#include <stdint.h>\n"
               "#include \"wayland-util.h\"\n\n");

+       /* When building a shared library symbols must be exported,
otherwise
+        * we want to have the symbols hidden. */
+       if (obj_type == STATIC) {
+               symbol_visibility = "WL_PRIVATE";
+               printf("#if defined(__GNUC__) && __GNUC__ >= 4\n"
+                      "#define WL_PRIVATE __attribute__
((visibility(\"hidden\")))\n"
+                      "#else\n"
+                      "#define WL_PRIVATE\n"
+                      "#endif\n\n");
+       } else {
+               symbol_visibility = "WL_EXPORT";
+       }
+
        wl_array_init(&types);
        wl_list_for_each(i, &protocol->interface_list, link) {
                emit_types_forward_declarations(protocol, &i->request_list,
&types);
@@ -1757,10 +1782,10 @@ emit_code(struct protocol *protocol)
                emit_messages(&i->request_list, i, "requests");
                emit_messages(&i->event_list, i, "events");

-               printf("WL_EXPORT const struct wl_interface "
+               printf("%s const struct wl_interface "
                       "%s_interface = {\n"
                       "\t\"%s\", %d,\n",
-                      i->name, i->name, i->version);
+                      symbol_visibility, i->name, i->name, i->version);

                if (!wl_list_empty(&i->request_list))
                        printf("\t%d, %s_requests,\n",
@@ -1790,6 +1815,24 @@ free_protocol(struct protocol *protocol)
        free_description(protocol->description);
 }

+static enum object_type
+parse_obj_type(const char *obj_type_str)
+{
+       if (!obj_type_str) {
+               fprintf(stderr, "Warning: --object-type is not specified,
assuming shared.\n");
+               return SHARED;
+        }
+
+       if (strcmp(obj_type_str, "static") == 0)
+               return STATIC;
+
+       if (strcmp(obj_type_str, "shared") == 0)
+               return SHARED;
+
+       fprintf(stderr, "Error: invalid object type string '%s'\n",
obj_type_str);
+       usage(EXIT_FAILURE);
+}
+
 int main(int argc, char *argv[])
 {
        struct parse_context ctx;
@@ -1802,6 +1845,8 @@ int main(int argc, char *argv[])
        bool core_headers = false;
        bool version = false;
        bool fail = false;
+       char *obj_type_str = NULL;
+       enum object_type obj_type;
        int opt;
        enum {
                CLIENT_HEADER,
@@ -1812,12 +1857,13 @@ int main(int argc, char *argv[])
        static const struct option options[] = {
                { "help",              no_argument, NULL, 'h' },
                { "version",           no_argument, NULL, 'v' },
+               { "object-type",       required_argument, NULL, 't' },
                { "include-core-only", no_argument, NULL, 'c' },
                { 0,                   0,           NULL, 0 }
        };

        while (1) {
-               opt = getopt_long(argc, argv, "hvc", options, NULL);
+               opt = getopt_long(argc, argv, "hvtc", options, NULL);

                if (opt == -1)
                        break;
@@ -1829,6 +1875,9 @@ int main(int argc, char *argv[])
                case 'v':
                        version = true;
                        break;
+               case 't':
+                       obj_type_str = optarg;
+                       break;
                case 'c':
                        core_headers = true;
                        break;
@@ -1858,6 +1907,8 @@ int main(int argc, char *argv[])
        else
                usage(EXIT_FAILURE);

+       obj_type = parse_obj_type(obj_type_str);
+
        if (argc == 3) {
                input_filename = argv[1];
                input = fopen(input_filename, "r");
@@ -1937,7 +1988,7 @@ int main(int argc, char *argv[])
                        emit_header(&protocol, SERVER);
                        break;
                case CODE:
-                       emit_code(&protocol);
+                       emit_code(&protocol, obj_type);
                        break;
        }

--
2.13.0



------------------------------

Subject: Digest Footer

_______________________________________________
wayland-devel mailing list
wayland-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


------------------------------

End of wayland-devel Digest, Vol 83, Issue 72
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170726/ac6110b6/attachment-0001.html>


More information about the wayland-devel mailing list