aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen2018-01-12 06:55:09 -0600
committerTomi Valkeinen2018-01-12 06:55:20 -0600
commit4ddd0d2ea64b452dbf2c6670356a29c3e05ff047 (patch)
treeccf63bc4f376777276cd1e0da8b3f2fe8c4eff3a
parent6369f85fe85e7121472490c37e84ca50a59cebf0 (diff)
downloadexternal-libkmsxx-4ddd0d2ea64b452dbf2c6670356a29c3e05ff047.tar.gz
external-libkmsxx-4ddd0d2ea64b452dbf2c6670356a29c3e05ff047.tar.xz
external-libkmsxx-4ddd0d2ea64b452dbf2c6670356a29c3e05ff047.zip
alpha-test.py: fix
-rwxr-xr-xpy/tests/alpha-test.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/py/tests/alpha-test.py b/py/tests/alpha-test.py
index 5873612..9ae1539 100755
--- a/py/tests/alpha-test.py
+++ b/py/tests/alpha-test.py
@@ -3,10 +3,6 @@
3import pykms 3import pykms
4import time 4import time
5 5
6# This hack makes drm initialize the fbcon, setting up the default connector
7card = pykms.Card()
8card = 0
9
10card = pykms.Card() 6card = pykms.Card()
11res = pykms.ResourceManager(card) 7res = pykms.ResourceManager(card)
12conn = res.reserve_connector() 8conn = res.reserve_connector()
@@ -14,14 +10,15 @@ crtc = res.reserve_crtc(conn)
14mode = conn.get_default_mode() 10mode = conn.get_default_mode()
15 11
16planes = [] 12planes = []
17for p in card.planes:
18 if p.supports_crtc(crtc) == False:
19 continue
20 planes.append(p)
21 13
22if len(planes) != 3: 14for i in range(3):
23 print("Need 3 planes!") 15 p = res.reserve_generic_plane(crtc)
24 exit(1) 16
17 if p == None:
18 print("Need 3 planes!")
19 exit(1)
20
21 planes.append(p)
25 22
26card.disable_planes() 23card.disable_planes()
27 24
@@ -37,7 +34,6 @@ pykms.draw_rect(fbs[0], 50, 50, 200, 200, pykms.RGB(128, 255, 0, 0))
37pykms.draw_rect(fbs[1], 150, 50, 200, 200, pykms.RGB(128, 0, 255, 0)) 34pykms.draw_rect(fbs[1], 150, 50, 200, 200, pykms.RGB(128, 0, 255, 0))
38pykms.draw_rect(fbs[2], 50, 150, 200, 200, pykms.RGB(128, 0, 0, 255)) 35pykms.draw_rect(fbs[2], 50, 150, 200, 200, pykms.RGB(128, 0, 0, 255))
39 36
40
41crtc.set_props({ 37crtc.set_props({
42 "trans-key-mode": 0, 38 "trans-key-mode": 0,
43 "trans-key": 0, 39 "trans-key": 0,