mirror of
https://github.com/Frogging-Family/nvidia-all
synced 2024-11-01 09:20:18 +00:00
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
diff --git a/kernel-dkms/nvidia-drm/nvidia-drm-drv.c b/kernel-dkms/nvidia-drm/nvidia-drm-drv.c
|
|
index ef89513..7f0707d 100644
|
|
--- a/kernel-dkms/nvidia-drm/nvidia-drm-drv.c
|
|
+++ b/kernel-dkms/nvidia-drm/nvidia-drm-drv.c
|
|
@@ -855,7 +855,9 @@ static void nv_drm_update_drm_driver_features(void)
|
|
|
|
nv_drm_driver.dumb_create = nv_drm_dumb_create;
|
|
nv_drm_driver.dumb_map_offset = nv_drm_dumb_map_offset;
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
|
|
nv_drm_driver.dumb_destroy = drm_gem_dumb_destroy;
|
|
+#endif
|
|
#endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
|
|
}
|
|
|
|
diff --git a/kernel-dkms/nvidia-drm/nvidia-drm-gem-user-memory.c b/kernel-dkms/nvidia-drm/nvidia-drm-gem-user-memory.c
|
|
index 89ab321..f29b644 100644
|
|
--- a/kernel-dkms/nvidia-drm/nvidia-drm-gem-user-memory.c
|
|
+++ b/kernel-dkms/nvidia-drm/nvidia-drm-gem-user-memory.c
|
|
@@ -208,7 +208,11 @@ struct nv_drm_gem_user_memory *nv_drm_gem_user_memory_import_sg_table(
|
|
return NULL;
|
|
}
|
|
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
|
|
if (drm_prime_sg_to_page_addr_arrays(sgt, pages, NULL, pages_count) < 0) {
|
|
+#else
|
|
+ if (drm_prime_sg_to_page_array(sgt, pages, pages_count) < 0) {
|
|
+#endif
|
|
nv_drm_free(nv_user_memory);
|
|
nv_drm_free(pages);
|
|
return NULL;
|