diff options
Diffstat (limited to 'py')
-rwxr-xr-x | py/tests/test.py | 25 |
1 files changed, 22 insertions, 3 deletions
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) |