Mesa (master): ci: Distribute ADMGPU driver to LAVA as a module
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 5 16:30:21 UTC 2020
Module: Mesa
Branch: master
Commit: 60c5729d1669f9d91cc77d71f8e1893f2c0d0c94
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=60c5729d1669f9d91cc77d71f8e1893f2c0d0c94
Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date: Wed Nov 4 10:06:20 2020 +0100
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 at collabora.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7420>
---
.gitlab-ci.yml | 22 +++++++++++-----------
.gitlab-ci/container/arm_build.sh | 1 +
.gitlab-ci/container/lava_build.sh | 7 +++++++
.gitlab-ci/container/x86_build-base.sh | 1 +
.gitlab-ci/lava-deqp.yml.jinja2 | 3 +--
.gitlab-ci/lava-gitlab-ci.yml | 2 +-
.gitlab-ci/lava-tracie.yml.jinja2 | 3 +--
.gitlab-ci/x86_64.config | 4 ++--
8 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4b9877cdcf3..21648504b53 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -243,7 +243,7 @@ x86_build-base:
- .fdo.container-build at 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 at 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:
diff --git a/.gitlab-ci/container/arm_build.sh b/.gitlab-ci/container/arm_build.sh
index 29494b381d7..56b411fb909 100644
--- a/.gitlab-ci/container/arm_build.sh
+++ b/.gitlab-ci/container/arm_build.sh
@@ -21,6 +21,7 @@ apt-get -y install \
flex \
g++ \
git \
+ kmod \
lavacli \
libdrm-dev \
libelf-dev \
diff --git a/.gitlab-ci/container/lava_build.sh b/.gitlab-ci/container/lava_build.sh
index 400f092a5b4..2f3aa78e8da 100755
--- a/.gitlab-ci/container/lava_build.sh
+++ b/.gitlab-ci/container/lava_build.sh
@@ -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 \
diff --git a/.gitlab-ci/container/x86_build-base.sh b/.gitlab-ci/container/x86_build-base.sh
index f2be201fc37..9363b76e115 100644
--- a/.gitlab-ci/container/x86_build-base.sh
+++ b/.gitlab-ci/container/x86_build-base.sh
@@ -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 \
diff --git a/.gitlab-ci/lava-deqp.yml.jinja2 b/.gitlab-ci/lava-deqp.yml.jinja2
index e29d310c20d..7b2b91b4793 100644
--- a/.gitlab-ci/lava-deqp.yml.jinja2
+++ b/.gitlab-ci/lava-deqp.yml.jinja2
@@ -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
diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml
index 486c2753d14..12c96861d64 100644
--- a/.gitlab-ci/lava-gitlab-ci.yml
+++ b/.gitlab-ci/lava-gitlab-ci.yml
@@ -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
diff --git a/.gitlab-ci/lava-tracie.yml.jinja2 b/.gitlab-ci/lava-tracie.yml.jinja2
index 660ecfd6535..3d546c24d4d 100644
--- a/.gitlab-ci/lava-tracie.yml.jinja2
+++ b/.gitlab-ci/lava-tracie.yml.jinja2
@@ -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 }}
diff --git a/.gitlab-ci/x86_64.config b/.gitlab-ci/x86_64.config
index 46d0d970675..63b5e3ada33 100644
--- a/.gitlab-ci/x86_64.config
+++ b/.gitlab-ci/x86_64.config
@@ -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
More information about the mesa-commit
mailing list