diff options
author | Jason Macnak <natsu@google.com> | 2019-11-06 14:48:12 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-10 04:24:26 +0000 |
commit | cc7070b284bb69bc5f7f13a1f7f48fa1946eee0b (patch) | |
tree | 399a888883f4ed68214c27dd3d7aacc3d99e48f0 /src/crosvm.rs | |
parent | 4f9f5c74791fd13f6930a48232b3327066259b8e (diff) | |
download | crosvm-cc7070b284bb69bc5f7f13a1f7f48fa1946eee0b.tar crosvm-cc7070b284bb69bc5f7f13a1f7f48fa1946eee0b.tar.gz crosvm-cc7070b284bb69bc5f7f13a1f7f48fa1946eee0b.tar.bz2 crosvm-cc7070b284bb69bc5f7f13a1f7f48fa1946eee0b.tar.lz crosvm-cc7070b284bb69bc5f7f13a1f7f48fa1946eee0b.tar.xz crosvm-cc7070b284bb69bc5f7f13a1f7f48fa1946eee0b.tar.zst crosvm-cc7070b284bb69bc5f7f13a1f7f48fa1946eee0b.zip |
Support configurable screen sizes
This change enables Cuttlefish to run with a user specified display size on top of virtio gpu accelerated graphics rendering. This change makes the width and height an argument/flag and adds the necessary plumbing to pass this width and height through the gpu backend. BUG=b:134086390 TEST=built crosvm and booted cuttlefish locally Change-Id: Idabf7ef083b2377e3ebf3b50dd0296f4bf7e8ddc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1927872 Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> Commit-Queue: Jason Macnak <natsu@google.com>
Diffstat (limited to 'src/crosvm.rs')
-rw-r--r-- | src/crosvm.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/crosvm.rs b/src/crosvm.rs index ff539ca..de23573 100644 --- a/src/crosvm.rs +++ b/src/crosvm.rs @@ -17,6 +17,8 @@ use std::path::PathBuf; use std::str::FromStr; use devices::virtio::fs::passthrough; +#[cfg(feature = "gpu")] +use devices::virtio::gpu::GpuParameters; use devices::SerialParameters; use libc::{getegid, geteuid}; @@ -146,7 +148,8 @@ pub struct Config { pub sandbox: bool, pub seccomp_policy_dir: PathBuf, pub seccomp_log_failures: bool, - pub gpu: bool, + #[cfg(feature = "gpu")] + pub gpu_parameters: Option<GpuParameters>, pub software_tpm: bool, pub cras_audio: bool, pub cras_capture: bool, @@ -184,7 +187,8 @@ impl Default for Config { vhost_net: false, tap_fd: Vec::new(), cid: None, - gpu: false, + #[cfg(feature = "gpu")] + gpu_parameters: None, software_tpm: false, wayland_socket_path: None, wayland_dmabuf: false, |