summaryrefslogtreecommitdiff
path: root/sys-kernel/nvidia-drivers-legacy-dkms/files/kernel-5.10.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-04 23:31:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-04 23:31:03 +0000
commit76104ded5a9422b8be30d005b8d8aa1eeb7e2d05 (patch)
tree183743211fe699a448bbc9cc96ee890bce977eae /sys-kernel/nvidia-drivers-legacy-dkms/files/kernel-5.10.patch
parent36a257bcfeb81ee489ddb43fcbbe531ce73c11ec (diff)
x11-drivers/nvidia-drivers-legacy : version bump (v390.141)
Diffstat (limited to 'sys-kernel/nvidia-drivers-legacy-dkms/files/kernel-5.10.patch')
-rw-r--r--sys-kernel/nvidia-drivers-legacy-dkms/files/kernel-5.10.patch145
1 files changed, 0 insertions, 145 deletions
diff --git a/sys-kernel/nvidia-drivers-legacy-dkms/files/kernel-5.10.patch b/sys-kernel/nvidia-drivers-legacy-dkms/files/kernel-5.10.patch
deleted file mode 100644
index 7591802a..00000000
--- a/sys-kernel/nvidia-drivers-legacy-dkms/files/kernel-5.10.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-diff --git a/kernel/common/inc/nv-linux.h b/kernel/common/inc/nv-linux.h
-index dd335b5..7eae890 100644
---- a/kernel/common/inc/nv-linux.h
-+++ b/kernel/common/inc/nv-linux.h
-@@ -178,6 +178,10 @@
- #include <linux/dma-mapping.h>
- #endif
-
-+#if defined(NV_LINUX_DMA_MAP_OPS_H_PRESENT)
-+#include <linux/dma-map-ops.h>
-+#endif
-+
- #if defined(CONFIG_SWIOTLB) && defined(NVCPU_AARCH64)
- #include <linux/swiotlb.h>
- #endif
-
-diff --git a/kernel/conftest.sh b/kernel/conftest.sh
-index 9612796..1c1eb30 100755
---- a/kernel/conftest.sh
-+++ b/kernel/conftest.sh
-@@ -134,6 +134,7 @@ test_headers() {
- FILES="$FILES linux/fence.h"
- FILES="$FILES linux/ktime.h"
- FILES="$FILES linux/dma-resv.h"
-+ FILES="$FILES linux/dma-map-ops.h"
-
- # Arch specific headers which need testing
- FILES_ARCH="asm/book3s/64/hash-64k.h"
-@@ -2046,6 +2046,7 @@
- #
- CODE="
- #include <linux/dma-mapping.h>
-+ #include <linux/dma-map-ops.h>
- void conftest_phys_to_dma(void) {
- phys_to_dma();
- }"
-@@ -2064,6 +2068,9 @@ compile_test() {
- #
- CODE="
- #include <linux/dma-mapping.h>
-+#if defined(NV_LINUX_DMA_MAP_OPS_H_PRESENT)
-+ #include <linux/dma-map-ops.h>
-+#endif
- void conftest_dma_ops(void) {
- (void)dma_ops;
- }"
-@@ -2078,6 +2085,9 @@ compile_test() {
- #
- CODE="
- #include <linux/dma-mapping.h>
-+#if defined(NV_LINUX_DMA_MAP_OPS_H_PRESENT)
-+ #include <linux/dma-map-ops.h>
-+#endif
- void conftest_dma_ops(void) {
- (void)swiotlb_dma_ops;
- }"
-@@ -2088,22 +2098,28 @@ compile_test() {
- dma_map_ops)
- #
- # Determine if the 'struct dma_map_ops' type is present.
-- #
-+ #
- CODE="
- #include <linux/dma-mapping.h>
-+#if defined(NV_LINUX_DMA_MAP_OPS_H_PRESENT)
-+ #include <linux/dma-map-ops.h>
-+#endif
- void conftest_dma_map_ops(void) {
- struct dma_map_ops ops;
- }"
-
- compile_check_conftest "$CODE" "NV_DMA_MAP_OPS_PRESENT" "" "types"
- ;;
--
-+
- get_dma_ops)
- #
- # Determine if the get_dma_ops() function is present.
- #
- CODE="
- #include <linux/dma-mapping.h>
-+#if defined(NV_LINUX_DMA_MAP_OPS_H_PRESENT)
-+ #include <linux/dma-map-ops.h>
-+#endif
- void conftest_get_dma_ops(void) {
- get_dma_ops();
- }"
-@@ -2117,6 +2133,9 @@ compile_test() {
- #
- CODE="
- #include <linux/dma-mapping.h>
-+#if defined(NV_LINUX_DMA_MAP_OPS_H_PRESENT)
-+ #include <linux/dma-map-ops.h>
-+#endif
- void conftest_noncoherent_swiotlb_dma_ops(void) {
- (void)noncoherent_swiotlb_dma_ops;
- }"
-@@ -2133,6 +2152,9 @@ compile_test() {
- #
- CODE="
- #include <linux/dma-mapping.h>
-+#if defined(NV_LINUX_DMA_MAP_OPS_H_PRESENT)
-+ #include <linux/dma-map-ops.h>
-+#endif
- void conftest_dma_map_resource(void) {
- dma_map_resource();
- }"
-@@ -3961,6 +3983,9 @@ compile_test() {
- #
- CODE="
- #include <linux/dma-mapping.h>
-+#if defined(NV_LINUX_DMA_MAP_OPS_H_PRESENT)
-+ #include <linux/dma-map-ops.h>
-+#endif
- void conftest_dma_is_direct(void) {
- dma_is_direct();
- }"
-diff --git a/kernel/nvidia-drm/nvidia-drm-gem-user-memory.c b/kernel/nvidia-drm/nvidia-drm-gem-user-memory.c
-index 76dedba..92a5192 100644
---- a/kernel/nvidia-drm/nvidia-drm-gem-user-memory.c
-+++ b/kernel/nvidia-drm/nvidia-drm-gem-user-memory.c
-@@ -20,6 +20,7 @@
- * DEALINGS IN THE SOFTWARE.
- */
-
-+#include <linux/version.h>
- #include "nvidia-drm-conftest.h"
-
- #if defined(NV_DRM_AVAILABLE)
-@@ -47,8 +48,13 @@ static struct sg_table *__nv_drm_gem_user_memory_prime_get_sg_table(
- {
- struct nv_drm_gem_user_memory *nv_user_memory = to_nv_user_memory(nv_gem);
-
-- return drm_prime_pages_to_sg(nv_user_memory->pages,
-- nv_user_memory->pages_count);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0))
-+ return drm_prime_pages_to_sg(nv_gem->nv_dev->dev, nv_user_memory->pages,
-+ nv_user_memory->pages_count);
-+#else
-+ return drm_prime_pages_to_sg(nv_user_memory->pages,
-+ nv_user_memory->pages_count);
-+#endif
- }
-
- static void *__nv_drm_gem_user_memory_prime_vmap(