Mir

Merge lp:~kdub/mir/fix-1615703 into lp:mir

Proposed by Kevin DuBois on 2016-08-22
Status: Merged
Merged at revision: 3662
Proposed branch: lp:~kdub/mir/fix-1615703
Merge into: lp:mir
Diff against target: 141 lines (+14/-55)
2 files modified
src/platforms/android/server/hal_component_factory.cpp (+3/-28)
tests/unit-tests/platforms/android/server/test_output_builder.cpp (+11/-27)
To merge this branch: bzr merge lp:~kdub/mir/fix-1615703
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing on 2016-08-23
Daniel van Vugt 2016-08-22 Approve on 2016-08-23
Review via email: mp+303596@code.launchpad.net

Commit message

backout rev 3650 so that newer PowerVR devices (like mx4) don't try to close the old FB module (which segfaults when trying to close).

Seeing as how its better to just load the fb module for devices that actually need this, We should have a quirk for devices that need this (probably just omap devices)

fixes: LP: #1615703

Description of the change

backout rev 3650 so that newer PowerVR devices (like mx4) don't try to close the old FB module (which segfaults when trying to close).

Seeing as how its better to just load the fb module for devices that actually need this, We should have a quirk for devices that need this (probably just omap devices)

fixes: LP: #1615703

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3661
https://mir-jenkins.ubuntu.com/job/mir-ci/1504/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/1873/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/1933
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1924
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1924
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1924
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/1897
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/1897/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1897
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1897/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/1897
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/1897/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1897/console
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1897/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/1897
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/1897/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1897
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1897/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/1504/rebuild

review: Needs Fixing (continuous-integration)
Daniel van Vugt (vanvugt) wrote :

Looks like a clean revert.

