summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2020-04-13 15:33:50 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2020-05-19 21:09:35 +0100
commitd928cd803acc814ac743d6a294d9534ac1ddabaf (patch)
treee71f5f70dcfc4de60f296cd53469588878846df0
parent3b9585d88e0b31a1953e8f553b7ccf62851fe31f (diff)
downloadexternal_libdrm-d928cd803acc814ac743d6a294d9534ac1ddabaf.tar.gz
external_libdrm-d928cd803acc814ac743d6a294d9534ac1ddabaf.tar.bz2
external_libdrm-d928cd803acc814ac743d6a294d9534ac1ddabaf.zip
modetest: push pipe_resolve_connectors() to set_mode
The function is closely related to pipe_find_crtc_and_mode() so we might as well keep them together. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-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);