mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 13:30:12 +01:00
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:
parent
bb41acf96a
commit
60c5729d16
8 changed files with 25 additions and 18 deletions
|
|
@ -243,7 +243,7 @@ x86_build-base:
|
||||||
- .fdo.container-build@debian
|
- .fdo.container-build@debian
|
||||||
- .container
|
- .container
|
||||||
variables:
|
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:
|
.use-x86_build-base:
|
||||||
extends:
|
extends:
|
||||||
|
|
@ -261,7 +261,7 @@ x86_build:
|
||||||
extends:
|
extends:
|
||||||
- .use-x86_build-base
|
- .use-x86_build-base
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: &x86_build "2020-10-09-spvtools-1"
|
FDO_DISTRIBUTION_TAG: &x86_build "2020-11-05-kmod"
|
||||||
|
|
||||||
.use-x86_build:
|
.use-x86_build:
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -276,7 +276,7 @@ i386_build:
|
||||||
extends:
|
extends:
|
||||||
- .use-x86_build-base
|
- .use-x86_build-base
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: &i386_build "2020-10-06-clang10-2"
|
FDO_DISTRIBUTION_TAG: &i386_build "2020-11-05-kmod"
|
||||||
|
|
||||||
.use-i386_build:
|
.use-i386_build:
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -291,7 +291,7 @@ ppc64el_build:
|
||||||
extends:
|
extends:
|
||||||
- .use-x86_build-base
|
- .use-x86_build-base
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-10-06-clang10-2"
|
FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-11-05-kmod"
|
||||||
|
|
||||||
.use-ppc64el_build:
|
.use-ppc64el_build:
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -306,7 +306,7 @@ s390x_build:
|
||||||
extends:
|
extends:
|
||||||
- .use-x86_build-base
|
- .use-x86_build-base
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: &s390x_build "2020-10-06-clang10-2"
|
FDO_DISTRIBUTION_TAG: &s390x_build "2020-11-05-kmod"
|
||||||
|
|
||||||
.use-s390x_build:
|
.use-s390x_build:
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -321,7 +321,7 @@ android_build:
|
||||||
extends:
|
extends:
|
||||||
- .use-x86_build-base
|
- .use-x86_build-base
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: &android_build "2020-10-05-shrink"
|
FDO_DISTRIBUTION_TAG: &android_build "2020-11-05-kmod"
|
||||||
|
|
||||||
.use-android_build:
|
.use-android_build:
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -335,7 +335,7 @@ android_build:
|
||||||
x86_test-base:
|
x86_test-base:
|
||||||
extends: x86_build-base
|
extends: x86_build-base
|
||||||
variables:
|
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:
|
.use-x86_test-base:
|
||||||
extends:
|
extends:
|
||||||
|
|
@ -352,19 +352,19 @@ x86_test-base:
|
||||||
x86_test-gl:
|
x86_test-gl:
|
||||||
extends: .use-x86_test-base
|
extends: .use-x86_test-base
|
||||||
variables:
|
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
|
# Debian 10 based x86 test image for VK
|
||||||
x86_test-vk:
|
x86_test-vk:
|
||||||
extends: .use-x86_test-base
|
extends: .use-x86_test-base
|
||||||
variables:
|
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)
|
# Debian 9 based x86 build image (old LLVM)
|
||||||
x86_build_old:
|
x86_build_old:
|
||||||
extends: x86_build-base
|
extends: x86_build-base
|
||||||
variables:
|
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
|
FDO_DISTRIBUTION_VERSION: stretch-slim
|
||||||
|
|
||||||
.use-x86_build_old:
|
.use-x86_build_old:
|
||||||
|
|
@ -381,7 +381,7 @@ arm_build:
|
||||||
- .fdo.container-build@debian@arm64v8
|
- .fdo.container-build@debian@arm64v8
|
||||||
- .container
|
- .container
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: &arm_build "2020-09-10-libdrm"
|
FDO_DISTRIBUTION_TAG: &arm_build "2020-11-05-kmod"
|
||||||
|
|
||||||
.use-arm_build:
|
.use-arm_build:
|
||||||
variables:
|
variables:
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ apt-get -y install \
|
||||||
flex \
|
flex \
|
||||||
g++ \
|
g++ \
|
||||||
git \
|
git \
|
||||||
|
kmod \
|
||||||
lavacli \
|
lavacli \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
libelf-dev \
|
libelf-dev \
|
||||||
|
|
|
||||||
|
|
@ -141,16 +141,23 @@ for i in /usr/bin/*-ld /usr/bin/ld; do
|
||||||
done
|
done
|
||||||
export PATH=`pwd`/ld-links:$PATH
|
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
|
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/${KERNEL_ARCH}.config
|
||||||
make ${KERNEL_IMAGE_NAME}
|
make ${KERNEL_IMAGE_NAME}
|
||||||
for image in ${KERNEL_IMAGE_NAME}; do
|
for image in ${KERNEL_IMAGE_NAME}; do
|
||||||
cp arch/${KERNEL_ARCH}/boot/${image} /lava-files/.
|
cp arch/${KERNEL_ARCH}/boot/${image} /lava-files/.
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -n ${DEVICE_TREES} ]]; then
|
if [[ -n ${DEVICE_TREES} ]]; then
|
||||||
make dtbs
|
make dtbs
|
||||||
cp ${DEVICE_TREES} /lava-files/.
|
cp ${DEVICE_TREES} /lava-files/.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
make modules
|
||||||
|
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
|
||||||
|
|
||||||
if [[ ${DEBIAN_ARCH} = "arm64" ]] && which mkimage > /dev/null; then
|
if [[ ${DEBIAN_ARCH} = "arm64" ]] && which mkimage > /dev/null; then
|
||||||
make Image.lzma
|
make Image.lzma
|
||||||
mkimage \
|
mkimage \
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ apt-get install -y --no-remove \
|
||||||
g++-mingw-w64-x86-64 \
|
g++-mingw-w64-x86-64 \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
|
kmod \
|
||||||
libclang-9-dev \
|
libclang-9-dev \
|
||||||
libclang-10-dev \
|
libclang-10-dev \
|
||||||
libclc-dev \
|
libclc-dev \
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,7 @@ actions:
|
||||||
- echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
- 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
|
- 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
|
- modprobe amdgpu || true
|
||||||
- echo 0000:00:01.0 > /sys/bus/pci/drivers/amdgpu/bind || true
|
|
||||||
|
|
||||||
- DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
|
- DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
|
||||||
- echo performance > $DEVFREQ_GOVERNOR || true
|
- echo performance > $DEVFREQ_GOVERNOR || true
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
variables:
|
variables:
|
||||||
DISTRIBUTION_TAG: "2020-11-05-new-kernel"
|
DISTRIBUTION_TAG: "2020-11-05-new-kernel-2"
|
||||||
|
|
||||||
.kernel+rootfs:
|
.kernel+rootfs:
|
||||||
stage: container-2
|
stage: container-2
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,7 @@ actions:
|
||||||
- echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
- 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
|
- 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
|
- modprobe amdgpu || true
|
||||||
- echo 0000:00:01.0 > /sys/bus/pci/drivers/amdgpu/bind || true
|
|
||||||
|
|
||||||
{% if env_vars %}
|
{% if env_vars %}
|
||||||
- export {{ env_vars }}
|
- export {{ env_vars }}
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,8 @@ CONFIG_ACPI_VIDEO=y
|
||||||
CONFIG_X86_AMD_FREQ_SENSITIVITY=y
|
CONFIG_X86_AMD_FREQ_SENSITIVITY=y
|
||||||
CONFIG_PINCTRL=y
|
CONFIG_PINCTRL=y
|
||||||
CONFIG_PINCTRL_AMD=y
|
CONFIG_PINCTRL_AMD=y
|
||||||
CONFIG_DRM_AMDGPU=y
|
CONFIG_DRM_AMDGPU=m
|
||||||
CONFIG_DRM_AMDGPU_SI=y
|
CONFIG_DRM_AMDGPU_SI=m
|
||||||
CONFIG_DRM_AMD_ACP=n
|
CONFIG_DRM_AMD_ACP=n
|
||||||
CONFIG_ACPI_WMI=y
|
CONFIG_ACPI_WMI=y
|
||||||
CONFIG_MXM_WMI=y
|
CONFIG_MXM_WMI=y
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue