From c02a6e019ef4f2a77fcbde67a720221c7f37225e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 2 Mar 2017 21:47:36 +0200 Subject: py: db.py: Add command line argument to specify connector When a command line argument is present, its value is used as a connector name that the script will try to use. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- py/tests/db.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py/tests/db.py b/py/tests/db.py index f0a962d..eb31669 100755 --- a/py/tests/db.py +++ b/py/tests/db.py @@ -56,10 +56,14 @@ class FlipHandler(pykms.PageFlipHandlerBase): else: crtc.page_flip(fb, self) +if len(sys.argv) > 1: + conn_name = sys.argv[1] +else: + conn_name = '' card = pykms.Card() res = pykms.ResourceManager(card) -conn = res.reserve_connector() +conn = res.reserve_connector(conn_name) crtc = res.reserve_crtc(conn) mode = conn.get_default_mode() -- cgit v1.2.3