summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,