summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6369f85)
raw | patch | inline | side by side (parent: 6369f85)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Fri, 12 Jan 2018 12:55:09 +0000 (14:55 +0200) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Fri, 12 Jan 2018 12:55:20 +0000 (14:55 +0200) |
py/tests/alpha-test.py | patch | blob | history |
diff --git a/py/tests/alpha-test.py b/py/tests/alpha-test.py
index 5873612cc31006e209b100ca50ee9a1e66df6347..9ae1539dc3688524071937084572b060e1cda881 100755 (executable)
--- a/py/tests/alpha-test.py
+++ b/py/tests/alpha-test.py
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()
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()
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,