Download - Als2012 Othman
-
8/12/2019 Als2012 Othman
1/25
Weston Plugin BaLayer Manageme
Ossama Othman20 September 2012
-
8/12/2019 Als2012 Othman
2/25
2
Context
GNU/Linux based IVI platform
Multiple screens
Multiple ECUs
Applications may be distributed
across multiple screens and
ECUs
IVI-specific UI paradigms
-
8/12/2019 Als2012 Othman
3/25
3
Minimal resources for in-house
development of suitable IVIcompositor, etc.
Costs
Lack of expertise in interface
between user space, kernel and
graphics hardware
Existing desktop solutions may
not satisfy IVI UI requirements
Problems
Kernel
KMS
DRM Gra
Hardware
Graphics
User Space
Compositor Inpu
-
8/12/2019 Als2012 Othman
4/25
4
Solution Wayland and Weston
Core compositing functionality
Handle kernel-space interaction
Efficient IPC
Open-sourceFTW!
Weston IVI plugin Addresses IVI related UI feature
gaps in Weston
Simple and focused
Wayland
Client
W
Weston
Backend Shell
IVI Shell
Plugin
-
8/12/2019 Als2012 Othman
5/25
5
Weston IVI Plugin Interface for
GENIVI-style Layer Management
-
8/12/2019 Als2012 Othman
6/25
6
Identifying Feature Gaps
GENIVI Layer Management
Client Interface FeatureWayland Protocol
Surface Lifecycle Management Yes
Surface PositioningYes, but through input device, not
supplied coordinate
Surface Visibility No
Surface Opacity No
Layer Lifecycle Management No
Layer Positioning No
Layer Visibility No
Render order of surfaces in layer No
-
8/12/2019 Als2012 Othman
7/25
7
Writing the Weston IVI Plugin Interface
Group operations according to layer management object ty
Surface Layer
Display
Weston plugin interface format matches Wayland protocol
Map Wayland protocol interface to each object type One Wayland request per feature (operation)
Set position, opacity, visibility, etc
-
8/12/2019 Als2012 Othman
8/25
8
Wayland Protocol Interface XML Format
-
8/12/2019 Als2012 Othman
9/25
9
Subset of Wayland Protocol Elements
Protocol XML
ElementDescription
protocolTop-level element that affects how files and #includeguards generated by wa
are named
interface Element that encapsulates a set of operations that may be performed on a corre
request Server side operation called on object by client that is completed async
event Client side operation asynchronously called by server side (e.g. Weston) when
-
8/12/2019 Als2012 Othman
10/25
10
Wayland Protocol Argument TypesWayland
Argument TypeNative Type Descript
int int32_t 32 bit signed
uint uint32_t 32 bit unsigned
fixed wl_fixed_tdouble-precision float
convert to native doubwl_fixed_{to,fro
string char const * nil-terminated
array struct wl_array *Structure containing po
its length
fd int open file des
new_idstruct wl_object * orstructwl_resource *
Object reference passe
requests
objectstruct wl_object * orstructwl_resource *
Object reference (e.wl_surface)
-
8/12/2019 Als2012 Othman
11/25
11
Caveats
No concept of synchronous return valuese.g. get oper
Wayland protocol Clients should cache old value until eventarrives asynchrono
new value
-
8/12/2019 Als2012 Othman
12/25
12
Weston IVI Plugin Implementation
-
8/12/2019 Als2012 Othman
13/25
13
Weston Plugin Requirements
Plugin entry point
Initialization function called by Weston compositor upon succe
plugin
int module_init(struct weston_compositor *);
Previously shell_init()
Plugin must currently be built inside Weston source tree
Weston does not yet export plugin interface or library
-
8/12/2019 Als2012 Othman
14/25
14
Weston Plugin Components
ivi-shell.xml
Wayland protocol based plugin
interface
ivi-shell.c
Plugin implementation
Generated files ivi-shell-server-protocol.h
ivi-shell-protocol.c
wayland-scanner
ivi-shell-server-protocol.h ivi-shell-prot
ivi-shell.c
-
8/12/2019 Als2012 Othman
15/25
15
Weston Plugin Implementation
Request implementation prototypes found in generated ivi-shell-ser
protocol.hheader
static void lm_surface_set_opacity(struct wl_client * client,
struct wl_resource * resour
struct wl_resource * opacit
static const struct lm_surface_interface lm_surface_implementa
lm_surface_set_opacity
};
Register implementation
struct wl_resource * resource =
wl_client_add_object(client, &lm_surface_interface
&lm_surface_implementation, id
-
8/12/2019 Als2012 Othman
16/25
16
Using the Weston IVI Plugin
-
8/12/2019 Als2012 Othman
17/25
17
Configure Weston to Use IVI Plugin
weston.inisearch path $XDG_CONFIG_HOME/.config/
$HOME/.config/
Automake-style plugin install directory $(libdir)/weston/
Set name of plugin in weston.ini[shell]
type=ivi-shell.so
-
8/12/2019 Als2012 Othman
18/25
18
Invocation of IVI Plugin Operations
Client side build Add ivi-shell-protocol.cto client source build
Client side code
#include ivi-shell-client-protocol.h
void foo(){
lm_surface_set_visibility();
}
-
8/12/2019 Als2012 Othman
19/25
19
Weston IVI Plugin vs. GENIVI Layer
-
8/12/2019 Als2012 Othman
20/25
20
Architectures
Client
GE
LM Communicator IPC (e.g. D-B
GENIVI LM Client Library
Communicator Plugin
Com
Client
WestonIVI
Plugin
Wayland IPC
GENIVI LM Client Library
IVI Plugin Client Stublibwayland
-
8/12/2019 Als2012 Othman
21/25
21
Architectural Comparison
Weston IVI Plugin
Weston-specific Small codebase
Efficient IPC
Simple architecture
Network transparency supportin Wayland/Weston is still
pending
GENIVI Layer Manag
Highly extensible Rendering plugins
Wayland
X
Direct FB
Communicator plug
D-Bus
TCP/IP
-
8/12/2019 Als2012 Othman
22/25
22
Summary
Existing desktop style window management is insufficient
some cases
Applications are not necessarily run in windows
Westons extensibility is key to creating IVI UI with minima
No need for IVI UI developers to create compositor from scratc
Allows IVI UI developers to focus on their own IVI-specific nee
-
8/12/2019 Als2012 Othman
23/25
23
References
Wayland
http://wayland.freedesktop.org/
http://cgit.freedesktop.org/wayland
GENIVI
http://www.genivi.org/
Media & Graphics Expert Group
http://wayland.freedesktop.org/http://cgit.freedesktop.org/waylandhttp://www.genivi.org/http://www.genivi.org/http://www.genivi.org/http://cgit.freedesktop.org/waylandhttp://cgit.freedesktop.org/waylandhttp://wayland.freedesktop.org/http://wayland.freedesktop.org/ -
8/12/2019 Als2012 Othman
24/25
24
Legal
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS.
PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASS
LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY REL
AND/OR USE OF INTEL PRODUCTS, INCLUDING LIABILITY OR WARRANTIES RELATING TO FITPARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIG
INTELLECTUAL PROPERTY RIGHT.
Intel may make changes to specifications, product descriptions, and plans at any time, without notice.
All dates provided are subject to change without notice.
Intel is a trademark of Intel Corporation in the U.S. and other countries.
*Other names and brands may be claimed as the property of others.
Copyright 2012, Intel Corporation. All rights are protected.
-
8/12/2019 Als2012 Othman
25/25