[PATCH weston 3/6] hmi-controller: load as weston module
Ucan, Emre (ADITG/ESB)
eucan at de.adit-jv.com
Thu Jan 25 12:57:31 UTC 2018
Hi,
> -----Original Message-----
> From: wayland-devel [mailto:wayland-devel-
> bounces at lists.freedesktop.org] On Behalf Of Pekka Paalanen
> Sent: Montag, 22. Januar 2018 13:29
> To: Ucan, Emre (ADITG/ESB)
> Cc: wayland-devel at lists.freedesktop.org
> Subject: Re: [PATCH weston 3/6] hmi-controller: load as weston module
>
> On Wed, 3 Jan 2018 16:09:18 +0100
> Emre Ucan <eucan at de.adit-jv.com> wrote:
>
> > weston loads hmi-controller as a weston module.
> > IVI-shell does not need to load it explicitly.
> >
> > Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
> > ---
> > ivi-shell/hmi-controller.c | 33 ++++++++++++++-------------------
> > ivi-shell/weston.ini.in | 2 +-
> > 2 files changed, 15 insertions(+), 20 deletions(-)
> >
> > diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
> > index 34abc11..e6dd174 100644
> > --- a/ivi-shell/hmi-controller.c
> > +++ b/ivi-shell/hmi-controller.c
> > @@ -148,12 +148,6 @@ struct launcher_info {
> > int32_t index;
> > };
> >
> > -int
> > -controller_module_init(struct weston_compositor *ec,
> > - int *argc, char *argv[],
> > - const struct ivi_layout_interface *interface,
> > - size_t interface_version);
> > -
> >
> /**********************************************************
> *******************
> > * local functions
> >
> **********************************************************
> ******************/
> > @@ -766,16 +760,24 @@ hmi_controller_destroy(struct wl_listener
> *listener, void *data)
> > * ivi_hmi_controller_home is requested.
> > */
> > static struct hmi_controller *
> > -hmi_controller_create(struct weston_compositor *ec,
> > - const struct ivi_layout_interface *interface)
> > +hmi_controller_create(struct weston_compositor *ec)
> > {
> > struct link_layer *tmp_link_layer = NULL;
> > int32_t panel_height = 0;
> > - struct hmi_controller *hmi_ctrl = MEM_ALLOC(sizeof(*hmi_ctrl));
> > + struct hmi_controller *hmi_ctrl;
> > + const struct ivi_layout_interface *interface;
> > struct hmi_controller_layer *base_layer = NULL;
> > struct hmi_controller_layer *application_layer = NULL;
> > struct weston_output *output;
> >
> > + interface = ivi_layout_get_api(ec);
> > +
> > + if (!interface) {
> > + weston_log("Cannot use ivi_layout_interface.\n");
> > + return NULL;
> > + }
> > +
> > + hmi_ctrl = MEM_ALLOC(sizeof(*hmi_ctrl));
> > int32_t i = 0;
>
> The definition of 'i' should be with the other definitions.
>
> >
> > wl_array_init(&hmi_ctrl->ui_widgets);
> > @@ -1954,20 +1956,13 @@ launch_hmi_client_process(void *data)
> > * exported functions
> >
> **********************************************************
> ******************/
> > WL_EXPORT int
> > -controller_module_init(struct weston_compositor *ec,
> > - int *argc, char *argv[],
> > - const struct ivi_layout_interface *interface,
> > - size_t interface_version)
> > +wet_module_init(struct weston_compositor *ec,
> > + int *argc, char *argv[])
>
> This patch causes the old way of loading controller modules fail with:
>
> Failed to lookup init
> function: /home/pq/local/lib/weston/hmi-controller.so: undefined
> symbol: controller_module_init
>
> Would be nicer if there was an error about a no longer used config key,
> or if the config key was removed.
>
> It doesn't bother me much though, so with the style nitpick fixed:
>
> Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
I will fix it no problem.
>
>
> Thanks,
> pq
>
> > {
> > struct hmi_controller *hmi_ctrl = NULL;
> > struct wl_event_loop *loop = NULL;
> >
> > - if (interface_version < sizeof(struct ivi_layout_interface)) {
> > - weston_log("ivi-shell: version mismatch of controller
> interface\n");
> > - return -1;
> > - }
> > -
> > - hmi_ctrl = hmi_controller_create(ec, interface);
> > + hmi_ctrl = hmi_controller_create(ec);
> > if (hmi_ctrl == NULL)
> > return -1;
> >
> > diff --git a/ivi-shell/weston.ini.in b/ivi-shell/weston.ini.in
> > index 9b53691..3f11e1c 100644
> > --- a/ivi-shell/weston.ini.in
> > +++ b/ivi-shell/weston.ini.in
> > @@ -1,8 +1,8 @@
> > [core]
> > shell=@plugin_prefix at ivi-shell.so
> > +modules=@plugin_prefix at hmi-controller.so
> >
> > [ivi-shell]
> > -ivi-module=@plugin_prefix at hmi-controller.so
> > ivi-shell-user-interface=@abs_top_builddir@/weston-ivi-shell-user-
> interface
> >
> > #developermode=true
Best Regards,
Emre
More information about the wayland-devel
mailing list