From 5a32a2d198922f13c4a789fe42bb383eaf1c0411 Mon Sep 17 00:00:00 2001 From: Dennis Kempin Date: Tue, 11 Oct 2022 20:50:52 +0000 Subject: [PATCH] Enable vaapi feature upstream The feature can be built but not tested without access to an intel GPU. To enable the build, the testvm and dev container are updated to include libva. BUG=b:244619376 TEST=presubmit Change-Id: Ia8c4dc46ccbcd244bf57441f2c550a6b73c67b1c Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3946027 Commit-Queue: Dennis Kempin Reviewed-by: Alexandre Courbot --- Cargo.toml | 1 + devices/src/virtio/video/encoder/encoder.rs | 1 + tools/health-check | 1 - tools/impl/dev_container/version | 2 +- tools/impl/testvm.py | 2 -- tools/impl/testvm/cloud_init.yaml | 17 +---------------- tools/impl/testvm/version | 2 +- tools/install-aarch64-deps | 2 ++ 8 files changed, 7 insertions(+), 21 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7f99a706f9..28876a0adf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -280,6 +280,7 @@ all-aarch64 = [ "power-monitor-powerd", "slirp", "tpm", + "vaapi", "video-decoder", "virgl_renderer_next", "virgl_renderer", diff --git a/devices/src/virtio/video/encoder/encoder.rs b/devices/src/virtio/video/encoder/encoder.rs index b02c54c84e..a0ce60701b 100644 --- a/devices/src/virtio/video/encoder/encoder.rs +++ b/devices/src/virtio/video/encoder/encoder.rs @@ -40,6 +40,7 @@ pub enum EncoderEvent { FlushResponse { flush_done: bool, }, + #[allow(dead_code)] NotifyError { error: VideoError, }, diff --git a/tools/health-check b/tools/health-check index f520c8d11d..9af6221474 100755 --- a/tools/health-check +++ b/tools/health-check @@ -114,7 +114,6 @@ KNOWN_DISABLED_FEATURES = [ "direct", "gfxstream", "libvda", - "vaapi", "video-encoder", "whpx", ] diff --git a/tools/impl/dev_container/version b/tools/impl/dev_container/version index 5e37121ee7..7928829641 100644 --- a/tools/impl/dev_container/version +++ b/tools/impl/dev_container/version @@ -1 +1 @@ -r0025 +r0026 diff --git a/tools/impl/testvm.py b/tools/impl/testvm.py index 205500015b..7dacf9a9e2 100755 --- a/tools/impl/testvm.py +++ b/tools/impl/testvm.py @@ -17,8 +17,6 @@ from contextlib import closing from pathlib import Path from typing import Dict, Iterable, List, Literal, Optional, Tuple -# Cache busting 1 - USAGE = """%(prog)s {command} [options] Manages VMs for testing crosvm. diff --git a/tools/impl/testvm/cloud_init.yaml b/tools/impl/testvm/cloud_init.yaml index 69d4a5fe15..de5a1b8b2c 100644 --- a/tools/impl/testvm/cloud_init.yaml +++ b/tools/impl/testvm/cloud_init.yaml @@ -20,13 +20,6 @@ users: preserve_hostname: true -{% if v1.machine == 'aarch64' -%} -# This needs to run as bootcmd to preceed processing `packages` section -bootcmd: - - dpkg --add-architecture armhf -{%- endif %} - - # Runtime dependencies of crosvm binaries. # Note: Keep in sync with ./install-[aarch64-]deps.sh packages: @@ -38,19 +31,11 @@ packages: - libepoxy0 - libssl3 - libswscale6 + - libva2 - libwayland-client0 - libx11-6 - libxext6 - rsync -{% if v1.machine == 'aarch64' %} - # We run armhf tests on the aarch64 VM. But only some, install the needed runtime - # dependencies for those. - - libcap2:armhf - - libssl3:armhf - - libx11-6:armhf - - libwayland-client0:armhf - - libepoxy0:armhf -{%- endif %} # Commands to run once during setup runcmd: diff --git a/tools/impl/testvm/version b/tools/impl/testvm/version index b7be5a1274..e9307820a6 100644 --- a/tools/impl/testvm/version +++ b/tools/impl/testvm/version @@ -1 +1 @@ -r0004 +r0006 diff --git a/tools/install-aarch64-deps b/tools/install-aarch64-deps index cecc026935..6d190c77e5 100755 --- a/tools/install-aarch64-deps +++ b/tools/install-aarch64-deps @@ -16,6 +16,8 @@ sudo apt-get install --yes --no-install-recommends \ libepoxy-dev:arm64 \ libssl-dev:arm64 \ libswscale-dev:arm64 \ + libudev-dev:arm64 \ + libva-dev:arm64 \ libwayland-dev:arm64 \ libxext-dev:arm64 \ qemu-efi-aarch64 \