diff options
author | Tomi Valkeinen | 2017-02-07 05:43:19 -0600 |
---|---|---|
committer | Tomi Valkeinen | 2017-02-10 02:42:44 -0600 |
commit | 3fb72a77fa1d2fc5c685109eb7bd4b791a863d4f (patch) | |
tree | b4ca6a77503dcaca60f55091f7f44ef264bd110e /utils | |
parent | 05009c91478ca2a8790a758ed0bd218e5f4dffb8 (diff) | |
download | external-kmsxx-3fb72a77fa1d2fc5c685109eb7bd4b791a863d4f.tar.gz external-kmsxx-3fb72a77fa1d2fc5c685109eb7bd4b791a863d4f.tar.xz external-kmsxx-3fb72a77fa1d2fc5c685109eb7bd4b791a863d4f.zip |
kmstest: remove get_default_connector()
Diffstat (limited to 'utils')
-rw-r--r-- | utils/kmstest.cpp | 16 |
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) | |||
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
70 | static void get_default_connector(Card& card, OutputInfo& output) | 70 | static void get_connector(ResourceManager& resman, OutputInfo& output, const string& str = "") |
71 | { | ||
72 | output.connector = card.get_first_connected_connector(); | ||
73 | output.mode = output.connector->get_default_mode(); | ||
74 | } | ||
75 | |||
76 | static void parse_connector(Card& card, ResourceManager& resman, const string& str, OutputInfo& output) | ||
77 | { | 71 | { |
78 | Connector* conn = resman.reserve_connector(str); | 72 | Connector* conn = resman.reserve_connector(str); |
79 | 73 | ||
@@ -521,7 +515,7 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman, | |||
521 | outputs.push_back(OutputInfo { }); | 515 | outputs.push_back(OutputInfo { }); |
522 | current_output = &outputs.back(); | 516 | current_output = &outputs.back(); |
523 | 517 | ||
524 | parse_connector(card, resman, arg.arg, *current_output); | 518 | get_connector(resman, *current_output, arg.arg); |
525 | current_plane = 0; | 519 | current_plane = 0; |
526 | 520 | ||
527 | break; | 521 | break; |
@@ -535,7 +529,7 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman, | |||
535 | } | 529 | } |
536 | 530 | ||
537 | if (!current_output->connector) | 531 | if (!current_output->connector) |
538 | get_default_connector(card, *current_output); | 532 | get_connector(resman, *current_output); |
539 | 533 | ||
540 | parse_crtc(card, arg.arg, *current_output); | 534 | parse_crtc(card, arg.arg, *current_output); |
541 | 535 | ||
@@ -554,7 +548,7 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman, | |||
554 | } | 548 | } |
555 | 549 | ||
556 | if (!current_output->connector) | 550 | if (!current_output->connector) |
557 | get_default_connector(card, *current_output); | 551 | get_connector(resman, *current_output); |
558 | 552 | ||
559 | if (!current_output->crtc) | 553 | if (!current_output->crtc) |
560 | get_default_crtc(card, *current_output); | 554 | get_default_crtc(card, *current_output); |
@@ -575,7 +569,7 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman, | |||
575 | } | 569 | } |
576 | 570 | ||
577 | if (!current_output->connector) | 571 | if (!current_output->connector) |
578 | get_default_connector(card, *current_output); | 572 | get_connector(resman, *current_output); |
579 | 573 | ||
580 | if (!current_output->crtc) | 574 | if (!current_output->crtc) |
581 | get_default_crtc(card, *current_output); | 575 | get_default_crtc(card, *current_output); |