aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-07-13Add .gitreview filelamprey_12.1.9lamprey_12.1.8lamprey_12.1.7lamprey_12.1.6lamprey_12.1.5lamprey_12.1.4lamprey_12.1.3lamprey_12.1.20lamprey_12.1.2lamprey_12.1.19lamprey_12.1.18lamprey_12.1.17lamprey_12.1.16lamprey_12.1.15lamprey_12.1.14lamprey_12.1.13lamprey_12.1.12lamprey_12.1.11lamprey_12.1.10lamprey_12.1.1lamprey_12.1.0lamprey_12.0.1lamprey_12.0.0lamprey/12.1.9lamprey/12.1.8lamprey/12.1.7lamprey/12.1.6lamprey/12.1.5lamprey/12.1.4lamprey/12.1.3lamprey/12.1.20lamprey/12.1.2lamprey/12.1.19lamprey/12.1.18lamprey/12.1.17lamprey/12.1.16lamprey/12.1.15lamprey/12.1.14lamprey/12.1.13lamprey/12.1.12lamprey/12.1.11lamprey/12.1.10lamprey/12.1.1lamprey/12.1.0lamprey/12.0.1lamprey/12.0.012.1.912.1.812.1.712.1.612.1.512.1.412.1.312.1.2012.1.212.1.1912.1.1812.1.1712.1.1612.1.1512.1.1412.1.1312.1.1212.1.1112.1.1012.1.112.1.012.0.112.0.0lampreyJan-Simon Möller1-0/+5
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> Change-Id: Ia9c2eb2b29dab85ba8e6aaa23b1254b22d299874
2021-04-12Don't close invalid or uninitialied fdsmarlin_12.90.0marlin/12.90.0lamprey_11.93.0lamprey_11.92.0lamprey_11.91.0lamprey/11.93.0lamprey/11.92.0lamprey/11.91.0jellyfish_10.0.3jellyfish/10.0.312.90.011.93.011.92.011.91.010.0.3Damian Hobson-Garcia3-9/+14
Avoid calling close() on file descriptors that have not been intialized, (or initialized to 0) and descriptors that are known to be invalid. Closing file descriptors due to handle failing initialization is handled in the intialization code. In the lease-manager, file descriptors can be invalid during normal operation, so validity is tested at shutdown. Bug-AGL: SPEC-3862 Change-Id: I798273195cba297c14c6b97d50c7614164fda7df Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2021-04-06Add option to hold lease on unexpected disconnectDamian Hobson-Garcia5-12/+40
If a client application crashes while owning a lease, the lease will automatically be revoked and all references freed to make it available for another (or the restarted original) client to claim and continue display. This will cause the screen to blank while the lease is unowned. Add an option to revoke the lease, but keep the reference to the lease descriptor, so that the screen does not blank while unowned. This only has effect when a client exits without calling the `dlm_release_lease` function. Otherwise the lease is revoked and the descriptor dereferenced, just as before. Bug-AGL: SPEC-3862 Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Change-Id: I3fc2c8fde4118b6e298ba31807fd5fa4766a97dd
2021-04-06Move lease fd send/receive to dlm-protocolDamian Hobson-Garcia5-116/+110
Collect all protocol related functionality in the same place instead of spreading it around across different modules. Bug-AGL: SPEC-3862 Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Change-Id: I169a200401e4feaa289d53240a7f5467d6a88bd3
2021-04-06Add lease request and release protocolDamian Hobson-Garcia7-30/+193
Explicitly request / release leases instead of implicitly by opening and closing the connection. This will allow the lease manager to take different action when a client shuts down gracefully vs when it crashes, holding a lease. Bug-AGL: SPEC-3862 Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Change-Id: Ibc68bee855ce18e56eb6f57e5ad1743248320013
2021-04-06Free old lease fd reference after transitionDamian Hobson-Garcia3-4/+93
After a lease is tranisitined to a new client, the reference to the previous client's lease fd is no longer needed and should be released. Close the old fd after the new client has either updated the display or its lease is revoked. Bug-AGL: SPEC-3816 Change-Id: I9612913e2960dce94bcfc6a35c0105a5670a453d Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2021-04-06Add support for lease transitionDamian Hobson-Garcia5-2/+64
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 Change-Id: Iaff87e275f909f3b6ef448df39364d6fe62007b1 Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2021-04-06lease-server: Allow multiple client connectionsDamian Hobson-Garcia5-136/+144
Allow multiple clients to issue lease requests on a server at the same time. This is necessary to be able to grant or deny leases, not just on a first-come-first-served basis. Future patches will add extra contitions, such as command-line options and lease configuration settings to determine when and how lease requests should be granted. This update changes the behaviour of the lease-server interface so that it reports every client connection request, instead of when a server has accepted a request, so update the test suite to reflect this. Bug-AGL: SPEC-3816 Change-Id: I48cc392dd62a8c06ea74178bc52c627032817203 Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2021-03-29lease-server-test: Destroy server on shutdownDamian Hobson-Garcia1-0/+5
libcheck tests normally run each test in a separate process so the server objects will automatically be destroyed after each test. If the test suite is run with CK_FORK=no, for example when debugging the test with gdb, failing to destory the server object will leave the test sockets from the previous test open, which will stop the next test from creating its own sockets. Bug-AGL: SPEC-3816 Change-Id: I42a0976c392bdc19bb60acc78178aac8ee3e14ce Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2021-02-19Add initial versionDamian Hobson-Garcia40-0/+3775
The initial version implements the basic functionality of the client/server communication and lease management. For now, one lease is created per valid connector (dependent on CRTC availablity). Bug-AGL: SPEC-3729 Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Change-Id: I2b37a892742cc22bdc53a5172c8ad3d8a7bb5e66
2020-12-04Initial empty repositorykoi_11.0.4koi_11.0.0koi_10.93.1koi_10.93.0koi_10.92.0koi_10.91.0koi/11.0.4koi/11.0.0koi/10.93.1koi/10.93.0koi/10.92.0koi/10.91.0jellyfish_10.0.2jellyfish_10.0.1jellyfish/10.0.2jellyfish/10.0.111.0.411.0.010.93.110.93.010.92.010.91.010.0.210.0.1Jan-Simon Moeller0-0/+0