From c4f549cdb190bfae296e395218188401520db476 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Fri, 9 Feb 2024 03:02:40 -0500 Subject: [PATCH] Add a modprobe config file to enable GSP on Turing and Ampere with NVK There are basically no situations where we want NVK running on Turing and Ampere without GSP firmware, so we override the upstream default of not enabling GSP with a modprobe config file until upstream enables it by default. --- mesa.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mesa.spec b/mesa.spec index a28b64a..3a92cd3 100644 --- a/mesa.spec +++ b/mesa.spec @@ -147,6 +147,7 @@ BuildRequires: (crate(proc-macro2) >= 1.0.56 with crate(proc-macro2) < 2) BuildRequires: (crate(quote) >= 1.0.25 with crate(quote) < 2) BuildRequires: (crate(syn/clone-impls) >= 2.0.15 with crate(syn/clone-impls) < 3) BuildRequires: (crate(unicode-ident) >= 1.0.6 with crate(unicode-ident) < 2) +BuildRequires: systemd-rpm-macros %endif %if %{with valgrind} BuildRequires: pkgconfig(valgrind) @@ -460,6 +461,16 @@ for i in libOSMesa*.so libGL.so ; do done popd +%if 0%{?with_nvk} +# Temporarily produce a modprobe file that enables nouveau+gsp for Turing/Ampere +# until enabled upstream by default +mkdir -p %{buildroot}%{_modprobedir} +cat > %{buildroot}%{_modprobedir}/nouveau-gsp.conf << NOUVEAUEOF +# Enable GSP firmware for Turing and Ampere +options nouveau config=NvGspRm=1 +NOUVEAUEOF +%endif + %files filesystem %doc docs/Mesa-MLAA-License-Clarification-Email.txt %dir %{_libdir}/dri @@ -677,6 +688,7 @@ popd %{_datadir}/drirc.d/00-radv-defaults.conf %{_datadir}/vulkan/icd.d/radeon_icd.*.json %if 0%{?with_nvk} +%{_modprobedir}/nouveau-gsp.conf %{_libdir}/libvulkan_nouveau.so %{_datadir}/vulkan/icd.d/nouveau_icd.*.json %endif