Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.github/workflows/ | 04-Jul-2025 | - | 22 | 17 | ||
kms++/ | 04-Jul-2025 | - | 4,826 | 3,680 | ||
kms++util/ | 04-Jul-2025 | - | 4,642 | 3,718 | ||
kmscube/ | 04-Jul-2025 | - | 1,614 | 1,115 | ||
py/ | 04-Jul-2025 | - | 3,427 | 2,510 | ||
scripts/ | 04-Jul-2025 | - | 113 | 82 | ||
subprojects/ | 04-Jul-2025 | - | 14 | 12 | ||
utils/ | 04-Jul-2025 | - | 2,698 | 2,084 | ||
.clang-format | D | 04-Jul-2025 | 2.2 KiB | 80 | 79 | |
.clang-tidy | D | 04-Jul-2025 | 61 | 4 | 2 | |
.gitignore | D | 04-Jul-2025 | 135 | 13 | 12 | |
.travis.yml | D | 04-Jul-2025 | 1.9 KiB | 95 | 74 | |
Android.bp | D | 04-Jul-2025 | 2.2 KiB | 75 | 66 | |
LICENSE | D | 04-Jul-2025 | 17.9 KiB | 410 | 321 | |
METADATA | D | 04-Jul-2025 | 775 | 21 | 19 | |
MODULE_LICENSE_MPL2 | D | 04-Jul-2025 | 0 | |||
OWNERS | D | 04-Jul-2025 | 210 | 5 | 4 | |
README.md | D | 04-Jul-2025 | 2.6 KiB | 89 | 62 | |
TODO | D | 04-Jul-2025 | 203 | 9 | 4 | |
meson.build | D | 04-Jul-2025 | 1.2 KiB | 54 | 43 | |
meson_options.txt | D | 04-Jul-2025 | 521 | 15 | 10 |
README.md
1[](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