e397e6a357d27bbcd4f50eabea64f72253281da9
[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 some packages.
18
19 Currently, only the `kmscube` sample application has support for DRM lease.  
20 `kmscube` is not included in the image by default. To add the package to the
21 image, add the following to your local.conf
22
23 ```
24 IMAGE_INSTALL_append = " kmscube"
25 ```
26
27 ## Starting the DRM lease manager
28
29 The drm-lease-manager must be the only process to directly open the DRM device.
30 Shut down any running window systems (eg. weston or agl-compositor) and run:
31
32 ```
33   # systemctl start drm-lease-manager
34 ```
35
36 This will create 1 lease for each output connection on the platform.
37 The name of each lease will be in the form of `card0-<output name>`
38 (eg. `card0-LVDS-1` or `card0-HDMI-A-1`)
39
40 ## Running kmscube sample
41
42 With the `drm-lease-manager` running `kmscube` can display on any available
43 lease by running with the `-L -D<lease name>` options. Eg:
44
45 ```
46   # kmscube -L -Dcard0-HDMI-A-1
47 ```
48
49 Multiple kmscube instances (one per DRM lease) can be started at the same time.
50
51 ## Tested targets
52
53 This layer has been tested on the Renesas R-Car Gen3 platform.  Other platforms
54 supporting the Linux DRM API may work as well.