summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2019-12-09 15:07:48 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2020-01-29 08:44:45 +0200
commitc3e5d3b13f9f074efe9797897ffb6429a2e8c6fe (patch)
tree35782725e2af8b0f1887e95b51cf1481207d0f9b /py
parent883b555396aecd35891e6198f2ddfb4905d313f4 (diff)
improve hpd.py
Diffstat (limited to 'py')
-rwxr-xr-xpy/tests/hpd.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/tests/hpd.py b/py/tests/hpd.py
index d26f260..185d784 100755
--- a/py/tests/hpd.py
+++ b/py/tests/hpd.py
@@ -4,8 +4,7 @@ import pyudev
import pykms
card = pykms.Card()
-res = pykms.ResourceManager(card)
-conn = res.reserve_connector("hdmi")
+conns = card.connectors
context = pyudev.Context()
@@ -16,7 +15,8 @@ monitor.filter_by('drm')
for device in iter(monitor.poll, None):
if 'HOTPLUG' in device:
- conn.refresh()
- mode = conn.get_modes()
print("HPD")
- print(mode)
+ for conn in conns:
+ conn.refresh()
+ modes = conn.get_modes()
+ print(" ", conn.fullname, ["{}x{}".format(m.hdisplay, m.vdisplay) for m in modes])