From bddac89707f53eb4f15386819faa2b76d590da21 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 10 Feb 2017 11:15:35 +0200 Subject: test.py: add dmabuf & omap options --- py/tests/test.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'py') diff --git a/py/tests/test.py b/py/tests/test.py index de00a43..b11add7 100755 --- a/py/tests/test.py +++ b/py/tests/test.py @@ -2,14 +2,33 @@ import pykms -card = pykms.Card() +# draw test pattern via dmabuf? +dmabuf = False + +# Use omap? +omap = False + +if omap: + card = pykms.OmapCard() +else: + card = pykms.Card() + res = pykms.ResourceManager(card) conn = res.reserve_connector() crtc = res.reserve_crtc(conn) - mode = conn.get_default_mode() -fb = pykms.DumbFramebuffer(card, mode.hdisplay, mode.vdisplay, "XR24"); +if omap: + origfb = pykms.OmapFramebuffer(card, mode.hdisplay, mode.vdisplay, "XR24"); +else: + origfb = pykms.DumbFramebuffer(card, mode.hdisplay, mode.vdisplay, "XR24"); + +if dmabuf: + fb = pykms.ExtFramebuffer(card, origfb.width, origfb.height, origfb.format, + [origfb.fd(0)], [origfb.stride(0)], [origfb.offset(0)]) +else: + fb = origfb + pykms.draw_test_pattern(fb); crtc.set_mode(conn, fb, mode) -- cgit v1.2.3