• Home
Name Date Size #Lines LOC

..--

.github/workflows/04-Jul-2025-2217

kms++/04-Jul-2025-4,8263,680

kms++util/04-Jul-2025-4,6423,718

kmscube/04-Jul-2025-1,6141,115

py/04-Jul-2025-3,4272,510

scripts/04-Jul-2025-11382

subprojects/04-Jul-2025-1412

utils/04-Jul-2025-2,6982,084

.clang-formatD04-Jul-20252.2 KiB8079

.clang-tidyD04-Jul-202561 42

.gitignoreD04-Jul-2025135 1312

.travis.ymlD04-Jul-20251.9 KiB9574

Android.bpD04-Jul-20252.2 KiB7566

LICENSED04-Jul-202517.9 KiB410321

METADATAD04-Jul-2025775 2119

MODULE_LICENSE_MPL2D04-Jul-20250

OWNERSD04-Jul-2025210 54

README.mdD04-Jul-20252.6 KiB8962

TODOD04-Jul-2025203 94

meson.buildD04-Jul-20251.2 KiB5443

meson_options.txtD04-Jul-2025521 1510

README.md

1[![Build Status](https://github.com/tomba/kmsxx/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/tomba/kmsxx/actions/workflows/c-cpp.yml)
2
3# kms++ - C++ library for kernel mode setting
4
5kms++ is a C++17 library for kernel mode setting.
6
7Also included are some simple utilities for KMS and python bindings for kms++.
8
9## Utilities
10
11- kmstest - set modes and planes and show test pattern on crtcs/planes, and test page flips
12- kmsprint - print information about DRM objects
13- kmsview - view raw images
14- kmscube - rotating 3D cube on crtcs/planes
15- kmscapture - show captured frames from a camera on screen
16
17## Dependencies:
18
19- libdrm
20- Python 3.x (for python bindings)
21
22## Build instructions:
23
24```
25meson setup build
26ninja -C build
27```
28
29## Cross compiling instructions:
30
31```
32meson build --cross-file=<path-to-meson-cross-file>
33ninja -C build
34```
35
36Here is my cross file for arm32 (where ${BROOT} is path to my buildroot output dir):
37
38```
39[binaries]
40c = ['ccache', '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-gcc']
41cpp = ['ccache', '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-g++']
42ar = '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-ar'
43strip = '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-strip'
44pkgconfig = '${BROOT}/host/bin/pkg-config'
45
46[host_machine]
47system = 'linux'
48cpu_family = 'arm'
49cpu = 'arm'
50endian = 'little'
51```
52
53## Build options
54
55You can use meson options to configure the build. E.g.
56
57```
58meson build -Dbuildtype=debug -Dkmscube=true
59```
60
61Use `meson configure build` to see all the configuration options and their current values.
62
63kms++ specific build options are:
64
65Option name      | Values                  | Default         | Notes
66---------------- | -------------           | --------------- | --------
67pykms            | true, false             | true            | Python bindings
68kmscube          | true, false             | false           | GLES kmscube
69omap             | enabled, disabled, auto | auto            | libdrm-omap support
70
71## Env variables
72
73You can use the following runtime environmental variables to control the behavior of kms++.
74
75Variable                          | Description
76--------------------------------- | -------------
77KMSXX_DISABLE_UNIVERSAL_PLANES    | Set to disable the use of universal planes
78KMSXX_DISABLE_ATOMIC              | Set to disable the use of atomic modesetting
79KMSXX_DEVICE                      | Path to the card device node to use
80KMSXX_DRIVER                      | Name of the driver to use. The format is either "drvname" or "drvname:idx"
81
82## Python notes
83
84You can run the python code directly from the build dir by defining PYTHONPATH env variable. For example:
85
86```
87PYTHONPATH=build/py py/tests/hpd.py
88```
89