Introduce a display subsystem for GPU output #319
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds initial support for the more traditional display output from the VM by basically having virtual displays (until now we only had cross-domain/wayland).
This implementes 2 display backends:
DisplayBackendNoop
- used by default, pretty much returns an error for every operationDisplayBackendGtk
- implementation using GTK (works on Linux, to be tested on macOS)This introduces 2 new public API function:
int32_t krun_set_display_backend_gtk(uint32_t ctx_id)
int32_t krun_set_display(uint32_t ctx_id, uint32_t display_id, uint32_t width, uint32_t height)
Current limitations to be addressed by future PRs:
You can test this using the newly added
--display
option inchroot_vm
and running something graphical in the guest - the simplest option is probablykmscube
:$ ./chroot_vm --display=0:1920:1080 rootfs_fedora kmscube