aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen2017-05-31 04:42:51 -0500
committerTomi Valkeinen2017-05-31 04:42:51 -0500
commit719f72a065f07c59e77a25b1f23daccb5369cf81 (patch)
tree3bea5568bf01d4b834672e6a53bc98721da9bf00
parent21bc24b7aee138bd1f43a11eb8b86e96039fdacf (diff)
downloadexternal-kmsxx-719f72a065f07c59e77a25b1f23daccb5369cf81.tar.gz
external-kmsxx-719f72a065f07c59e77a25b1f23daccb5369cf81.tar.xz
external-kmsxx-719f72a065f07c59e77a25b1f23daccb5369cf81.zip
cam.py: fix initial modeset
-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
8h = 480 8h = 480
9fmt = pykms.PixelFormat.YUYV 9fmt = pykms.PixelFormat.YUYV
10 10
11
12# This hack makes drm initialize the fbcon, setting up the default connector
13card = pykms.Card()
14card = 0
15
16card = pykms.Card() 11card = pykms.Card()
17res = pykms.ResourceManager(card) 12res = pykms.ResourceManager(card)
18conn = res.reserve_connector() 13conn = res.reserve_connector()
@@ -20,6 +15,13 @@ crtc = res.reserve_crtc(conn)
20plane = res.reserve_overlay_plane(crtc, fmt) 15plane = res.reserve_overlay_plane(crtc, fmt)
21 16
22mode = conn.get_default_mode() 17mode = conn.get_default_mode()
18modeb = mode.to_blob(card)
19
20req = pykms.AtomicReq(card)
21req.add(conn, "CRTC_ID", crtc.id)
22req.add(crtc, {"ACTIVE": 1,
23 "MODE_ID": modeb.id})
24req.commit_sync(allow_modeset = True)
23 25
24NUM_BUFS = 5 26NUM_BUFS = 5
25 27