From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: ANNOUNCE: introcuding kmsxx, tests and python wrappers Date: Mon, 30 Nov 2015 17:54:33 +0200 Message-ID: <565C7139.3000005@ti.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2120714432==" Return-path: Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id CCB546E36A for ; Mon, 30 Nov 2015 07:54:40 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: DRI Development Cc: Daniel Vetter , Laurent Pinchart , "Sarha, Jyri" List-Id: dri-devel@lists.freedesktop.org --===============2120714432== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TpEhSejbtoBh089auaM0JQS6R0hvFJgWg" --TpEhSejbtoBh089auaM0JQS6R0hvFJgWg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Here's something we've been working on and using on our environment, and I think it's now in a state where others may find it usable too: https://github.com/tomba/kmsxx libkmsxx is a small C++11 library for kernel mode setting. It tries to implement as little extra as possible while bringing the kms API in a C++ form to the user. It only implements a subset of what libdrm supports= =2E The repository also contains small utils, test tools and python wrappers.= The focus with libkmsxx has been mainly on testing, enabling us to write small test apps easily by minimizing the amount of code needed to do KMS operations, and to write python scripts to do tests which can easily be modified. The code is definitely not production quality code, but we've tried to keep the code clean. At the moment we have these tests/utils: kmsprint - print information about DRM objects testpat - set modes and show test pattern on crtcs/planes kmsview - view raw images db - simple double-buffering test kmscube - rotating 3D cube on crtcs/planes Some highlights: Testpat is a tool to setup modes and planes, and have a test pattern on the screen. It "guesses" what you want to do, which means you don't usually need to fill in all the details: XR24 framebuffer on first connected connector in the default mode: testpat -f XR24 XR24 framebuffer on a 400x400 plane on the first connected connector in the default mode: testpat -p 400x400 -f XR24 Test pattern on the second connector with default mode: testpat -c @1 With the python wrappers and a base script (iact.py) which sets up a bunch of helper variables/funcs for you, you can have an interactive python shell where you can do things like: for x in range(0, crtc.width() - fb.width()): set_plane(x, int((sin(x/50) + 1) * 100)); sleep(0.01) Tomi --TpEhSejbtoBh089auaM0JQS6R0hvFJgWg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWXHE5AAoJEPo9qoy8lh71MV0P/0C3EIx0Xlp5YnZta/f2chpK lkzBnhdw9VxQ1JgqS60D3SMrWNfiFpI9D9Q04fQFEYyowzeYTdnuyV2TnAjKaw2s r8V5Poye3u7sO2YRhtNkaxtjIiT5h/NisFK0yK92iL9U4esK8MCjnEH3pLX7+bIW ukLToRIUiq5QzaNE4m60Y0Fvfys9kHK3C41aoR6A6KhAPyuzNy8gmBS0sRD/P/UZ FOXBwExnB+bKeHos7uPs7FJFz508cy73qWhvTaKc+GgCHJAKJQfukpF0lIPsm0Nz QXwfur4LZsHjNKoNM0Z3SIM0msCBue+4Y7XqaARHKE+XYoICaKW5cMDPEDJ8V+g5 aq+Ugka5hrysVursh9JOSIeaequxleKLk0/w73YzsS9QdmyqvjMNwuDjjHmLIz4W COpPDLBFbIV6QJkwwWGvUz1WXuPS1GKyRFQiBuzR1QTfPr1U7H3W2KQ6oMjTmzcl CKtQ9D74hM7CDwaE3wxRJuWwNfTBoCTMMMQ0qCm3GUeG/c1OCmOx71mgNjLVE4XI HTeI2yAvLq6NbAyg9VIDQpn6440YBB9k3LJiBKVIKDCgjPqxq5o2HK3ec97/tELE yWsToL3dZnZEfSrmhDjMYr8/bc9VEpia5yvCvmiY0X25JNUVS5jphK4BWy8w/vdS UP8V64S/THS1/z91ZozF =7w8i -----END PGP SIGNATURE----- --TpEhSejbtoBh089auaM0JQS6R0hvFJgWg-- --===============2120714432== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============2120714432==--