summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2018-01-12 14:55:09 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-01-12 14:55:20 +0200
commit4ddd0d2ea64b452dbf2c6670356a29c3e05ff047 (patch)
treeccf63bc4f376777276cd1e0da8b3f2fe8c4eff3a
parent6369f85fe85e7121472490c37e84ca50a59cebf0 (diff)
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 @@
import pykms
import time
-# This hack makes drm initialize the fbcon, setting up the default connector
-card = pykms.Card()
-card = 0
-
card = pykms.Card()
res = pykms.ResourceManager(card)
conn = res.reserve_connector()
@@ -14,14 +10,15 @@ crtc = res.reserve_crtc(conn)
mode = conn.get_default_mode()
planes = []
-for p in card.planes:
- if p.supports_crtc(crtc) == False:
- continue
- planes.append(p)
-if len(planes) != 3:
- print("Need 3 planes!")
- exit(1)
+for i in range(3):
+ p = res.reserve_generic_plane(crtc)
+
+ if p == None:
+ print("Need 3 planes!")
+ exit(1)
+
+ planes.append(p)
card.disable_planes()
@@ -37,7 +34,6 @@ pykms.draw_rect(fbs[0], 50, 50, 200, 200, pykms.RGB(128, 255, 0, 0))
pykms.draw_rect(fbs[1], 150, 50, 200, 200, pykms.RGB(128, 0, 255, 0))
pykms.draw_rect(fbs[2], 50, 150, 200, 200, pykms.RGB(128, 0, 0, 255))
-
crtc.set_props({
"trans-key-mode": 0,
"trans-key": 0,