Ensure meta-agl-drm-lease does pass yocto-check-layer and has run-yocto-check-layer...
[AGL/meta-agl-devel.git] / meta-agl-drm-lease / README.md
1 # DRM lease support layer
2
3 This yocto layer adds support for using DRM leases to partition display
4 controller output resources between multiple processes.
5
6 This layer adds a drm-lease-manager deamon (with systemd configuration)
7 and a client library for receiving DRM leases from the daemon. For more details
8 the DRM lease manager and client see the repository at
9 (https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/drm-lease-manager.git)
10
11 ## Setup
12
13 Enable the  `agl-drm-lease` AGL feature when setting up your build environment
14 with aglsetup.sh.
15
16 This will add the `drm-lease-manager` package to the image, and will add DRM
17 lease support to the following packages:
18  * weston
19  * kmscube
20
21 `kmscube` is not included in the image by default. To add the package to the
22 image, add the following to your local.conf
23
24 ```
25 IMAGE_INSTALL:append = " kmscube"
26 ```
27
28 ## Starting the DRM lease manager
29
30 The drm-lease-manager must be the only process to directly open the DRM device.
31 Shut down any running window systems (eg. weston or agl-compositor) and run:
32
33 ```
34   # systemctl start drm-lease-manager
35 ```
36
37 This will create 1 lease for each output connection on the platform.
38 The name of each lease will be in the form of `card0-<output name>`
39 (eg. `card0-LVDS-1` or `card0-HDMI-A-1`)
40
41 ## Running weston
42
43 weston can be started on any available DRM lease by running with the
44 `--drm-lease=<lease name>` option. Eg:
45 ```
46   # weston --drm-lease=card0-HDMI-A-1
47 ```
48
49 ## Running kmscube sample
50
51 With the `drm-lease-manager` running `kmscube` can display on any available
52 lease by running with the `-L -D<lease name>` options. Eg:
53
54 ```
55   # kmscube -L -Dcard0-HDMI-A-1
56 ```
57
58 Multiple kmscube instances (one per DRM lease) can be started at the same time.
59
60 ## Tested targets
61
62 This layer has been tested on the Renesas R-Car Gen3 platform.  Other platforms
63 supporting the Linux DRM API may work as well.
64
65 maintainer: agl-dev-community@lists.automotivelinux.org
66 patch: agl-dev-community@lists.automotivelinux.org