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>
main
Emil Velikov 2020-04-13 15:33:50 +01:00 committed by Emil Velikov
parent 3b9585d88e
commit d928cd803a
1 changed files with 4 additions and 8 deletions

View File

@ -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);