crosvm/vm_control
lunpujun 9c0457d2f5 Add support for 2k and 4k resolution.
We used to cap the guest resolution at 1080p. We are experimenting with
higher resolutions, gated by the feature flag enable_4k_uhd_resolution.
Two places need to change:

1. The virtual display size should be capped at 3840x2160 instead if the
   feature is enabled. This size is used as the guest resolution.
2. guest_dpi_manager should provide the recommended DPI for the newly
   added resolutions. It is fine not to check the feature flag there
   since the BSS knows whether or not to use those values.

get_virtual_display_size() may be called by validate_gpu_config(), which
happens very early and the process variants are not yet written to the
static variable PROCESS_INVARIANTS, so we can't use the macro
phenotype!. As a workaround, we load the process variants and read the
flag by ourselves. In the long term, the BSS should be specifying the
virtual display size when launching KiwiVM, so we should be able to get
rid of This workaround.

Bug: 276352265
Test: Ran GPG with the feature enabled/disabled, and verified that the
      resolution is capped at 4k UHD when it is enabled.
Change-Id: I3ec06deda1aa5b7fe89dde5bca426248b93b3ecf
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4804797
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
2023-09-15 21:39:55 +00:00
..
src Add support for 2k and 4k resolution. 2023-09-15 21:39:55 +00:00
Cargo.toml crosvm: virtio-net device hotplug 2023-07-27 04:35:26 +00:00