aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen2017-09-05 03:01:17 -0500
committerTomi Valkeinen2017-09-05 03:15:28 -0500
commit95de32aa7fbb1a2da547418b296f649ee4be1feb (patch)
tree50f81d2afc63357e7cfc18e2b23b1cd67e977a72 /py/tests/modeset_event.py
parentd6300fcfb0bc420ff30a6c8f44f9b5fe862cdb3d (diff)
downloadexternal-kmsxx-95de32aa7fbb1a2da547418b296f649ee4be1feb.tar.gz
external-kmsxx-95de32aa7fbb1a2da547418b296f649ee4be1feb.tar.xz
external-kmsxx-95de32aa7fbb1a2da547418b296f649ee4be1feb.zip
py: drop the fancy event handling
Unfortunately the nice event handler added previously doesn't work: we may get multiple page-flip events, which would lead to unref'ing the passed python object multiple times, leading to memory corruption. I guess it's only possible to pass a plain int as user data to commit() and page_flip().
Diffstat (limited to 'py/tests/modeset_event.py')
-rwxr-xr-xpy/tests/modeset_event.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/tests/modeset_event.py b/py/tests/modeset_event.py
index 0957e51..11cfd58 100755
--- a/py/tests/modeset_event.py
+++ b/py/tests/modeset_event.py
@@ -6,7 +6,7 @@ import sys
6 6
7def readdrm(fileobj, mask): 7def readdrm(fileobj, mask):
8 for ev in card.read_events(): 8 for ev in card.read_events():
9 ev.data(ev) 9 eventhandler(ev)
10 10
11def waitevent(sel): 11def waitevent(sel):
12 events = sel.select(1) 12 events = sel.select(1)
@@ -67,7 +67,7 @@ if ret != 0:
67 print("Atomic test failed: %d" % ret) 67 print("Atomic test failed: %d" % ret)
68 sys.exit() 68 sys.exit()
69 69
70req.commit(eventhandler, allow_modeset = True) 70req.commit(0, allow_modeset = True)
71waitevent(sel) 71waitevent(sel)
72 72
73input("press enter to exit\n") 73input("press enter to exit\n")