emersion / libliftoff

Lightweight KMS plane library
MIT License
75 stars 7 forks source link

Move a plane from a CRTC to another #34

Open emersion opened 4 years ago

emersion commented 4 years ago

https://github.com/emersion/libliftoff/issues/21 was about exposing a per-output API to users. Now that our API allows for multiple outputs, we still need to manage and allocate planes at the device layer. Basically, I think we'll want to expose a per-output API but perform a per-device plane allocation.

Sometimes we'll need to migrate planes from one CRTC to another. To do so, we need to wait for the old CRTC to stop using the plane, then wait for a new frame submission on the new one to start using it.

This will fix this situation:

We need to handle the case where an output is hotplugged but cannot be enabled because of bandwidth limits. In this case, we need to disable planes on other outputs.