summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2016-10-31 20:40:34 -0400
committerRobert Foss <robert.foss@collabora.com>2017-03-22 14:38:43 -0400
commit91a26fd9f3a9f15d4d61c3d9eec0fb5f9535aa42 (patch)
tree5bffef64347864eb45c53ec8000d1f8828000339
parent4424da9f3247a1709ba3c29dd7ad4d80fa167820 (diff)
downloaddrm_hwcomposer-91a26fd9f3a9f15d4d61c3d9eec0fb5f9535aa42.tar.gz
drm_hwcomposer-91a26fd9f3a9f15d4d61c3d9eec0fb5f9535aa42.tar.xz
drm_hwcomposer: Work around android fail with multiple modes
When supplied with muliple modes, just select the first mode. Change-Id: I08cef186b4c08b9c5e993726b731f98929a2fb39 Signed-off-by: Robert Foss <robert.foss@collabora.com>
-rw-r--r--drmconnector.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/drmconnector.cpp b/drmconnector.cpp
index ccb38e2..38b4f9b 100644
--- a/drmconnector.cpp
+++ b/drmconnector.cpp
@@ -86,6 +86,11 @@ int DrmConnector::UpdateModes() {
std::vector<DrmMode> new_modes;
for (int i = 0; i < c->count_modes; ++i) {
bool exists = false;
+
+ // TODO: In case of multiple modes, this just picks the first one
+ if (i > 0)
+ break;
+
for (const DrmMode &mode : modes_) {
if (mode == c->modes[i]) {
new_modes.push_back(mode);