From f1a098203be8c44a52ed5d2a72982a3f634d4df6 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 2 Jan 2017 16:42:09 +0200 Subject: 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 --- py/tests/alpha-test.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'py/tests/alpha-test.py') 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, -- cgit v1.2.3