• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

kms++/23-Nov-2023-4,7173,588

kms++util/23-Nov-2023-5,1584,107

kmscube/23-Nov-2023-1,5741,084

py/23-Nov-2023-3,4712,548

scripts/23-Nov-2023-11382

subprojects/23-Nov-2023-1310

utils/23-Nov-2023-3,2862,529

.clang-formatD23-Nov-20232.2 KiB8079

.clang-tidyD23-Nov-202361 42

.gitignoreD23-Nov-2023128 1211

.gitmodulesD23-Nov-20230

.travis.ymlD23-Nov-20231.9 KiB9574

Android.bpD23-Nov-20232.2 KiB7566

LICENSED23-Nov-202317.9 KiB410321

METADATAD23-Nov-2023552 2019

MODULE_LICENSE_MPL2D23-Nov-20230

OWNERSD23-Nov-2023138 43

README.mdD23-Nov-20232.7 KiB9767

TODOD23-Nov-2023203 94

meson.buildD23-Nov-2023946 5338

meson_options.txtD23-Nov-2023784 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