summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2018-10-23 18:00:42 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2019-01-11 11:31:01 +0200
commitc0093c91f0fa2fd6a5b9d1b206a6f44dcd55bfb5 (patch)
tree6bccefa502f8b8df074b88abde000e7402edfcd7 /utils
parent9e00ebdce5866b8f5b8562a9281fafe7b1f5d23f (diff)
kmstest: show sync polarities
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/kmstest.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp
index 698ad25..37f9e0f 100644
--- a/utils/kmstest.cpp
+++ b/utils/kmstest.cpp
@@ -691,10 +691,22 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman,
return outputs;
}
+static char sync_to_char(SyncPolarity pol)
+{
+ switch (pol) {
+ case SyncPolarity::Positive:
+ return '+';
+ case SyncPolarity::Negative:
+ return '-';
+ default:
+ return '?';
+ }
+}
+
static std::string videomode_to_string(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());
+ string h = sformat("%u/%u/%u/%u/%c", m.hdisplay, m.hfp(), m.hsw(), m.hbp(), sync_to_char(m.hsync()));
+ string v = sformat("%u/%u/%u/%u/%c", m.vdisplay, m.vfp(), m.vsw(), m.vbp(), sync_to_char(m.vsync()));
return sformat("%s %.3f %s %s %u (%.2f) %#x %#x",
m.name.c_str(),