| commit | 9e00dbfd62f82aac84fc305b5677de1e2ec3e116 | [log] [tgz] |
|---|---|---|
| author | Shao-Chuan Lee <shaochuan@google.com> | Mon Feb 17 10:55:44 2025 +0000 |
| committer | crosvm LUCI <crosvm-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Mar 05 17:07:20 2025 -0800 |
| tree | 2653c5d5fceba7ebb0ff8169cfb49162bff78e69 | |
| parent | 0f2717d5c5e75d5c279bc030d4f9fa686551d4c5 [diff] |
devices: virtio_gpu: update scanout size on guest modeset
When modesetting happens in the guest, the virtio-gpu driver issues a
VIRTIO_GPU_CMD_SET_SCANOUT hypercall with the new scanout parameters
(see virtio_gpu_primary_plane_update), including the updated size.
The crosvm-side callback, VirtioGpu::set_scanout, currently does not
respect such changes.
This change makes crosvm aware of scanout size changes, and in such
events re-creates an underlying display surface matching the new size.
Bug: b/382364037
Test: `cvd create` with two displays; within the guest, set display \
resolution for the second display from Settings app
Change-Id: I0d4538cd652725b1250b8c104bb1509b1510f70e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/6275272
Reviewed-by: Jason Macnak <natsu@google.com>
Commit-Queue: Shao-Chuan Lee <shaochuan@chromium.org>
Reviewed-by: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Auto-Submit: Shao-Chuan Lee <shaochuan@chromium.org>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the ChromeOS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on ChromeOS devices.