1 # kms++ - C++ library for kernel mode setting
3 kms++ is a C++11 library for kernel mode setting.
5 Also included are some simple utilities for KMS and python bindings for kms++.
7 ## Utilities
9 - testpat - set modes and planes and show test pattern on crtcs/planes, and test page flips
10 - kmsprint - print information about DRM objects
11 - kmsview - view raw images
12 - kmscube - rotating 3D cube on crtcs/planes
13 - kmscapture - show captured frames from a camera on screen
15 ## Dependencies:
17 - libdrm
18 - Python 3.x (for python bindings)
20 ## Build instructions:
22 To build the Python bindings you need to set up the git-submodule for pybind11:
24 ```
25 git submodule update --init
26 ```
28 And to compile:
30 ```
31 $ mkdir build
32 $ cd build
33 $ cmake ..
34 $ make -j4
35 ```
37 ## Cross compiling instructions:
39 Directions for cross compiling depend on your environment.
41 These are for mine with buildroot:
43 ```
44 $ mkdir build
45 $ cd build
46 $ cmake -DCMAKE_TOOLCHAIN_FILE=<buildrootpath>/output/host/usr/share/buildroot/toolchainfile.cmake ..
47 $ make -j4
48 ```
50 ## Build options
52 You can use the following cmake flags to control the build. Use `-DFLAG=VALUE` to set them.
54 Option name | Values | Default | Notes
55 --------------------- | ------------- | -------- | --------
56 CMAKE_BUILD_TYPE | Release/Debug | Release |
57 BUILD_SHARED_LIBS | ON/OFF | OFF |
58 KMSXX_ENABLE_PYTHON | ON/OFF | ON |
59 KMSXX_ENABLE_KMSCUBE | ON/OFF | OFF |
61 ## Env variables
63 You can use the following runtime environmental variables to control the behavior of kms++.
65 Variable | Description
66 --------------------------------- | -------------
67 KMSXX_DISABLE_UNIVERSAL_PLANES | Set to disable the use of universal planes
68 KMSXX_DISABLE_ATOMIC | Set to disable the use of atomic modesetting