From 0d35b02a6676150258166da5a5ad4302cb058e51 Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Mon, 3 Sep 2018 18:11:10 +0300 Subject: plane_csc.py: do not assume HDMI output and other improvements --- py/tests/plane_csc.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'py/tests/plane_csc.py') 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) -- cgit v1.2.3