|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| kms++/ | | 23-Nov-2023 | - | 4,717 | 3,588 |
| kms++util/ | | 23-Nov-2023 | - | 5,158 | 4,107 |
| kmscube/ | | 23-Nov-2023 | - | 1,574 | 1,084 |
| py/ | | 23-Nov-2023 | - | 3,471 | 2,548 |
| scripts/ | | 23-Nov-2023 | - | 113 | 82 |
| subprojects/ | | 23-Nov-2023 | - | 13 | 10 |
| utils/ | | 23-Nov-2023 | - | 3,286 | 2,529 |
| .clang-format | D | 23-Nov-2023 | 2.2 KiB | 80 | 79 |
| .clang-tidy | D | 23-Nov-2023 | 61 | 4 | 2 |
| .gitignore | D | 23-Nov-2023 | 128 | 12 | 11 |
| .gitmodules | D | 23-Nov-2023 | 0 | | |
| .travis.yml | D | 23-Nov-2023 | 1.9 KiB | 95 | 74 |
| Android.bp | D | 23-Nov-2023 | 2.2 KiB | 75 | 66 |
| LICENSE | D | 23-Nov-2023 | 17.9 KiB | 410 | 321 |
| METADATA | D | 23-Nov-2023 | 552 | 20 | 19 |
| MODULE_LICENSE_MPL2 | D | 23-Nov-2023 | 0 | | |
| OWNERS | D | 23-Nov-2023 | 138 | 4 | 3 |
| README.md | D | 23-Nov-2023 | 2.7 KiB | 97 | 67 |
| TODO | D | 23-Nov-2023 | 203 | 9 | 4 |
| meson.build | D | 23-Nov-2023 | 946 | 53 | 38 |
| meson_options.txt | D | 23-Nov-2023 | 784 | 21 | 14 |
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