Split KMS into window module and fix current behaviour
In this MR, I split KMS into a vout window
module and vout display
module, mainly to be able to reuse both parts in different contexts, and then bring different improvements to the current kms.c
module.
In particular, after this MR:
- the previous KMS state is restored so we get the terminal content back
- it's possible to target a specific screen
- the
vout display
module will honor --autoscale, --align, and the metadata crop - better logging and minor fixes
- the KMS plane is correctly probed for matching the current CRTC
For reviewers, please note that there is an option API break on --kms
, which is renamed as --kms-device
and reused as a boolean --kms
to determine whether we should enable KMS or not, mainly to still be able to run vouts like caca
in the terminal.
I've spent some time on the MR but I might need an additional reading to check that everything have been cleaned up.
Edited by Alexandre Janniaux