summaryrefslogtreecommitdiff
path: root/py/tests/alpha-test.py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2017-01-02 16:42:09 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-01-03 10:46:42 +0200
commitf1a098203be8c44a52ed5d2a72982a3f634d4df6 (patch)
treec916f481fb22a3002d56541346b15532fe46da83 /py/tests/alpha-test.py
parentb11baff09f78a4a383f817ec35208ae8966ab832 (diff)
py: Move helpers to the pykms module
Instead of forcing applications to import the helpers manually, move them to pykms by turning it into a python module. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'py/tests/alpha-test.py')
-rwxr-xr-xpy/tests/alpha-test.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/py/tests/alpha-test.py b/py/tests/alpha-test.py
index c6ec8ee..5873612 100755
--- a/py/tests/alpha-test.py
+++ b/py/tests/alpha-test.py
@@ -1,7 +1,6 @@
#!/usr/bin/python3
import pykms
-from helpers import *
import time
# This hack makes drm initialize the fbcon, setting up the default connector
@@ -24,7 +23,7 @@ if len(planes) != 3:
print("Need 3 planes!")
exit(1)
-disable_planes(card)
+card.disable_planes()
w = mode.hdisplay
h = mode.vdisplay
@@ -39,7 +38,7 @@ 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))
-set_props(crtc, {
+crtc.set_props({
"trans-key-mode": 0,
"trans-key": 0,
"background": 0,
@@ -52,7 +51,7 @@ for i in range(len(planes)):
print("set crtc {}, plane {}, fb {}".format(crtc.id, p.id, fbs[i].id))
- set_props(plane, {
+ plane.set_props({
"FB_ID": fb.id,
"CRTC_ID": crtc.id,
"SRC_W": fb.width << 16,