summaryrefslogtreecommitdiff
path: root/py/tests
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-05-31 12:42:51 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-05-31 12:42:51 +0300
commit719f72a065f07c59e77a25b1f23daccb5369cf81 (patch)
tree3bea5568bf01d4b834672e6a53bc98721da9bf00 /py/tests
parent21bc24b7aee138bd1f43a11eb8b86e96039fdacf (diff)
cam.py: fix initial modeset
Diffstat (limited to 'py/tests')
-rwxr-xr-xpy/tests/cam.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/py/tests/cam.py b/py/tests/cam.py
index 57d0c1a..c813b2f 100755
--- a/py/tests/cam.py
+++ b/py/tests/cam.py
@@ -8,11 +8,6 @@ w = 640
h = 480
fmt = pykms.PixelFormat.YUYV
-
-# This hack makes drm initialize the fbcon, setting up the default connector
-card = pykms.Card()
-card = 0
-
card = pykms.Card()
res = pykms.ResourceManager(card)
conn = res.reserve_connector()
@@ -20,6 +15,13 @@ crtc = res.reserve_crtc(conn)
plane = res.reserve_overlay_plane(crtc, fmt)
mode = conn.get_default_mode()
+modeb = mode.to_blob(card)
+
+req = pykms.AtomicReq(card)
+req.add(conn, "CRTC_ID", crtc.id)
+req.add(crtc, {"ACTIVE": 1,
+ "MODE_ID": modeb.id})
+req.commit_sync(allow_modeset = True)
NUM_BUFS = 5