summaryrefslogtreecommitdiff
path: root/utils/kmsprint.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-15 09:55:24 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-15 12:28:04 +0300
commitbb64b41891b8ede6f0e002ed72b1068597525f14 (patch)
tree7c837bf657e18597717c3ba0d9f52bb677431bd9 /utils/kmsprint.cpp
parent6927e751ddd7c833f71ad7376ec055ff40bf82a7 (diff)
testpat & kmsprint: improve mode prints
Diffstat (limited to 'utils/kmsprint.cpp')
-rw-r--r--utils/kmsprint.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/kmsprint.cpp b/utils/kmsprint.cpp
index fe1280e..e6a4be4 100644
--- a/utils/kmsprint.cpp
+++ b/utils/kmsprint.cpp
@@ -25,7 +25,7 @@ static string format_mode(const Videomode& m, unsigned idx)
str = sformat(" %2u ", idx);
if (s_opts.x_modeline) {
- str += sformat("%12s %6d %4u %4u %4u %4u %4u %4u %4u %4u %2u %#x %#x",
+ str += sformat("%12s %6u %4u %4u %4u %4u %4u %4u %4u %4u %2u %#x %#x",
m.name.c_str(),
m.clock,
m.hdisplay, m.hsync_start, m.hsync_end, m.htotal,
@@ -37,11 +37,11 @@ static string format_mode(const Videomode& m, unsigned idx)
string h = sformat("%u/%u/%u/%u", m.hdisplay, m.hfp(), m.hsw(), m.hbp());
string v = sformat("%u/%u/%u/%u", m.vdisplay, m.vfp(), m.vsw(), m.vbp());
- str += sformat("%-12s %6d %-16s %-16s %2u %#10x %#6x",
+ str += sformat("%-12s %7.3f %-16s %-16s %2u (%.2f) %#10x %#6x",
m.name.c_str(),
- m.clock,
+ m.clock / 1000.0,
h.c_str(), v.c_str(),
- m.vrefresh,
+ m.vrefresh, m.calculated_vrefresh(),
m.flags,
m.type);
}
@@ -54,11 +54,11 @@ static string format_mode_short(const Videomode& m)
string h = sformat("%u/%u/%u/%u", m.hdisplay, m.hfp(), m.hsw(), m.hbp());
string v = sformat("%u/%u/%u/%u", m.vdisplay, m.vfp(), m.vsw(), m.vbp());
- return sformat("%s %d %s %s %u",
+ return sformat("%s %.3f %s %s %u (%.2f)",
m.name.c_str(),
- m.clock,
+ m.clock / 1000.0,
h.c_str(), v.c_str(),
- m.vrefresh);
+ m.vrefresh, m.calculated_vrefresh());
}
static string format_connector(Connector& c)