summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-02-07 13:43:19 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-02-10 10:42:44 +0200
commit3fb72a77fa1d2fc5c685109eb7bd4b791a863d4f (patch)
treeb4ca6a77503dcaca60f55091f7f44ef264bd110e /utils
parent05009c91478ca2a8790a758ed0bd218e5f4dffb8 (diff)
kmstest: remove get_default_connector()
Diffstat (limited to 'utils')
-rw-r--r--utils/kmstest.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp
index 3fb4b28..cd0fc1a 100644
--- a/utils/kmstest.cpp
+++ b/utils/kmstest.cpp
@@ -67,13 +67,7 @@ static void print_regex_match(smatch sm)
}
}
-static void get_default_connector(Card& card, OutputInfo& output)
-{
- output.connector = card.get_first_connected_connector();
- output.mode = output.connector->get_default_mode();
-}
-
-static void parse_connector(Card& card, ResourceManager& resman, const string& str, OutputInfo& output)
+static void get_connector(ResourceManager& resman, OutputInfo& output, const string& str = "")
{
Connector* conn = resman.reserve_connector(str);
@@ -521,7 +515,7 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman,
outputs.push_back(OutputInfo { });
current_output = &outputs.back();
- parse_connector(card, resman, arg.arg, *current_output);
+ get_connector(resman, *current_output, arg.arg);
current_plane = 0;
break;
@@ -535,7 +529,7 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman,
}
if (!current_output->connector)
- get_default_connector(card, *current_output);
+ get_connector(resman, *current_output);
parse_crtc(card, arg.arg, *current_output);
@@ -554,7 +548,7 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman,
}
if (!current_output->connector)
- get_default_connector(card, *current_output);
+ get_connector(resman, *current_output);
if (!current_output->crtc)
get_default_crtc(card, *current_output);
@@ -575,7 +569,7 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman,
}
if (!current_output->connector)
- get_default_connector(card, *current_output);
+ get_connector(resman, *current_output);
if (!current_output->crtc)
get_default_crtc(card, *current_output);