summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/modetest/modetest.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index b08cb7897..4e7026f41 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -1437,6 +1437,10 @@ static void set_mode(struct device *dev, struct pipe_arg *pipes, unsigned int co
for (i = 0; i < count; i++) {
struct pipe_arg *pipe = &pipes[i];
+ ret = pipe_resolve_connectors(dev, pipe);
+ if (ret < 0)
+ return;
+
ret = pipe_find_crtc_and_mode(dev, pipe);
if (ret < 0)
continue;
@@ -1993,14 +1997,6 @@ int main(int argc, char **argv)
return 1;
}
- for (i = 0; i < count; i++) {
- if (pipe_resolve_connectors(&dev, &pipe_args[i]) < 0) {
- free_resources(dev.resources);
- drmClose(dev.fd);
- return 1;
- }
- }
-
#define dump_resource(dev, res) if (res) dump_##res(dev)
dump_resource(&dev, encoders);