ci: Distribute ADMGPU driver to LAVA as a module

As it needs firmware to probe, and we cannot bundle it within the kernel
image because it is incompatible with the GPL.

Currently we rebind the driver after boot but that's slow and fragile,
as unloads of DRM drivers aren't generally tested.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7420>
This commit is contained in:
Tomeu Vizoso 2020-11-04 10:06:20 +01:00
parent bb41acf96a
commit 60c5729d16
8 changed files with 25 additions and 18 deletions

View File

@ -243,7 +243,7 @@ x86_build-base:
- .fdo.container-build@debian
- .container
variables:
FDO_DISTRIBUTION_TAG: &x86_build-base "2020-10-06-clang10-2"
FDO_DISTRIBUTION_TAG: &x86_build-base "2020-11-05-kmod"
.use-x86_build-base:
extends:
@ -261,7 +261,7 @@ x86_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_build "2020-10-09-spvtools-1"
FDO_DISTRIBUTION_TAG: &x86_build "2020-11-05-kmod"
.use-x86_build:
variables:
@ -276,7 +276,7 @@ i386_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &i386_build "2020-10-06-clang10-2"
FDO_DISTRIBUTION_TAG: &i386_build "2020-11-05-kmod"
.use-i386_build:
variables:
@ -291,7 +291,7 @@ ppc64el_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-10-06-clang10-2"
FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-11-05-kmod"
.use-ppc64el_build:
variables:
@ -306,7 +306,7 @@ s390x_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &s390x_build "2020-10-06-clang10-2"
FDO_DISTRIBUTION_TAG: &s390x_build "2020-11-05-kmod"
.use-s390x_build:
variables:
@ -321,7 +321,7 @@ android_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &android_build "2020-10-05-shrink"
FDO_DISTRIBUTION_TAG: &android_build "2020-11-05-kmod"
.use-android_build:
variables:
@ -335,7 +335,7 @@ android_build:
x86_test-base:
extends: x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-base "2020-10-06-clang10-2"
FDO_DISTRIBUTION_TAG: &x86_test-base "2020-11-05-kmod"
.use-x86_test-base:
extends:
@ -352,19 +352,19 @@ x86_test-base:
x86_test-gl:
extends: .use-x86_test-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-10-30-python3-modules-1"
FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-11-05-kmod"
# Debian 10 based x86 test image for VK
x86_test-vk:
extends: .use-x86_test-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-10-06-clang10-2"
FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-11-05-kmod"
# Debian 9 based x86 build image (old LLVM)
x86_build_old:
extends: x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_build_old "2020-08-13-gold"
FDO_DISTRIBUTION_TAG: &x86_build_old "2020-11-05-kmod"
FDO_DISTRIBUTION_VERSION: stretch-slim
.use-x86_build_old:
@ -381,7 +381,7 @@ arm_build:
- .fdo.container-build@debian@arm64v8
- .container
variables:
FDO_DISTRIBUTION_TAG: &arm_build "2020-09-10-libdrm"
FDO_DISTRIBUTION_TAG: &arm_build "2020-11-05-kmod"
.use-arm_build:
variables:

View File

@ -21,6 +21,7 @@ apt-get -y install \
flex \
g++ \
git \
kmod \
lavacli \
libdrm-dev \
libelf-dev \

View File

@ -141,16 +141,23 @@ for i in /usr/bin/*-ld /usr/bin/ld; do
done
export PATH=`pwd`/ld-links:$PATH
# Disable all modules in defconfig, so we only build the ones we want
sed -i 's/=m/=n/g' ${DEFCONFIG}
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/${KERNEL_ARCH}.config
make ${KERNEL_IMAGE_NAME}
for image in ${KERNEL_IMAGE_NAME}; do
cp arch/${KERNEL_ARCH}/boot/${image} /lava-files/.
done
if [[ -n ${DEVICE_TREES} ]]; then
make dtbs
cp ${DEVICE_TREES} /lava-files/.
fi
make modules
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
if [[ ${DEBIAN_ARCH} = "arm64" ]] && which mkimage > /dev/null; then
make Image.lzma
mkimage \

View File

@ -34,6 +34,7 @@ apt-get install -y --no-remove \
g++-mingw-w64-x86-64 \
gcc \
git \
kmod \
libclang-9-dev \
libclang-10-dev \
libclc-dev \

View File

@ -77,8 +77,7 @@ actions:
- echo "nameserver 8.8.8.8" > /etc/resolv.conf
- for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done
# amdgpu failed to find its firmware during boot, rebind
- echo 0000:00:01.0 > /sys/bus/pci/drivers/amdgpu/bind || true
- modprobe amdgpu || true
- DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
- echo performance > $DEVFREQ_GOVERNOR || true

View File

@ -1,5 +1,5 @@
variables:
DISTRIBUTION_TAG: "2020-11-05-new-kernel"
DISTRIBUTION_TAG: "2020-11-05-new-kernel-2"
.kernel+rootfs:
stage: container-2

View File

@ -77,8 +77,7 @@ actions:
- echo "nameserver 8.8.8.8" > /etc/resolv.conf
- for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done
# amdgpu failed to find its firmware during boot, rebind
- echo 0000:00:01.0 > /sys/bus/pci/drivers/amdgpu/bind || true
- modprobe amdgpu || true
{% if env_vars %}
- export {{ env_vars }}

View File

@ -52,8 +52,8 @@ CONFIG_ACPI_VIDEO=y
CONFIG_X86_AMD_FREQ_SENSITIVITY=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_AMD=y
CONFIG_DRM_AMDGPU=y
CONFIG_DRM_AMDGPU_SI=y
CONFIG_DRM_AMDGPU=m
CONFIG_DRM_AMDGPU_SI=m
CONFIG_DRM_AMD_ACP=n
CONFIG_ACPI_WMI=y
CONFIG_MXM_WMI=y