Mir

Merge lp:~andreas-pokorny/mir/bump-input-platform-abi-for-0.22 into lp:mir

Proposed by Andreas Pokorny
Status: Work in progress
Proposed branch: lp:~andreas-pokorny/mir/bump-input-platform-abi-for-0.22
Merge into: lp:mir
Diff against target: 160 lines (+18/-13)
11 files modified
debian/control (+5/-5)
debian/mir-platform-graphics-mesa-x9.install (+1/-1)
debian/mir-platform-input-evdev6.install (+1/-1)
src/CMakeLists.txt (+1/-0)
src/platforms/CMakeLists.txt (+4/-2)
src/platforms/mesa/server/x11/CMakeLists.txt (+1/-1)
tests/mir_test_framework/CMakeLists.txt (+1/-0)
tests/mir_test_framework/executable_path.cpp (+1/-1)
tests/unit-tests/CMakeLists.txt (+1/-0)
tests/unit-tests/input/test_input_platform_probing.cpp (+1/-1)
tools/update_package_abis.sh (+1/-1)
To merge this branch: bzr merge lp:~andreas-pokorny/mir/bump-input-platform-abi-for-0.22
Reviewer Review Type Date Requested Status
Alan Griffiths Disapprove
Mir CI Bot continuous-integration Needs Fixing
Kevin DuBois (community) Approve
Review via email: mp+291374@code.launchpad.net

Commit message

Bump the input platform ABI to 6 and add a new combined input and graphics server abi numbering.

Description of the change

Merge this before lp:~andreas-pokorny/mir/move-key-repeat-into-input-platforms and before a not yet proposed change that will add a method to query the initial status from input devices on startup.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
3449. By Andreas Pokorny

use server platform abi version when loading x11 server platform

Revision history for this message
Kevin DuBois (kdub) wrote :

I think there's some disentangling of the ABI/api to be done if input and graphics have to have the same numbering, but given the current situation with the x11 platform, lgtm

review: Approve
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I think this adds to an already confusing situation.

We have input and graphics ABIs that relate to the corresponding interfaces used by mirserver.

These are implemented in the assorted platform modules which use them to name the stanzas in their symbols maps.

The .soname numbering (which this MP is addressing) shouldn't be tied to to the ABI numbers, nor should the different platform modules be tied to the same .soname numbering.

There is a problem with the X11 platform that needs to support both input and graphics ABIs needed by the server but, theoretically at least, could support just one. But fiddling with the .soname doesn't help.

review: Disapprove
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

Given the interfaces that we have - so always a separated input and graphics platform interface, (we might in the future also split the graphics platform interface into more pieces - so we might get more separate interfaces - then this MP will not help either), and the wish that platforms from different mir versions may be installed in parallel without hurting each other we need to change the package number of the platform packages that contains changes. This change intends to separate combined server packages from pure graphics packages. Not splitting that means having new packages even when nothing changed..

> I think this adds to an already confusing situation.
>
> We have input and graphics ABIs that relate to the corresponding interfaces
> used by mirserver.
>
> These are implemented in the assorted platform modules which use them to name
> the stanzas in their symbols maps.
>
> The .soname numbering (which this MP is addressing) shouldn't be tied to to
> the ABI numbers, nor should the different platform modules be tied to the same
> .soname numbering.

The numbering is solely to allow parallel installs, instead of numbers we could also use cat names. But that makes sorting for the newest harder.

> There is a problem with the X11 platform that needs to support both input and
> graphics ABIs needed by the server but, theoretically at least, could support
> just one. But fiddling with the .soname doesn't help.

In theory the x platform is only a display platform and an input platform, allocation and IPC could be taken from the drm/mesa platform. Hm claiming it has only one interface, sounds like a step in the wrong direction. Each of the interfaces should have separate counters and stanzas.

We could also solve this problem by including all ABI change counters in the name of the x platform package using some delimiter.

Or we could avoid this problem entirely by providing more information to the probing function.. that would be some sort of context object that would allow the other part of the x platform access the X11 Display, and also know that we run on X11... then we could split the x platform into two separate packages. This would also scale well when we decide to split the graphics platform displaying and buffer allocation parts (and maybe IPC?).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I would like us to get to a point where plugins did not need sonames. Or at least for the soname to refer to the ABI level of the initial probing API ("1") which will then never change, and itself will be used to probe the graphics/input/whatever API.

