• Home
Name Date Size #Lines LOC

..--

kms++/03-May-2024-4,7173,588

kms++util/03-May-2024-5,1584,107

kmscube/03-May-2024-1,5741,084

py/03-May-2024-3,4712,548

scripts/03-May-2024-11382

subprojects/03-May-2024-1310

utils/03-May-2024-3,2862,529

.clang-formatD03-May-20242.2 KiB8079

.clang-tidyD03-May-202461 42

.gitignoreD03-May-2024128 1211

.gitmodulesD03-May-20240

.travis.ymlD03-May-20241.9 KiB9574

Android.bpD03-May-20242.2 KiB7566

LICENSED03-May-202417.9 KiB410321

METADATAD03-May-2024552 2019

MODULE_LICENSE_MPL2D03-May-20240

OWNERSD03-May-2024138 43

README.mdD03-May-20242.7 KiB9767

TODOD03-May-2024203 94

meson.buildD03-May-2024946 5338

meson_options.txtD03-May-2024784 2114

README.md

1[![Build Status](https://travis-ci.org/tomba/kmsxx.svg?branch=master)](https://travis-ci.org/tomba/kmsxx)
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
24To build the Python bindings you need to set up the git-submodule for pybind11:
25
26```
27git submodule update --init
28```
29
30And to compile:
31
32```
33meson build
34ninja -C build
35```
36
37## Cross compiling instructions:
38
39```
40meson build --cross-file=<path-to-meson-cross-file>
41ninja -C build
42```
43
44Here is my cross file for arm32 (where ${BROOT} is path to my buildroot output dir):
45
46```
47[binaries]
48c = ['ccache', '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-gcc']
49cpp = ['ccache', '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-g++']
50ar = '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-ar'
51strip = '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-strip'
52pkgconfig = '${BROOT}/host/bin/pkg-config'
53
54[host_machine]
55system = 'linux'
56cpu_family = 'arm'
57cpu = 'arm'
58endian = 'little'
59```
60
61## Build options
62
63You can use meson options to configure the build. E.g.
64
65```
66meson build -Dbuildtype=debug -Dkmscube=true
67```
68
69Use `meson configure build` to see all the configuration options and their current values.
70
71kms++ specific build options are:
72
73Option name      | Values                  | Default         | Notes
74---------------- | -------------           | --------------- | --------
75pykms            | true, false             | true            | Python bindings
76kmscube          | true, false             | false           | GLES kmscube
77omap             | enabled, disabled, auto | auto            | libdrm-omap support
78
79## Env variables
80
81You can use the following runtime environmental variables to control the behavior of kms++.
82
83Variable                          | Description
84--------------------------------- | -------------
85KMSXX_DISABLE_UNIVERSAL_PLANES    | Set to disable the use of universal planes
86KMSXX_DISABLE_ATOMIC              | Set to disable the use of atomic modesetting
87KMSXX_DEVICE                      | Path to the card device node to use
88KMSXX_DRIVER                      | Name of the driver to use. The format is either "drvname" or "drvname:idx"
89
90## Python notes
91
92You can run the python code directly from the build dir by defining PYTHONPATH env variable. For example:
93
94```
95PYTHONPATH=build/py py/tests/hpd.py
96```
97