gpu_display: refactor gpu_main_display_tube.

After go/playcl/83699, the WndProc thread is the only thread that
accesses this tube, so we could change its type from Arc<Mutex<Tube>> to
Rc<Tube>, so that we no longer need to worry about deadlocking.

This tube was a field of struct DisplayParameters. That struct is used
for CLI arg parsing, however, we don't get this tube from CLI so the
code looks awkward. Besides, DisplayParameters specifies params for each
individual window, but we will likely only have one tube and share it
among multiple windows when we support multi-windowing. So, we can
remove it from DisplayParameters, and WindowProcedureThread will
distribute the clones of the tube to surfaces.

Bug: 257486521
Test: Ran GPG

Change-Id: Ic7adeb4a41c89d79e40820ad4d50e8d85c4e385c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4804685
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
8 files changed
tree: b5742f255a00d02ec7ee8127ca606567bf9886fa
  1. .cargo/
  2. .config/
  3. .devcontainer/
  4. .github/
  5. .vscode/
  6. aarch64/
  7. acpi_tables/
  8. arch/
  9. argh_helpers/
  10. audio_streams_conformance_test/
  11. audio_util/
  12. base/
  13. bit_field/
  14. broker_ipc/
  15. common/
  16. cros_async/
  17. cros_fdt/
  18. cros_tracing/
  19. cros_tracing_types/
  20. crosvm_cli/
  21. crosvm_control/
  22. crosvm_plugin/
  23. devices/
  24. disk/
  25. docs/
  26. e2e_tests/
  27. fuse/
  28. fuzz/
  29. gpu_display/
  30. hypervisor/
  31. infra/
  32. io_uring/
  33. jail/
  34. kernel_cmdline/
  35. kernel_loader/
  36. kvm/
  37. kvm_sys/
  38. libcras_stub/
  39. linux_input_sys/
  40. logo/
  41. media/
  42. metrics/
  43. net_sys/
  44. net_util/
  45. perfetto/
  46. power_monitor/
  47. prebuilts/
  48. proto_build_tools/
  49. protos/
  50. resources/
  51. riscv64/
  52. rutabaga_gfx/
  53. sandbox/
  54. serde_keyvalue/
  55. src/
  56. swap/
  57. system_api/
  58. tests/
  59. third_party/
  60. tools/
  61. tpm2/
  62. tpm2-sys/
  63. tube_transporter/
  64. usb_sys/
  65. usb_util/
  66. vendor/
  67. vfio_sys/
  68. vhost/
  69. virtio_sys/
  70. vm_control/
  71. vm_memory/
  72. win_audio/
  73. win_util/
  74. x86_64/
  75. .dockerignore
  76. .envrc
  77. .gitignore
  78. .gitmodules
  79. .rustfmt.toml
  80. ARCHITECTURE.md
  81. Cargo.lock
  82. Cargo.toml
  83. CONTRIBUTING.md
  84. DIR_METADATA
  85. LICENSE
  86. mypy.ini
  87. OWNERS
  88. OWNERS_COUNCIL
  89. PRESUBMIT.cfg
  90. pyproject.toml
  91. README.chromeos.md
  92. README.md
  93. rust-toolchain
README.md

crosvm - The ChromeOS Virtual Machine Monitor

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.

Logo