summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2019-01-17 17:24:49 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2019-01-17 17:24:49 +0200
commit95b49cfbb87f8c97bfeeeb36b7a0b4e2c37fe9f3 (patch)
tree4e72146610d8f716d70b929e4876a4deeeaee376
parentb13bf2e44827f9dea2149f72970239d4a7b0817b (diff)
Revert "kmstest: use open_modesetting_card"
This reverts commit c223cffa20d617863bffb0c7e3890172d93a53c8.
-rw-r--r--utils/kmstest.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp
index 79c7d1b..37f9e0f 100644
--- a/utils/kmstest.cpp
+++ b/utils/kmstest.cpp
@@ -444,7 +444,7 @@ struct Arg
string arg;
};
-static string s_device_path;
+static string s_device_path = "/dev/dri/card0";
static vector<Arg> parse_cmdline(int argc, char **argv)
{
@@ -1111,34 +1111,29 @@ int main(int argc, char **argv)
{
vector<Arg> output_args = parse_cmdline(argc, argv);
- unique_ptr<Card> card;
+ Card card(s_device_path);
- if (s_device_path.empty())
- card = Card::open_modesetting_card();
- else
- card = unique_ptr<Card>(new Card(s_device_path));
-
- if (!card->is_master())
+ if (!card.is_master())
EXIT("Could not get DRM master permission. Card already in use?");
- if (!card->has_atomic() && s_flip_sync)
+ if (!card.has_atomic() && s_flip_sync)
EXIT("Synchronized flipping requires atomic modesetting");
- ResourceManager resman(*card);
+ ResourceManager resman(card);
- vector<OutputInfo> outputs = setups_to_outputs(*card, resman, output_args);
+ vector<OutputInfo> outputs = setups_to_outputs(card, resman, output_args);
if (!s_flip_mode)
draw_test_patterns(outputs);
print_outputs(outputs);
- set_crtcs_n_planes(*card, outputs);
+ set_crtcs_n_planes(card, outputs);
printf("press enter to exit\n");
if (s_flip_mode)
- main_flip(*card, outputs);
+ main_flip(card, outputs);
else
getchar();
}