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/linux.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/linux.rs')
-rw-r--r-- | src/linux.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/linux.rs b/src/linux.rs index 0cc341d..1dd1004 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -618,6 +618,7 @@ fn create_gpu_device( NonZeroU8::new(1).unwrap(), // number of scanouts gpu_sockets, display_backends, + cfg.gpu_parameters.as_ref().unwrap(), ); let jail = match simple_jail(&cfg, "gpu_device.policy")? { @@ -970,7 +971,7 @@ fn create_virtio_devices( #[cfg(feature = "gpu")] { - if cfg.gpu { + if cfg.gpu_parameters.is_some() { let (wl_socket, gpu_socket) = virtio::resource_bridge::pair().map_err(Error::CreateSocket)?; resource_bridges.push(gpu_socket); @@ -988,7 +989,7 @@ fn create_virtio_devices( #[cfg(feature = "gpu")] { - if cfg.gpu { + if cfg.gpu_parameters.is_some() { devs.push(create_gpu_device( cfg, _exit_evt, |