]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia.git/blob - kernel-5.16.patch
- up to 495.46
[packages/xorg-driver-video-nvidia.git] / kernel-5.16.patch
1 --- NVIDIA-Linux-x86_64-495.46/kernel/nvidia-uvm/uvm_migrate_pageable.c~        2021-10-27 19:14:51.000000000 +0200
2 +++ NVIDIA-Linux-x86_64-495.46/kernel/nvidia-uvm/uvm_migrate_pageable.c 2022-01-15 14:28:56.947610124 +0100
3 @@ -34,6 +34,8 @@
4  #include "uvm_migrate_pageable.h"
5  #include "uvm_populate_pageable.h"
6  
7 +#include <linux/version.h>
8 +
9  #ifdef UVM_MIGRATE_VMA_SUPPORTED
10  
11  static struct kmem_cache *g_uvm_migrate_vma_state_cache __read_mostly;
12 @@ -406,7 +408,11 @@
13          uvm_push_set_flag(&push, UVM_PUSH_FLAG_CE_NEXT_MEMBAR_NONE);
14          copying_gpu->parent->ce_hal->memset_8(&push, dst_address, 0, PAGE_SIZE);
15  
16 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
17          dst[i] = migrate_pfn(page_to_pfn(dst_page)) | MIGRATE_PFN_LOCKED;
18 +#else
19 +        dst[i] = migrate_pfn(page_to_pfn(dst_page));
20 +#endif
21      }
22  
23      if (copying_gpu) {
24 @@ -490,7 +496,11 @@
25          uvm_push_set_flag(&push, UVM_PUSH_FLAG_CE_NEXT_MEMBAR_NONE);
26          copying_gpu->parent->ce_hal->memcopy(&push, dst_address, src_address, PAGE_SIZE);
27  
28 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
29          dst[i] = migrate_pfn(page_to_pfn(dst_page)) | MIGRATE_PFN_LOCKED;
30 +#else
31 +        dst[i] = migrate_pfn(page_to_pfn(dst_page));
32 +#endif
33      }
34  
35      // TODO: Bug 1766424: If the destination is a GPU and the copy was done by
This page took 0.022811 seconds and 3 git commands to generate.