Add support for lease transition
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>
Tue, 9 Mar 2021 05:58:22 +0000 (14:58 +0900)
committerDamian Hobson-Garcia <dhobsong@igel.co.jp>
Wed, 31 Mar 2021 01:23:39 +0000 (10:23 +0900)
commit13500056fc3ade11304606f757549092a27acf6b
tree81110462b242a62db0d09d1ef6bfdb22ad9b0802
parent8655f325bb6db9261185b05a581eb861fe491013
Add support for lease transition

When enabled allow the ownership of a lease to transition from
one client to another.

If a request is made for a lease that is already allocated to
a client, revoke the lease from the old client and issue a new
lease for the same resources to the new client.

This allows the ownership of the leased resources to be transferred
without the display being closed and the screen blanking.

During the tranistion, hold a reference to the old clients lease fd so
that the last frame presented by the old client will remain on screen until
the new client presents its first frame.

Currenly there is no notification or authentication mechanism
implemeted for the transition.  Any client can request a transition
from any other. The only notification that a transfer has happened
is that the previous client's DRM API calls will suddenly fail with
-ENOENT, since all resources will have been removed.
It is up to the client to sensibly handle this condition.

Bug-AGL: SPEC-3816

Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Change-Id: Id50b28096683a7530da8f546169b5dd825731359
README.md
drm-lease-manager/drm-lease.h
drm-lease-manager/lease-manager.c
drm-lease-manager/lease-manager.h
drm-lease-manager/lease-server.c
drm-lease-manager/main.c