All of lore.kernel.org
 help / color / mirror / Atom feed
* ANNOUNCE: introcuding kmsxx, tests and python wrappers
@ 2015-11-30 15:54 Tomi Valkeinen
  0 siblings, 0 replies; only message in thread
From: Tomi Valkeinen @ 2015-11-30 15:54 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Laurent Pinchart, Sarha, Jyri


[-- Attachment #1.1: Type: text/plain, Size: 1889 bytes --]

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.

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


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-30 15:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30 15:54 ANNOUNCE: introcuding kmsxx, tests and python wrappers Tomi Valkeinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.