Mir

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

Proposed by Kevin DuBois
Status: Merged
Approved by: kevin gunn
Approved revision: no longer in the source branch.
Merged at revision: 1783
Proposed branch: lp:~kdub/mir/fix-1345533
Merge into: lp:mir
Diff against target: 45 lines (+26/-1)
2 files modified
src/platform/graphics/android/hwc_common_device.cpp (+8/-1)
tests/unit-tests/graphics/android/test_hwc_common_device.cpp (+18/-0)
To merge this branch: bzr merge lp:~kdub/mir/fix-1345533
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alberto Aguirre (community) Approve
Review via email: mp+227612@code.launchpad.net

Commit message

android: do not propogate errors when initially turning on the display, as some of the rc's from the driver indicate that the display is already in the state that was requested.

fixes: lp: #1345533

Description of the change

android: do not propogate errors when initially turning on the display, as some of the rc's from the driver indicate that the display is already in the state that was requested.

fixes: lp: #1345533

To post a comment you must log in.
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

LGTM

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/platform/graphics/android/hwc_common_device.cpp'
--- src/platform/graphics/android/hwc_common_device.cpp 2014-06-25 22:34:19 +0000
+++ src/platform/graphics/android/hwc_common_device.cpp 2014-07-21 17:41:31 +0000
@@ -56,7 +56,14 @@
5656
57 hwc_device->register_hooks(&callbacks.hooks);57 hwc_device->register_hooks(&callbacks.hooks);
5858
59 turn_screen_on();59 try
60 {
61 turn_screen_on();
62 } catch (...)
63 {
64 //TODO: log failure here. some drivers will throw if the screen is already on, which
65 // is not a fatal condition
66 }
60}67}
6168
62mga::HWCCommonDevice::~HWCCommonDevice() noexcept69mga::HWCCommonDevice::~HWCCommonDevice() noexcept
6370
=== modified file 'tests/unit-tests/graphics/android/test_hwc_common_device.cpp'
--- tests/unit-tests/graphics/android/test_hwc_common_device.cpp 2014-06-25 22:34:19 +0000
+++ tests/unit-tests/graphics/android/test_hwc_common_device.cpp 2014-07-21 17:41:31 +0000
@@ -192,3 +192,21 @@
192 auto device = make_hwc_device<TypeParam>(this->mock_device, this->mock_fbdev, this->mock_vsync);192 auto device = make_hwc_device<TypeParam>(this->mock_device, this->mock_fbdev, this->mock_vsync);
193 EXPECT_FALSE(device->apply_orientation(mir_orientation_left));193 EXPECT_FALSE(device->apply_orientation(mir_orientation_left));
194}194}
195
196TYPED_TEST(HWCCommon, first_unblank_failure_is_not_fatal) //lp:1345533
197{
198 ON_CALL(*this->mock_device, display_on())
199 .WillByDefault(testing::Throw(std::runtime_error("error")));
200 EXPECT_NO_THROW({
201 auto device = make_hwc_device<TypeParam>(this->mock_device, this->mock_fbdev, this->mock_vsync);
202 });
203}
204
205TYPED_TEST(HWCCommon, first_vsync_failure_is_not_fatal) //lp:1345533
206{
207 ON_CALL(*this->mock_device, vsync_signal_on())
208 .WillByDefault(testing::Throw(std::runtime_error("error")));
209 EXPECT_NO_THROW({
210 auto device = make_hwc_device<TypeParam>(this->mock_device, this->mock_fbdev, this->mock_vsync);
211 });
212}

Subscribers

People subscribed via source and target branches