Tk-Glitch 2024-03-30 15:02:29 +01:00
parent 6f64eca837
commit d9e8bf04b3
2 changed files with 97 additions and 1 deletions

View File

@ -375,6 +375,7 @@ source=($_source_name
'kernel-6.5.patch' 'kernel-6.5.patch'
'legacy-kernel-6.6.diff' 'legacy-kernel-6.6.diff'
'6.1-6-7-8-gpl.diff' '6.1-6-7-8-gpl.diff'
'kernel-6.8.patch'
) )
msg2 "Selected driver integrity check behavior (md5sum or SKIP): $_md5sum" # If the driver is "known", return md5sum. If it isn't, return SKIP msg2 "Selected driver integrity check behavior (md5sum or SKIP): $_md5sum" # If the driver is "known", return md5sum. If it isn't, return SKIP
@ -425,7 +426,8 @@ md5sums=("$_md5sum"
'50d3eac54d14d44d70df92770a3a9abf' '50d3eac54d14d44d70df92770a3a9abf'
'b81cac7573842ebd7af30fdf851c63f9' 'b81cac7573842ebd7af30fdf851c63f9'
'd11cb3bd76ab61a0f086aea9a0c53087' 'd11cb3bd76ab61a0f086aea9a0c53087'
'f7f95287eb18be63bfad0427f13b6d43') 'f7f95287eb18be63bfad0427f13b6d43'
'7481cb7f52b76c426d579b115e4c84b6')
if [ "$_open_source_modules" = "true" ]; then if [ "$_open_source_modules" = "true" ]; then
if [[ "$_srcbase" == "NVIDIA-kernel-module-source" ]]; then if [[ "$_srcbase" == "NVIDIA-kernel-module-source" ]]; then
@ -878,6 +880,12 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
fi fi
fi fi
# 6.6
if (( $(vercmp "$_kernel" "6.8") >= 0 )); then
_kernel68="1"
_whitelist68=(525*)
fi
# Loop patches (linux-4.15.patch, lol.patch, ...) # Loop patches (linux-4.15.patch, lol.patch, ...)
for _p in $(printf -- '%s\n' ${source[@]} | grep .patch); do # https://stackoverflow.com/a/21058239/1821548 for _p in $(printf -- '%s\n' ${source[@]} | grep .patch); do # https://stackoverflow.com/a/21058239/1821548
# Patch version (4.15, "", ...) # Patch version (4.15, "", ...)
@ -958,6 +966,9 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
if [ "$_patch" = "6.6" ]; then if [ "$_patch" = "6.6" ]; then
_whitelist=(${_whitelist66[@]}) _whitelist=(${_whitelist66[@]})
fi fi
if [ "$_patch" = "6.8" ]; then
_whitelist=(${_whitelist68[@]})
fi
patchy=0 patchy=0
if (( $(vercmp "$_kernel" "$_patch") >= 0 )); then if (( $(vercmp "$_kernel" "$_patch") >= 0 )); then
for yup in "${_whitelist[@]}"; do for yup in "${_whitelist[@]}"; do
@ -1397,6 +1408,20 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
fi fi
fi fi
# 6.8
if [ "$_kernel68" = "1" ]; then
patchy=0
for yup in "${_whitelist68[@]}"; do
[[ $pkgver = $yup ]] && patchy=1
done
if [ "$patchy" = "1" ]; then
msg2 "Applying kernel-6.8.patch for dkms..."
patch -Np1 -i "$srcdir"/kernel-6.8.patch
else
msg2 "Skipping kernel-6.8.patch as it doesn't apply to this driver version..."
fi
fi
# Legacy quirks # Legacy quirks
if [ "$_oldstuff" = "1" ]; then if [ "$_oldstuff" = "1" ]; then
msg2 "Applying 01-ipmi-vm.diff for dkms..." msg2 "Applying 01-ipmi-vm.diff for dkms..."

71
patches/kernel-6.8.patch Normal file
View File

@ -0,0 +1,71 @@
diff --git a/kernel-dkms/nvidia-drm/nvidia-drm-drv.c b/kernel-dkms/nvidia-drm/nvidia-drm-drv.c
index 74f8583..6563e9f 100644
--- a/kernel-dkms/nvidia-drm/nvidia-drm-drv.c
+++ b/kernel-dkms/nvidia-drm/nvidia-drm-drv.c
@@ -790,29 +790,29 @@ static const struct drm_ioctl_desc nv_drm_ioctls[] = {
#if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_NVKMS_MEMORY,
nv_drm_gem_import_nvkms_memory_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
#endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_USERSPACE_MEMORY,
nv_drm_gem_import_userspace_memory_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_MAP_OFFSET,
nv_drm_gem_map_offset_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(NVIDIA_GET_DEV_INFO,
nv_drm_get_dev_info_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
#if defined(NV_DRM_FENCE_AVAILABLE)
DRM_IOCTL_DEF_DRV(NVIDIA_FENCE_SUPPORTED,
nv_drm_fence_supported_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(NVIDIA_FENCE_CONTEXT_CREATE,
nv_drm_fence_context_create_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_FENCE_ATTACH,
nv_drm_gem_fence_attach_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
#endif
DRM_IOCTL_DEF_DRV(NVIDIA_GET_CLIENT_CAPABILITY,
@@ -821,22 +821,22 @@ static const struct drm_ioctl_desc nv_drm_ioctls[] = {
#if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
DRM_IOCTL_DEF_DRV(NVIDIA_GET_CRTC_CRC32,
nv_drm_get_crtc_crc32_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(NVIDIA_GET_CRTC_CRC32_V2,
nv_drm_get_crtc_crc32_v2_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_EXPORT_NVKMS_MEMORY,
nv_drm_gem_export_nvkms_memory_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_ALLOC_NVKMS_MEMORY,
nv_drm_gem_alloc_nvkms_memory_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_EXPORT_DMABUF_MEMORY,
nv_drm_gem_export_dmabuf_memory_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IDENTIFY_OBJECT,
nv_drm_gem_identify_object_ioctl,
- DRM_RENDER_ALLOW|DRM_UNLOCKED),
+ DRM_RENDER_ALLOW),
#endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
};