summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
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])