Merge lp:~robert-ancell/mir/gbm-check-connections into lp:~mir-team/mir/trunk
Proposed by
Robert Ancell
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Robert Ancell | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 833 | ||||
Proposed branch: | lp:~robert-ancell/mir/gbm-check-connections | ||||
Merge into: | lp:~mir-team/mir/trunk | ||||
Diff against target: |
163 lines (+58/-12) 5 files modified
src/server/graphics/gbm/gbm_display_helpers.cpp (+20/-2) src/server/graphics/gbm/gbm_display_helpers.h (+2/-0) tests/unit-tests/graphics/gbm/test_gbm_display.cpp (+4/-2) tests/unit-tests/graphics/gbm/test_gbm_display_configuration.cpp (+16/-8) tests/unit-tests/graphics/gbm/test_gbm_platform.cpp (+16/-0) |
||||
To merge this branch: | bzr merge lp:~robert-ancell/mir/gbm-check-connections | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandros Frantzis (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Alan Griffiths | Abstain | ||
Review via email: mp+172982@code.launchpad.net |
Commit message
Only use a DRM device if it has connections
Description of the change
Pick the first DRM device that has connections.
I'm least sure about the testing changes, but I discussed then with Alexandros on a hangout and I think they match what he expected.
To post a comment you must log in.
8 +int mggh::DRMHelper ::count_ connections( int fd)
In drm_mode_ resources. h we have a class DRMModeResources for dealing with resources in a more elegant and safe way. We should use it here. See kms_display_ configuration. cpp for an example of how to use it.
72 - EXPECT_ CALL(mock_ drm, drmModeFreeReso urces(_ )) CALL(mock_ drm, drmClose(_))
73 - .Times(Exactly(0));
74 -
75 - EXPECT_
76 - .Times(Exactly(1));
We should keep these. They check that we handle failure gracefully (i.e., that we don't try to free null resources, and that we shut down drm properly).