summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2018-09-03 18:11:10 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-10-10 16:43:14 +0300
commit0d35b02a6676150258166da5a5ad4302cb058e51 (patch)
tree07beb42c55872be5ee5fefc6cd198d6801951465
parent9b15c9fc2aa520e9c8ca789d8e096933cdaf2a8b (diff)
plane_csc.py: do not assume HDMI output and other improvements
-rwxr-xr-xpy/tests/plane_csc.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/py/tests/plane_csc.py b/py/tests/plane_csc.py
index f810627..5e6c6b5 100755
--- a/py/tests/plane_csc.py
+++ b/py/tests/plane_csc.py
@@ -4,12 +4,11 @@ import pykms
card = pykms.Card()
res = pykms.ResourceManager(card)
-conn = res.reserve_connector("HDMI")
+conn = res.reserve_connector("")
crtc = res.reserve_crtc(conn)
mode = conn.get_default_mode()
modeb = mode.to_blob(card)
plane = res.reserve_generic_plane(crtc, pykms.PixelFormat.UYVY)
-#plane = res.reserve_generic_plane(crtc, pykms.PixelFormat.Undefined)
print("Got plane %d %d" % (plane.idx, plane.id))
@@ -27,17 +26,7 @@ r = req.commit_sync(allow_modeset = True)
input("Press enter to enable plane idx %d at %s" % (plane.idx, conn.fullname))
req = pykms.AtomicReq(card)
-req.add(plane, {"FB_ID": fb.id,
- "CRTC_ID": crtc.id,
- "SRC_X": 0 << 16,
- "SRC_Y": 0 << 16,
- "SRC_W": fb.width << 16,
- "SRC_H": fb.height << 16,
- "CRTC_X": 0,
- "CRTC_Y": 0,
- "CRTC_W": fb.width,
- "CRTC_H": fb.height,
- "zpos": 0})
+req.add_plane(plane, fb, crtc)
r = req.commit_sync()
print("Plane enable request returned %d\n" % r)