review: Approve
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/531/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/1888/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/567/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/1948
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1939
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1939
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1939
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/1912/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1912
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1912/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/1912/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1912
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1912/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/1912
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/1912/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1912
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1912/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platforms/android/server/hal_component_factory.cpp'
2--- src/platforms/android/server/hal_component_factory.cpp 2016-08-14 10:00:08 +0000
3+++ src/platforms/android/server/hal_component_factory.cpp 2016-08-22 16:39:58 +0000
4@@ -50,16 +50,6 @@
5 working_egl_sync(quirks->working_egl_sync()),
6 hwc_version{mga::HwcVersion::unknown}
7 {
8- bool fb_native_failed_to_load = false;
9-
10- try
11- {
12- fb_native = res_factory->create_fb_native_device();
13- } catch (...)
14- {
15- fb_native_failed_to_load = true;
16- }
17-
18 try
19 {
20 std::tie(hwc_wrapper, hwc_version) = res_factory->create_hwc_wrapper(hwc_report);
21@@ -71,24 +61,9 @@
22
23 if (force_backup_display || hwc_version == mga::HwcVersion::hwc10)
24 {
25- //We're using FB HAL
26- if (fb_native_failed_to_load)
27- {
28- BOOST_THROW_EXCEPTION(std::runtime_error("fb display is mandory but failed to create one"));
29- }
30- else
31- {
32- //get framebuffers amount from FB HAL but guarantee always 2 fb's allocated
33- num_framebuffers = std::max(2u, static_cast<unsigned int>(fb_native->numFramebuffers));
34- }
35- }
36- else
37- {
38- if (!fb_native_failed_to_load)
39- {
40- //Close FB HAL as we don't need it.
41- fb_native.reset(); //This will close the FB HAL via destructor
42- }
43+ fb_native = res_factory->create_fb_native_device();
44+ //guarantee always 2 fb's allocated
45+ num_framebuffers = std::max(2u, static_cast<unsigned int>(fb_native->numFramebuffers));
46 }
47
48 command_stream_sync_factory = create_command_stream_sync_factory();
49
50=== modified file 'tests/unit-tests/platforms/android/server/test_output_builder.cpp'
51--- tests/unit-tests/platforms/android/server/test_output_builder.cpp 2016-08-14 10:00:08 +0000
52+++ tests/unit-tests/platforms/android/server/test_output_builder.cpp 2016-08-22 16:39:58 +0000
53@@ -94,12 +94,9 @@
54 TEST_F(HalComponentFactory, builds_hwc_version_10)
55 {
56 using namespace testing;
57- Sequence seq;
58- EXPECT_CALL(*mock_resource_factory, create_fb_native_device())
59- .InSequence(seq);
60 EXPECT_CALL(*mock_resource_factory, create_hwc_wrapper(_))
61- .InSequence(seq)
62 .WillOnce(Return(std::make_tuple(mock_wrapper, mga::HwcVersion::hwc10)));
63+ EXPECT_CALL(*mock_resource_factory, create_fb_native_device());
64 EXPECT_CALL(*mock_hwc_report, report_hwc_version(mga::HwcVersion::hwc10));
65
66 mga::HalComponentFactory factory(
67@@ -112,11 +109,7 @@
68 TEST_F(HalComponentFactory, builds_hwc_version_11_and_later)
69 {
70 using namespace testing;
71- Sequence seq;
72- EXPECT_CALL(*mock_resource_factory, create_fb_native_device())
73- .InSequence(seq);
74 EXPECT_CALL(*mock_resource_factory, create_hwc_wrapper(_))
75- .InSequence(seq)
76 .WillOnce(Return(std::make_tuple(mock_wrapper, mga::HwcVersion::hwc11)));
77 EXPECT_CALL(*mock_hwc_report, report_hwc_version(mga::HwcVersion::hwc11));
78
79@@ -144,12 +137,9 @@
80 TEST_F(HalComponentFactory, hwc_failure_falls_back_to_fb)
81 {
82 using namespace testing;
83- Sequence seq;
84- EXPECT_CALL(*mock_resource_factory, create_fb_native_device())
85- .InSequence(seq);
86 EXPECT_CALL(*mock_resource_factory, create_hwc_wrapper(_))
87- .InSequence(seq)
88 .WillOnce(Throw(std::runtime_error("")));
89+ EXPECT_CALL(*mock_resource_factory, create_fb_native_device());
90 EXPECT_CALL(*mock_hwc_report, report_legacy_fb_module());
91
92 mga::HalComponentFactory factory(
93@@ -162,12 +152,9 @@
94 TEST_F(HalComponentFactory, hwc_and_fb_failure_fatal)
95 {
96 using namespace testing;
97- Sequence seq;
98+ EXPECT_CALL(*mock_resource_factory, create_hwc_wrapper(_))
99+ .WillOnce(Throw(std::runtime_error("")));
100 EXPECT_CALL(*mock_resource_factory, create_fb_native_device())
101- .InSequence(seq)
102- .WillOnce(Throw(std::runtime_error("")));
103- EXPECT_CALL(*mock_resource_factory, create_hwc_wrapper(_))
104- .InSequence(seq)
105 .WillOnce(Throw(std::runtime_error("")));
106
107 EXPECT_THROW({
108@@ -182,14 +169,11 @@
109 TEST_F(HalComponentFactory, determine_fbnum_always_reports_2_minimum)
110 {
111 using namespace testing;
112- Sequence seq;
113+ EXPECT_CALL(*mock_resource_factory, create_hwc_wrapper(_))
114+ .WillOnce(Throw(std::runtime_error("")));
115 EXPECT_CALL(*mock_resource_factory, create_fb_native_device())
116- .InSequence(seq)
117 .WillOnce(Return(std::make_shared<mtd::MockFBHalDevice>(
118 0, 0, mir_pixel_format_abgr_8888, 0, 0.0, 0.0)));
119- EXPECT_CALL(*mock_resource_factory, create_hwc_wrapper(_))
120- .InSequence(seq)
121- .WillOnce(Throw(std::runtime_error("")));
122
123 mga::HalComponentFactory factory(
124 mock_resource_factory,
125@@ -208,11 +192,11 @@
126 {
127 using namespace testing;
128 auto supported_versions = {
129- mga::HwcVersion::hwc10,
130- mga::HwcVersion::hwc11,
131- mga::HwcVersion::hwc12,
132- mga::HwcVersion::hwc13,
133- mga::HwcVersion::hwc14,
134+ mga::HwcVersion::hwc10,
135+ mga::HwcVersion::hwc11,
136+ mga::HwcVersion::hwc12,
137+ mga::HwcVersion::hwc13,
138+ mga::HwcVersion::hwc14,
139 mga::HwcVersion::hwc15 };
140 for (auto supported_version : supported_versions)
141 {

Subscribers

People subscribed via source and target branches