diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-02-10 11:15:35 +0200 | 
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-02-10 11:15:35 +0200 | 
| commit | bddac89707f53eb4f15386819faa2b76d590da21 (patch) | |
| tree | 39a3996f6bed5fe79d18c945efe46553df5324c2 /py/tests | |
| parent | f52f3746b034ce6ca0069205c7106ab684c002e1 (diff) | |
test.py: add dmabuf & omap options
Diffstat (limited to 'py/tests')
| -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) | 
