Skip to content

Commit

Permalink
linux-cachyos-autofdo: Sync nvidia patches
Browse files Browse the repository at this point in the history
Depends on CachyOS/kernel-patches#80

Signed-off-by: Eric Naim <dnaim@cachyos.org>
  • Loading branch information
1Naim authored and ptr1337 committed Nov 14, 2024
1 parent 43960df commit b43f233
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions linux-cachyos-autofdo/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -241,18 +241,19 @@ fi
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"${_patchsource}/misc/nvidia/0001-Make-modeset-and-fbdev-default-enabled.patch"
"${_patchsource}/misc/nvidia/0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch")
"${_patchsource}/misc/nvidia/0006-nvidia-drm-Set-FOP_UNSIGNED_OFFSET-for-nv_drm_fops.f.patch")
fi

if [ -n "$_build_nvidia_open" ]; then
source+=("nvidia-open-${_nv_ver}.tar.gz::https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/${_nv_ver}.tar.gz"
"${_patchsource}/misc/nvidia/0001-Make-modeset-and-fbdev-default-enabled.patch"
"${_patchsource}/misc/nvidia/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch"
"${_patchsource}/misc/nvidia/0003-Add-IBT-Support.patch"
"${_patchsource}/misc/nvidia/0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch"
"${_patchsource}/misc/nvidia/0006-silence-event-assert-until-570.patch"
"${_patchsource}/misc/nvidia/0009-fix-hdmi-names.patch")
"${_patchsource}/misc/nvidia/0004-silence-event-assert-until-570.patch"
"${_patchsource}/misc/nvidia/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch"
"${_patchsource}/misc/nvidia/0006-nvidia-drm-Set-FOP_UNSIGNED_OFFSET-for-nv_drm_fops.f.patch")
fi

# AutoFDO Profile
if [ -n "$_autofdo_use" ]; then
source+=("$_autofdo_profile_name")
Expand Down Expand Up @@ -559,21 +560,21 @@ prepare() {
# Use fbdev and modeset as default
patch -Np1 -i "${srcdir}/0001-Make-modeset-and-fbdev-default-enabled.patch" -d "${srcdir}/${_nv_pkg}/kernel"
# Fix for 6.12
patch -Np2 -i "${srcdir}/0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch" -d "${srcdir}/${_nv_pkg}/kernel"
patch -Np2 -i "${srcdir}/0006-nvidia-drm-Set-FOP_UNSIGNED_OFFSET-for-nv_drm_fops.f.patch" -d "${srcdir}/${_nv_pkg}/kernel"
fi

if [ -n "$_build_nvidia_open" ]; then
patch -Np1 -i "${srcdir}/0001-Make-modeset-and-fbdev-default-enabled.patch" -d "${srcdir}/${_nv_open_pkg}/kernel-open"
# Fix for https://bugs.archlinux.org/task/74886
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0003-Add-IBT-Support.patch" -d "${srcdir}/${_nv_open_pkg}"
# Fix for Zen5 error print in dmesg
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch" -d "${srcdir}/${_nv_open_pkg}"
# Add fix for 6.12 Display Open issue
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch" -d "${srcdir}/${_nv_open_pkg}"
# Fix for https://bugs.archlinux.org/task/74886
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0003-Add-IBT-Support.patch" -d "${srcdir}/${_nv_open_pkg}"
# Fix for CS2 dmesg spam
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0006-silence-event-assert-until-570.patch" -d "${srcdir}/${_nv_open_pkg}"
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0004-silence-event-assert-until-570.patch" -d "${srcdir}/${_nv_open_pkg}"
# Fix for HDMI names
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0009-fix-hdmi-names.patch" -d "${srcdir}/${_nv_open_pkg}"
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch" -d "${srcdir}/${_nv_open_pkg}"
# Add fix for 6.12 Display Open issue
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0006-nvidia-drm-Set-FOP_UNSIGNED_OFFSET-for-nv_drm_fops.f.patch" -d "${srcdir}/${_nv_open_pkg}"
fi
}

Expand Down

0 comments on commit b43f233

Please # to comment.