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
=== modified file 'debian/control'
--- debian/control 2016-03-26 00:19:29 +0000
+++ debian/control 2016-04-11 15:07:10 +0000
@@ -301,7 +301,7 @@
301 Contains the shared libraries required for the Mir server and client.301 Contains the shared libraries required for the Mir server and client.
302302
303# Longer-term these drivers should move out-of-tree303# Longer-term these drivers should move out-of-tree
304Package: mir-platform-graphics-mesa-x8304Package: mir-platform-graphics-mesa-x9
305Section: libs305Section: libs
306Architecture: linux-any306Architecture: linux-any
307Multi-Arch: same307Multi-Arch: same
@@ -343,7 +343,7 @@
343 Contains the shared libraries required for the Mir server to interact with343 Contains the shared libraries required for the Mir server to interact with
344 the hardware platform using the Android drivers.344 the hardware platform using the Android drivers.
345345
346Package: mir-platform-input-evdev5346Package: mir-platform-input-evdev6
347Section: libs347Section: libs
348Architecture: linux-any348Architecture: linux-any
349Multi-Arch: same349Multi-Arch: same
@@ -406,9 +406,9 @@
406Pre-Depends: ${misc:Pre-Depends}406Pre-Depends: ${misc:Pre-Depends}
407Depends: ${misc:Depends},407Depends: ${misc:Depends},
408 mir-platform-graphics-mesa-kms8,408 mir-platform-graphics-mesa-kms8,
409 mir-platform-graphics-mesa-x8,409 mir-platform-graphics-mesa-x9,
410 mir-client-platform-mesa5,410 mir-client-platform-mesa5,
411 mir-platform-input-evdev5,411 mir-platform-input-evdev6,
412Description: Display server for Ubuntu - desktop driver metapackage412Description: Display server for Ubuntu - desktop driver metapackage
413 Mir is a display server running on linux systems, with a focus on efficiency,413 Mir is a display server running on linux systems, with a focus on efficiency,
414 robust operation and a well-defined driver model.414 robust operation and a well-defined driver model.
@@ -424,7 +424,7 @@
424Depends: ${misc:Depends},424Depends: ${misc:Depends},
425 mir-platform-graphics-android8,425 mir-platform-graphics-android8,
426 mir-client-platform-android5,426 mir-client-platform-android5,
427 mir-platform-input-evdev5,427 mir-platform-input-evdev6,
428Description: Display server for Ubuntu - android driver metapackage428Description: Display server for Ubuntu - android driver metapackage
429 Mir is a display server running on linux systems, with a focus on efficiency,429 Mir is a display server running on linux systems, with a focus on efficiency,
430 robust operation and a well-defined driver model.430 robust operation and a well-defined driver model.
431431
=== renamed file 'debian/mir-platform-graphics-mesa-x8.install' => 'debian/mir-platform-graphics-mesa-x9.install'
--- debian/mir-platform-graphics-mesa-x8.install 2016-02-02 16:03:37 +0000
+++ debian/mir-platform-graphics-mesa-x9.install 2016-04-11 15:07:10 +0000
@@ -1,1 +1,1 @@
1usr/lib/*/mir/server-platform/server-mesa-x11.so.81usr/lib/*/mir/server-platform/server-mesa-x11.so.9
22
=== renamed file 'debian/mir-platform-input-evdev5.install' => 'debian/mir-platform-input-evdev6.install'
--- debian/mir-platform-input-evdev5.install 2016-01-29 08:18:22 +0000
+++ debian/mir-platform-input-evdev6.install 2016-04-11 15:07:10 +0000
@@ -1,1 +1,1 @@
1usr/lib/*/mir/server-platform/input-evdev.so.51usr/lib/*/mir/server-platform/input-evdev.so.6
22
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2016-03-23 06:39:56 +0000
+++ src/CMakeLists.txt 2016-04-11 15:07:10 +0000
@@ -48,6 +48,7 @@
48set(MIR_SERVER_PLATFORM_PATH ${MIR_SERVER_PLATFORM_PATH} PARENT_SCOPE)48set(MIR_SERVER_PLATFORM_PATH ${MIR_SERVER_PLATFORM_PATH} PARENT_SCOPE)
4949
50# We need the ABI versions in the tests50# We need the ABI versions in the tests
51set(MIR_SERVER_PLATFORM_ABI ${MIR_SERVER_PLATFORM_ABI} PARENT_SCOPE)
51set(MIR_SERVER_GRAPHICS_PLATFORM_ABI ${MIR_SERVER_GRAPHICS_PLATFORM_ABI} PARENT_SCOPE)52set(MIR_SERVER_GRAPHICS_PLATFORM_ABI ${MIR_SERVER_GRAPHICS_PLATFORM_ABI} PARENT_SCOPE)
52set(MIR_SERVER_INPUT_PLATFORM_ABI ${MIR_SERVER_INPUT_PLATFORM_ABI} PARENT_SCOPE)53set(MIR_SERVER_INPUT_PLATFORM_ABI ${MIR_SERVER_INPUT_PLATFORM_ABI} PARENT_SCOPE)
53set(MIR_SERVER_GRAPHICS_PLATFORM_VERSION ${MIR_SERVER_GRAPHICS_PLATFORM_VERSION} PARENT_SCOPE)54set(MIR_SERVER_GRAPHICS_PLATFORM_VERSION ${MIR_SERVER_GRAPHICS_PLATFORM_VERSION} PARENT_SCOPE)
5455
=== modified file 'src/platforms/CMakeLists.txt'
--- src/platforms/CMakeLists.txt 2016-03-23 06:39:56 +0000
+++ src/platforms/CMakeLists.txt 2016-04-11 15:07:10 +0000
@@ -3,8 +3,10 @@
3# This ABI is much smaller than the full libmirplatform ABI.3# This ABI is much smaller than the full libmirplatform ABI.
4#4#
5# TODO: Add an extra driver-ABI check target.5# TODO: Add an extra driver-ABI check target.
6set(MIR_SERVER_INPUT_PLATFORM_ABI 5)6set(MIR_SERVER_PLATFORM_ABI 9) # incremented on either input or graphics platform change
7set(MIR_SERVER_INPUT_PLATFORM_STANZA_VERSION 0.19)7set(MIR_SERVER_PLATFORM_ABI ${MIR_SERVER_PLATFORM_ABI} PARENT_SCOPE)
8set(MIR_SERVER_INPUT_PLATFORM_ABI 6)
9set(MIR_SERVER_INPUT_PLATFORM_STANZA_VERSION 0.22)
8set(MIR_SERVER_INPUT_PLATFORM_ABI ${MIR_SERVER_INPUT_PLATFORM_ABI} PARENT_SCOPE)10set(MIR_SERVER_INPUT_PLATFORM_ABI ${MIR_SERVER_INPUT_PLATFORM_ABI} PARENT_SCOPE)
9set(MIR_SERVER_INPUT_PLATFORM_VERSION "MIR_INPUT_PLATFORM_${MIR_SERVER_INPUT_PLATFORM_STANZA_VERSION}")11set(MIR_SERVER_INPUT_PLATFORM_VERSION "MIR_INPUT_PLATFORM_${MIR_SERVER_INPUT_PLATFORM_STANZA_VERSION}")
10set(MIR_SERVER_INPUT_PLATFORM_VERSION ${MIR_SERVER_INPUT_PLATFORM_VERSION} PARENT_SCOPE)12set(MIR_SERVER_INPUT_PLATFORM_VERSION ${MIR_SERVER_INPUT_PLATFORM_VERSION} PARENT_SCOPE)
1113
=== modified file 'src/platforms/mesa/server/x11/CMakeLists.txt'
--- src/platforms/mesa/server/x11/CMakeLists.txt 2016-01-29 08:18:22 +0000
+++ src/platforms/mesa/server/x11/CMakeLists.txt 2016-04-11 15:07:10 +0000
@@ -39,7 +39,7 @@
39 OUTPUT_NAME server-mesa-x1139 OUTPUT_NAME server-mesa-x11
40 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/server-modules40 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/server-modules
41 PREFIX ""41 PREFIX ""
42 SUFFIX ".so.${MIR_SERVER_GRAPHICS_PLATFORM_ABI}"42 SUFFIX ".so.${MIR_SERVER_PLATFORM_ABI}"
43 LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}"43 LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}"
44)44)
4545
4646
=== modified file 'tests/mir_test_framework/CMakeLists.txt'
--- tests/mir_test_framework/CMakeLists.txt 2016-03-23 06:39:56 +0000
+++ tests/mir_test_framework/CMakeLists.txt 2016-04-11 15:07:10 +0000
@@ -15,6 +15,7 @@
15 -DMIR_CLIENT_PLATFORM_PATH="${MIR_CLIENT_PLATFORM_PATH}"15 -DMIR_CLIENT_PLATFORM_PATH="${MIR_CLIENT_PLATFORM_PATH}"
16 -DMIR_SERVER_PLATFORM_PATH="${MIR_SERVER_PLATFORM_PATH}"16 -DMIR_SERVER_PLATFORM_PATH="${MIR_SERVER_PLATFORM_PATH}"
17 -DMIR_CLIENT_PLATFORM_ABI_STRING="${MIR_CLIENT_PLATFORM_ABI}"17 -DMIR_CLIENT_PLATFORM_ABI_STRING="${MIR_CLIENT_PLATFORM_ABI}"
18 -DMIR_SERVER_PLATFORM_ABI_STRING="${MIR_SERVER_PLATFORM_ABI}"
18 -DMIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING="${MIR_SERVER_GRAPHICS_PLATFORM_ABI}"19 -DMIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING="${MIR_SERVER_GRAPHICS_PLATFORM_ABI}"
19 -DMIR_SERVER_INPUT_PLATFORM_ABI_STRING="${MIR_SERVER_INPUT_PLATFORM_ABI}"20 -DMIR_SERVER_INPUT_PLATFORM_ABI_STRING="${MIR_SERVER_INPUT_PLATFORM_ABI}"
20 -DMIR_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"21 -DMIR_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"
2122
=== modified file 'tests/mir_test_framework/executable_path.cpp'
--- tests/mir_test_framework/executable_path.cpp 2016-03-23 06:39:56 +0000
+++ tests/mir_test_framework/executable_path.cpp 2016-04-11 15:07:10 +0000
@@ -73,7 +73,7 @@
73 std::string libname{name};73 std::string libname{name};
7474
75 if (libname.find(".so") == std::string::npos)75 if (libname.find(".so") == std::string::npos)
76 libname += ".so." MIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING;76 libname += ".so." MIR_SERVER_PLATFORM_ABI_STRING;
7777
78 for (auto const& option :78 for (auto const& option :
79 {library_path() + "/server-modules/", library_path() + "/server-platform/", std::string(MIR_SERVER_PLATFORM_PATH) + '/'})79 {library_path() + "/server-modules/", library_path() + "/server-platform/", std::string(MIR_SERVER_PLATFORM_PATH) + '/'})
8080
=== modified file 'tests/unit-tests/CMakeLists.txt'
--- tests/unit-tests/CMakeLists.txt 2016-03-23 06:39:56 +0000
+++ tests/unit-tests/CMakeLists.txt 2016-04-11 15:07:10 +0000
@@ -3,6 +3,7 @@
3add_definitions(3add_definitions(
4 -DMIR_CLIENT_PLATFORM_VERSION="${MIR_CLIENT_PLATFORM_VERSION}"4 -DMIR_CLIENT_PLATFORM_VERSION="${MIR_CLIENT_PLATFORM_VERSION}"
5 -DMIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING="${MIR_SERVER_GRAPHICS_PLATFORM_ABI}"5 -DMIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING="${MIR_SERVER_GRAPHICS_PLATFORM_ABI}"
6 -DMIR_SERVER_PLATFORM_ABI_STRING="${MIR_SERVER_PLATFORM_ABI}"
6)7)
78
8if (MIR_BUILD_PLATFORM_ANDROID)9if (MIR_BUILD_PLATFORM_ANDROID)
910
=== modified file 'tests/unit-tests/input/test_input_platform_probing.cpp'
--- tests/unit-tests/input/test_input_platform_probing.cpp 2016-03-23 06:39:56 +0000
+++ tests/unit-tests/input/test_input_platform_probing.cpp 2016-04-11 15:07:10 +0000
@@ -151,7 +151,7 @@
151151
152TEST_F(InputPlatformProbe, when_multiple_x11_platforms_are_eligible_only_one_is_selected)152TEST_F(InputPlatformProbe, when_multiple_x11_platforms_are_eligible_only_one_is_selected)
153{153{
154 auto const real_lib = mtf::server_platform_path() + "server-mesa-x11.so." MIR_SERVER_GRAPHICS_PLATFORM_ABI_STRING;154 auto const real_lib = mtf::server_platform_path() + "server-mesa-x11.so." MIR_SERVER_PLATFORM_ABI_STRING;
155 auto const fake_lib = mtf::server_platform_path() + "server-mesa-x11.so.0";155 auto const fake_lib = mtf::server_platform_path() + "server-mesa-x11.so.0";
156156
157 ASSERT_THAT(real_lib, Ne(fake_lib));157 ASSERT_THAT(real_lib, Ne(fake_lib));
158158
=== modified file 'tools/update_package_abis.sh'
--- tools/update_package_abis.sh 2016-01-29 08:18:22 +0000
+++ tools/update_package_abis.sh 2016-04-11 15:07:10 +0000
@@ -20,7 +20,7 @@
20 mir-client-platform-android:MIR_CLIENT_PLATFORM_ABI \20 mir-client-platform-android:MIR_CLIENT_PLATFORM_ABI \
21 mir-client-platform-mesa:MIR_CLIENT_PLATFORM_ABI \21 mir-client-platform-mesa:MIR_CLIENT_PLATFORM_ABI \
22 mir-platform-graphics-android:MIR_SERVER_GRAPHICS_PLATFORM_ABI \22 mir-platform-graphics-android:MIR_SERVER_GRAPHICS_PLATFORM_ABI \
23 mir-platform-graphics-mesa-x:MIR_SERVER_GRAPHICS_PLATFORM_ABI \23 mir-platform-graphics-mesa-x:MIR_SERVER_PLATFORM_ABI \
24 mir-platform-graphics-mesa-kms:MIR_SERVER_GRAPHICS_PLATFORM_ABI \24 mir-platform-graphics-mesa-kms:MIR_SERVER_GRAPHICS_PLATFORM_ABI \
25 mir-platform-input-evdev:MIR_SERVER_INPUT_PLATFORM_ABI"25 mir-platform-input-evdev:MIR_SERVER_INPUT_PLATFORM_ABI"
2626

Subscribers

People subscribed via source and target branches