Also, the 'lib' prefix for plugins is inappropriate. 'libXYZ' is used only for compile-time linking to -lXYZ. If the linking is not at compile time (ie. drivers/plugins) then there should be no 'lib' prefix.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh there is no lib prefix...

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

> I think this adds to an already confusing situation.
>
> We have input and graphics ABIs that relate to the corresponding interfaces
> used by mirserver.
>
> These are implemented in the assorted platform modules which use them to name
> the stanzas in their symbols maps.
>
> The .soname numbering (which this MP is addressing) shouldn't be tied to to
> the ABI numbers, nor should the different platform modules be tied to the same
> .soname numbering.
>
> There is a problem with the X11 platform that needs to support both input and
> graphics ABIs needed by the server but, theoretically at least, could support
> just one. But fiddling with the .soname doesn't help.

Sorry for conflating probing and other topic into this discussion.

This MP just avoids incrementing the kms and android counter when not necessary. I guess the names are misleading, instead of
set(MIR_SERVER_INPUT_PLATFORM_ABI 5)
set(MIR_SERVER_GRAPHICS_PLATFORM_ABI 9)
we could have
set(MIR_SERVER_INPUT_PLATFORM_SUFFIX 5)
set(MIR_SERVER_GRAPHICS_PLATFORM_SUFFIX 9)
set(MIR_SERVER_COMBINED_PLATFORM_SUFFIX 10)

or _COUNTER ..

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

outdated .. and at the moment not yet needed..

Unmerged revisions

3449. By Andreas Pokorny

use server platform abi version when loading x11 server platform

3448. By Andreas Pokorny

use the 'server' platform abi numbering extension

3447. By Andreas Pokorny

