Commit graph

15 commits

Author SHA1 Message Date
Dennis Kempin
4fea399df9 Reformat imports
crosvm is switching the import style to use one import per line.
While more verbose, this will greatly reduce the occurence of merge
conflicts going forward.

Note: This is using a nightly feature of rustfmt. So it's a one-off
re-format only. We are considering adding a nightly toolchain to
enable the feature permanently.

BUG=b:239937122
TEST=CQ

Change-Id: Id2dd4dbdc0adfc4f8f3dd1d09da1daafa2a39992
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784345
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-07-28 00:15:50 +00:00
Gurchetan Singh
51c07a15b3 crosvm: nuke gfxstream syncfd
Nobody ever toggles this flag, implying this flag can be removed.

By default, the gfxstream assumes ANDROID_EMU_virtio_gpu_native_sync
is present, which is the desired behavior.

BUG=b:239639751
TEST=compile gfxstream

Change-Id: I64d19c5fc2c0ac59a87ee25fbd1e7b6ed9522410
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3778078
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
2022-07-21 00:16:41 +00:00
Gurchetan Singh
3c77043c19 rutabaga_gfx: consolidate flags into the rutabaga builder
A lot of these flags can be deprecated over time.  For example,
specifying the context type and "use_vulkan" is a bit redundant.
Things like "use_syncfd" and "use_guest_angle" can also be removed.

BUG=b:173630595
TEST=compile

Change-Id: I77bff7f02ebfd3b0e65145d144bfc15afa50f386
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3655286
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Commit-Queue: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-05-24 15:27:36 +00:00
Rob Clark
6d7a90be3a rutabaga_gfx: add context type mask
A way to control exposed capsets.

BUG=b:230100768
TEST=gfxbench, android games in arcvm

Change-Id: I91616405b695be73d6cc872aa5ae2a9dcecd0fb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3636799
Commit-Queue: Rob Clark <robdclark@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-05-24 15:05:16 +00:00
Ryan Neph
60b6ed0e77 rutabaga_gfx: add context_name param to ffi/lib.rs
Follow-up to commit 13108989b1 to fix
broken rutabaga ffi after introducing the new context_name parameter
to create_context().

BUG=b:230678191
BUG=b:230788302
TEST=emerge crosvm

Change-Id: If1165662e66dd349ef4c52bece26fe724a861b78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3621210
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
2022-05-03 23:08:55 +00:00
Dennis Kempin
ef516189db Refactoring: Move common/base into base
Executes the script in https://crrev.com/c/3530502

BUG=b:223206469
TEST=presubmit

Change-Id: Ibeffdc8de0b2270f070e60bb2de8d9fdc78a2a6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3530503
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-03-17 00:01:27 +00:00
Anton Romanov
bed40ad547 crosvm: migrate to Rust 2021 edition
BUG=none
TEST=cq

Change-Id: I0059c970879b78bfd40b6ce58b10debcf154b50f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3508322
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Anton Romanov <romanton@google.com>
2022-03-09 01:16:03 +00:00
Vikram Auradkar
ae5118f5c7 Enable windows tests for a few crates
Run tests for sys_util_core, poll_token_derive and balloon_control on
windows.

Using dotfiles to disable/serialize test runs of a subset of crates does
not work well with third party crates as it forces us to commit the dot
file to the crate.

The patch modifies and uses the script that runs linux tests.
This patch also allows us to
- build/test child crate even if parent crate has disabled build/test.
- avoid building crosvm if it is not explicitly specified.

RIP short lived .windows_build_test_skip. You allowed us to run noop
kokoro tests.

Test: py .\tools\impl\test_runner.py --arch x86_64
Bug: b:215610772
Change-Id: Icc6d04ffd7c0c33d4f60aeac16fc7d23881c387d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3459809
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-02-18 03:18:58 +00:00
Dennis Kempin
5f46e21c02 Remove rutabaga_gfx_ffi from workspace
The crate requires special compilation flags that conflict with the
workspace flags.

We may want to consider moving it to common/ so the test runner can
compile it in a separate workspace.

This brings us one step closer to be able to run
`cargo build --workspace` with no excludes.

BUG=b:206689789
TEST=./tools/presubmit

Change-Id: Ice747ced00f81db0a8e05ff2bc43d4d0e323e456
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3453050
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-02-11 15:58:56 +00:00
Kaiyi Li
3ff6bbd1ac rutabaga_gfx: change os_handle type
Windows HANDLE is defined as void* which is incompatible with current
os_handle type i32. Change that to i64.

TEST=launch_cvd --gpu_mode=gfxstream
BUG=b:217977329

Change-Id: I78c6c4c0d7573773ed530d8987b932438222144f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3445529
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Kaiyi Li <kaiyili@google.com>
2022-02-08 21:31:45 +00:00
Vikram Auradkar
0108238474 Upstream windows build/test script
The patch also adds files to skip building and testing crates on
windows. When we run
```
tools/windows/build_test.py --skip_file_name .windows_build_test_skip
```

the build/test succeeds without actually doing anything as build/test
for all crates is skipped by creating '.windows_build_test_skip'.

Bug: 213170957
Test: Ran script on downstream repo
Change-Id: Iebd2cea463ee722be4feaed88229e1fb5e9fd6c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3417918
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-01-28 00:55:08 +00:00
Chia-I Wu
11e32f6ece rutabaga_gfx: prepare for VIRGL_RENDERER_MULTI_PROCESS
When the flag is set, virglrenderer can use the get_server_fd callback
to get the socket to the render server.

BUG=b:177267762
TEST=run vk and gl apps on volteer

Change-Id: I692b5068a04e841b0a0ed2344a77908e720e19eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3283506
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
2021-12-09 20:16:07 +00:00
Chia-I Wu
e39bbbd025 rutabaga_gfx: add RUTABAGA_MEM_HANDLE_TYPE_SHM
virglrenderer can return an fd of type VIRGL_RENDERER_BLOB_FD_TYPE_SHM.

BUG=b:177267762
TEST=run vk and gl apps on volteer

Change-Id: Ie8def22f3dc6dc13a4972955aadabb91be838493
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3283505
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Chia-I Wu <olv@google.com>
2021-12-09 20:16:06 +00:00
Dennis Kempin
a1e42f07ea Enable clippy on more workspace crates
As before, some are automatically fixed by clippy, some manually
fixed.

BUG=b:192373803
TEST=./tools/presubmit

Change-Id: Ifcab4cf60775ee6bb7d4530af6406a74958432ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3283683
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-11-15 23:55:42 +00:00
Gurchetan Singh
3059851cd0 rutabaga_gfx: export rutabaga
This change adds FFI bindings to the Rutabaga Virtual Graphics
Interface (VGI).

BUG=b:173630595
TEST= compile
      cp rutabaga_gfx_ffi.so + rutabaga_gfx.so to sysroot
      ./rutabaga_test

Change-Id: Iba99b0ace9f1ad90b6c42d9075038dd9f05b9367
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3230331
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
2021-11-02 15:53:02 +00:00