Mir

Merge lp:~vanvugt/mir/fix-1438536 into lp:mir

Proposed by Daniel van Vugt
Status: Merged
Approved by: Kevin DuBois
Approved revision: no longer in the source branch.
Merged at revision: 2510
Proposed branch: lp:~vanvugt/mir/fix-1438536
Merge into: lp:mir
Diff against target: 52 lines (+12/-10)
1 file modified
src/platform/graphics/platform_probe.cpp (+12/-10)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1438536
Reviewer Review Type Date Requested Status
Cemil Azizoglu (community) Approve
Kevin DuBois (community) Approve
Alexandros Frantzis (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+257334@code.launchpad.net

Commit message

When enumerating graphics drivers politely log what is found, instead of
<WARNING> about spurious failures to load non-graphics drivers that we
don't care about. (LP: #1438536)

Description of the change

Before:

[1429866151.970301] <WARNING> Platform Probing: Failed to probe module. Not a platform library or incorrect ABI version? Error: bin/../lib/server-modules/input-stub.so: undefined symbol: probe_graphics_platform, version MIR_GRAPHICS_PLATFORM_2
[1429866151.970394] Platform Loader: Selected driver: mesa (version 0.13.0)

After:

[1429865885.612831] mirplatform: Found graphics driver: dummy
[1429865885.612882] mirplatform: Found graphics driver: android
[1429865885.613125] mirplatform: Found graphics driver: mesa
[1429865885.613402] Platform Loader: Selected driver: mesa (version 0.13.0)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

It would be helpful to also print the name (and perhaps path) of the shared object for each platform.

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

lgtm

review: Approve
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Ok

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platform/graphics/platform_probe.cpp'
2--- src/platform/graphics/platform_probe.cpp 2015-04-13 14:07:18 +0000
3+++ src/platform/graphics/platform_probe.cpp 2015-04-24 08:59:56 +0000
4@@ -16,14 +16,12 @@
5 * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
6 */
7
8-#include "mir/logging/logger.h"
9+#include "mir/log.h"
10 #include "mir/graphics/platform.h"
11 #include "mir/graphics/platform_probe.h"
12
13 #include <boost/throw_exception.hpp>
14
15-namespace ml = mir::logging;
16-
17 std::shared_ptr<mir::SharedLibrary>
18 mir::graphics::module_for_device(std::vector<std::shared_ptr<SharedLibrary>> const& modules)
19 {
20@@ -33,21 +31,25 @@
21 {
22 try
23 {
24- auto probe = module->load_function<mir::graphics::PlatformProbe>("probe_graphics_platform",
25- MIR_SERVER_GRAPHICS_PLATFORM_VERSION);
26+ auto probe = module->load_function<PlatformProbe>(
27+ "probe_graphics_platform",
28+ MIR_SERVER_GRAPHICS_PLATFORM_VERSION);
29+
30 auto module_priority = probe();
31 if (module_priority > best_priority_so_far)
32 {
33 best_priority_so_far = module_priority;
34 best_module_so_far = module;
35 }
36+
37+ auto describe = module->load_function<DescribeModule>(
38+ "describe_graphics_module",
39+ MIR_SERVER_GRAPHICS_PLATFORM_VERSION);
40+ auto desc = describe();
41+ mir::log_info("Found graphics driver: %s", desc->name);
42 }
43- catch (std::runtime_error const& err)
44+ catch (std::runtime_error const&)
45 {
46- // Tried to probe a SharedLibrary that isn't a platform module?
47- ml::log(ml::Severity::warning,
48- std::string{"Failed to probe module. Not a platform library or incorrect ABI version? Error: "} + err.what(),
49- "Platform Probing");
50 }
51 }
52 if (best_priority_so_far > mir::graphics::unsupported)

Subscribers

People subscribed via source and target branches