Bump input platform ABI and separate the x11 ABI number from kms..

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-03-26 00:19:29 +0000
3+++ debian/control 2016-04-11 15:07:10 +0000
4@@ -301,7 +301,7 @@
5 Contains the shared libraries required for the Mir server and client.
6
7 # Longer-term these drivers should move out-of-tree
8-Package: mir-platform-graphics-mesa-x8
9+Package: mir-platform-graphics-mesa-x9
10 Section: libs
11 Architecture: linux-any
12 Multi-Arch: same
13@@ -343,7 +343,7 @@
14 Contains the shared libraries required for the Mir server to interact with
15 the hardware platform using the Android drivers.
16
17-Package: mir-platform-input-evdev5
18+Package: mir-platform-input-evdev6
19 Section: libs
20 Architecture: linux-any
21 Multi-Arch: same
22@@ -406,9 +406,9 @@
23 Pre-Depends: ${misc:Pre-Depends}
24 Depends: ${misc:Depends},
25 mir-platform-graphics-mesa-kms8,
26- mir-platform-graphics-mesa-x8,
27+ mir-platform-graphics-mesa-x9,
28 mir-client-platform-mesa5,
29- mir-platform-input-evdev5,
30+ mir-platform-input-evdev6,
31 Description: Display server for Ubuntu - desktop driver metapackage
32 Mir is a display server running on linux systems, with a focus on efficiency,
33 robust operation and a well-defined driver model.
34@@ -424,7 +424,7 @@
35 Depends: ${misc:Depends},
36 mir-platform-graphics-android8,
37 mir-client-platform-android5,
38- mir-platform-input-evdev5,
39+ mir-platform-input-evdev6,
40 Description: Display server for Ubuntu - android driver metapackage
41 Mir is a display server running on linux systems, with a focus on efficiency,
42 robust operation and a well-defined driver model.
43
44=== renamed file 'debian/mir-platform-graphics-mesa-x8.install' => 'debian/mir-platform-graphics-mesa-x9.install'
45--- debian/mir-platform-graphics-mesa-x8.install 2016-02-02 16:03:37 +0000
46+++ debian/mir-platform-graphics-mesa-x9.install 2016-04-11 15:07:10 +0000
47@@ -1,1 +1,1 @@
48-usr/lib/*/mir/server-platform/server-mesa-x11.so.8
49+usr/lib/*/mir/server-platform/server-mesa-x11.so.9
50
51=== renamed file 'debian/mir-platform-input-evdev5.install' => 'debian/mir-platform-input-evdev6.install'
52--- debian/mir-platform-input-evdev5.install 2016-01-29 08:18:22 +0000
53+++ debian/mir-platform-input-evdev6.install 2016-04-11 15:07:10 +0000
54@@ -1,1 +1,1 @@
55-usr/lib/*/mir/server-platform/input-evdev.so.5
56+usr/lib/*/mir/server-platform/input-evdev.so.6
57
58=== modified file 'src/CMakeLists.txt'
59--- src/CMakeLists.txt 2016-03-23 06:39:56 +0000
60+++ src/CMakeLists.txt 2016-04-11 15:07:10 +0000
61@@ -48,6 +48,7 @@
62 set(MIR_SERVER_PLATFORM_PATH ${MIR_SERVER_PLATFORM_PATH} PARENT_SCOPE)
63
64 # We need the ABI versions in the tests
65+set(MIR_SERVER_PLATFORM_ABI ${MIR_SERVER_PLATFORM_ABI} PARENT_SCOPE)
66 set(MIR_SERVER_GRAPHICS_PLATFORM_ABI ${MIR_SERVER_GRAPHICS_PLATFORM_ABI} PARENT_SCOPE)
67 set(MIR_SERVER_INPUT_PLATFORM_ABI ${MIR_SERVER_INPUT_PLATFORM_ABI} PARENT_SCOPE)
68 set(MIR_SERVER_GRAPHICS_PLATFORM_VERSION ${MIR_SERVER_GRAPHICS_PLATFORM_VERSION} PARENT_SCOPE)
69
70=== modified file 'src/platforms/CMakeLists.txt'
71--- src/platforms/CMakeLists.txt 2016-03-23 06:39:56 +0000
72+++ src/platforms/CMakeLists.txt 2016-04-11 15:07:10 +0000
73@@ -3,8 +3,10 @@
74 # This ABI is much smaller than the full libmirplatform ABI.
75 #
76 # TODO: Add an extra driver-ABI check target.
77-set(MIR_SERVER_INPUT_PLATFORM_ABI 5)
78-set(MIR_SERVER_INPUT_PLATFORM_STANZA_VERSION 0.19)
79+set(MIR_SERVER_PLATFORM_ABI 9) # incremented on either input or graphics platform change
80+set(MIR_SERVER_PLATFORM_ABI ${MIR_SERVER_PLATFORM_ABI} PARENT_SCOPE)
81+set(MIR_SERVER_INPUT_PLATFORM_ABI 6)
82+set(MIR_SERVER_INPUT_PLATFORM_STANZA_VERSION 0.22)
83 set(MIR_SERVER_INPUT_PLATFORM_ABI ${MIR_SERVER_INPUT_PLATFORM_ABI} PARENT_SCOPE)
84 set(MIR_SERVER_INPUT_PLATFORM_VERSION "MIR_INPUT_PLATFORM_${MIR_SERVER_INPUT_PLATFORM_STANZA_VERSION}")
85 set(MIR_SERVER_INPUT_PLATFORM_VERSION ${MIR_SERVER_INPUT_PLATFORM_VERSION} PARENT_SCOPE)
86
87=== modified file 'src/platforms/mesa/server/x11/CMakeLists.txt'
88--- src/platforms/mesa/server/x11/CMakeLists.txt 2016-01-29 08:18:22 +0000
89+++ src/platforms/mesa/server/x11/CMakeLists.txt 2016-04-11 15:07:10 +0000
90@@ -39,7 +39,7 @@
91 OUTPUT_NAME server-mesa-x11
92 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/server-modules
93 PREFIX ""
94- SUFFIX ".so.${MIR_SERVER_GRAPHICS_PLATFORM_ABI}"
95+ SUFFIX ".so.${MIR_SERVER_PLATFORM_ABI}"
96 LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}"
97 )
98
99
100=== modified file 'tests/mir_test_framework/CMakeLists.txt'
101--- tests/mir_test_framework/CMakeLists.txt 2016-03-23 06:39:56 +0000
102+++ tests/mir_test_framework/CMakeLists.txt 2016-04-11 15:07:10 +0000
103@@ -15,6 +15,7 @@
104 -DMIR_CLIENT_PLATFORM_PATH="${MIR_CLIENT_PLATFORM_PATH}"
105 -DMIR_SERVER_PLATFORM_PATH="${MIR_SERVER_PLATFORM_PATH}"
106 -DMIR_CLIENT_PLATFORM_ABI_STRING="${MIR_CLIENT_PLATFORM_ABI}"
107+ -DMIR_SERVER_PLATFORM_ABI_STRING="${MIR_SERVER_PLATFORM_ABI}"
108 -DMIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING="${MIR_SERVER_GRAPHICS_PLATFORM_ABI}"
109 -DMIR_SERVER_INPUT_PLATFORM_ABI_STRING="${MIR_SERVER_INPUT_PLATFORM_ABI}"
110 -DMIR_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"
111
112=== modified file 'tests/mir_test_framework/executable_path.cpp'
113--- tests/mir_test_framework/executable_path.cpp 2016-03-23 06:39:56 +0000
114+++ tests/mir_test_framework/executable_path.cpp 2016-04-11 15:07:10 +0000
115@@ -73,7 +73,7 @@
116 std::string libname{name};
117
118 if (libname.find(".so") == std::string::npos)
119- libname += ".so." MIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING;
120+ libname += ".so." MIR_SERVER_PLATFORM_ABI_STRING;
121
122 for (auto const& option :
123 {library_path() + "/server-modules/", library_path() + "/server-platform/", std::string(MIR_SERVER_PLATFORM_PATH) + '/'})
124
125=== modified file 'tests/unit-tests/CMakeLists.txt'
126--- tests/unit-tests/CMakeLists.txt 2016-03-23 06:39:56 +0000
127+++ tests/unit-tests/CMakeLists.txt 2016-04-11 15:07:10 +0000
128@@ -3,6 +3,7 @@
129 add_definitions(
130 -DMIR_CLIENT_PLATFORM_VERSION="${MIR_CLIENT_PLATFORM_VERSION}"
131 -DMIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING="${MIR_SERVER_GRAPHICS_PLATFORM_ABI}"
132+ -DMIR_SERVER_PLATFORM_ABI_STRING="${MIR_SERVER_PLATFORM_ABI}"
133 )
134
135 if (MIR_BUILD_PLATFORM_ANDROID)
136
137=== modified file 'tests/unit-tests/input/test_input_platform_probing.cpp'
138--- tests/unit-tests/input/test_input_platform_probing.cpp 2016-03-23 06:39:56 +0000
139+++ tests/unit-tests/input/test_input_platform_probing.cpp 2016-04-11 15:07:10 +0000
140@@ -151,7 +151,7 @@
141
142 TEST_F(InputPlatformProbe, when_multiple_x11_platforms_are_eligible_only_one_is_selected)
143 {
144- auto const real_lib = mtf::server_platform_path() + "server-mesa-x11.so." MIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING;
145+ auto const real_lib = mtf::server_platform_path() + "server-mesa-x11.so." MIR_SERVER_PLATFORM_ABI_STRING;
146 auto const fake_lib = mtf::server_platform_path() + "server-mesa-x11.so.0";
147
148 ASSERT_THAT(real_lib, Ne(fake_lib));
149
150=== modified file 'tools/update_package_abis.sh'
151--- tools/update_package_abis.sh 2016-01-29 08:18:22 +0000
152+++ tools/update_package_abis.sh 2016-04-11 15:07:10 +0000
153@@ -20,7 +20,7 @@
154 mir-client-platform-android:MIR_CLIENT_PLATFORM_ABI \
155 mir-client-platform-mesa:MIR_CLIENT_PLATFORM_ABI \
156 mir-platform-graphics-android:MIR_SERVER_GRAPHICS_PLATFORM_ABI \
157- mir-platform-graphics-mesa-x:MIR_SERVER_GRAPHICS_PLATFORM_ABI \
158+ mir-platform-graphics-mesa-x:MIR_SERVER_PLATFORM_ABI \
159 mir-platform-graphics-mesa-kms:MIR_SERVER_GRAPHICS_PLATFORM_ABI \
160 mir-platform-input-evdev:MIR_SERVER_INPUT_PLATFORM_ABI"
161

Subscribers

People subscribed via source and target branches