diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-06 17:30:57 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-06 17:30:57 +0100 |
commit | 38f16b8fe49f25622161b964e1dc5b2da5dd669a (patch) | |
tree | b533f7d746492c8944de90817cc8016a8f7a8d4d | |
parent | 666bdbacbbc391cd8925f770369e375a6e4480f5 (diff) | |
download | drminfo-38f16b8fe49f25622161b964e1dc5b2da5dd669a.tar.gz |
find working fmt if unspecified
-rw-r--r-- | drmtest.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -223,7 +223,12 @@ int main(int argc, char **argv) exit(1); } } else { - fmt = &fmts[0]; + for (i = 0; i < fmtcnt; i++) { + if (!drm_probe_format(fd, &fmts[i])) + continue; + fmt = &fmts[i]; + break; + } } drm_init_dev(card, output, modename, false); |