Skip to content

Commit 7c345b8

Browse files
committed
520.56.06
1 parent 90eb107 commit 7c345b8

File tree

40 files changed

+323
-545
lines changed

40 files changed

+323
-545
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Release 520 Entries
44

5+
### [520.56.06] 2022-10-12
6+
7+
#### Added
8+
9+
- Introduce support for GeForce RTX 4090 GPUs.
10+
511
### [520.61.05] 2022-10-10
612

713
#### Added

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NVIDIA Linux Open GPU Kernel Module Source
22

33
This is the source release of the NVIDIA Linux open GPU kernel modules,
4-
version 520.61.05.
4+
version 520.56.06.
55

66

77
## How to Build
@@ -17,7 +17,7 @@ as root:
1717

1818
Note that the kernel modules built here must be used with gsp.bin
1919
firmware and user-space NVIDIA GPU driver components from a corresponding
20-
520.61.05 driver release. This can be achieved by installing
20+
520.56.06 driver release. This can be achieved by installing
2121
the NVIDIA GPU driver from the .run file using the `--no-kernel-modules`
2222
option. E.g.,
2323

@@ -167,15 +167,15 @@ for the target kernel.
167167
## Compatible GPUs
168168

169169
The open-gpu-kernel-modules can be used on any Turing or later GPU
170-
(see the table below). However, in the 520.61.05 release,
170+
(see the table below). However, in the 520.56.06 release,
171171
GeForce and Workstation support is still considered alpha-quality.
172172

173173
To enable use of the open kernel modules on GeForce and Workstation GPUs,
174174
set the "NVreg_OpenRmEnableUnsupportedGpus" nvidia.ko kernel module
175175
parameter to 1. For more details, see the NVIDIA GPU driver end user
176176
README here:
177177

178-
https://us.download.nvidia.com/XFree86/Linux-x86_64/520.61.05/README/kernel_open.html
178+
https://us.download.nvidia.com/XFree86/Linux-x86_64/520.56.06/README/kernel_open.html
179179

180180
In the below table, if three IDs are listed, the first is the PCI Device
181181
ID, the second is the PCI Subsystem Vendor ID, and the third is the PCI
@@ -685,6 +685,7 @@ Subsystem Device ID.
685685
| NVIDIA GeForce RTX 3090 Ti | 2203 |
686686
| NVIDIA GeForce RTX 3090 | 2204 |
687687
| NVIDIA GeForce RTX 3080 | 2206 |
688+
| NVIDIA GeForce RTX 3070 Ti | 2207 |
688689
| NVIDIA GeForce RTX 3080 Ti | 2208 |
689690
| NVIDIA GeForce RTX 3080 | 220A |
690691
| NVIDIA CMP 90HX | 220D |
@@ -709,6 +710,7 @@ Subsystem Device ID.
709710
| NVIDIA A10 | 2236 10DE 1482 |
710711
| NVIDIA A10G | 2237 10DE 152F |
711712
| NVIDIA A10M | 2238 10DE 1677 |
713+
| NVIDIA H100 PCIe | 2331 10DE 1626 |
712714
| NVIDIA GeForce RTX 3060 Ti | 2414 |
713715
| NVIDIA GeForce RTX 3080 Ti Laptop GPU | 2420 |
714716
| NVIDIA RTX A5500 Laptop GPU | 2438 |
@@ -736,6 +738,7 @@ Subsystem Device ID.
736738
| NVIDIA RTX A3000 12GB Laptop GPU | 24B9 |
737739
| NVIDIA RTX A4500 Laptop GPU | 24BA |
738740
| NVIDIA RTX A3000 12GB Laptop GPU | 24BB |
741+
| NVIDIA GeForce RTX 3060 Ti | 24C9 |
739742
| NVIDIA GeForce RTX 3080 Laptop GPU | 24DC |
740743
| NVIDIA GeForce RTX 3070 Laptop GPU | 24DD |
741744
| NVIDIA GeForce RTX 3070 Ti Laptop GPU | 24E0 |
@@ -751,6 +754,7 @@ Subsystem Device ID.
751754
| NVIDIA RTX A2000 | 2531 103C 151D |
752755
| NVIDIA RTX A2000 | 2531 10DE 151D |
753756
| NVIDIA RTX A2000 | 2531 17AA 151D |
757+
| NVIDIA GeForce RTX 3060 | 2544 |
754758
| NVIDIA GeForce RTX 3060 Laptop GPU | 2560 |
755759
| NVIDIA GeForce RTX 3050 Ti Laptop GPU | 2563 |
756760
| NVIDIA RTX A2000 12GB | 2571 1028 1611 |

kernel-open/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ EXTRA_CFLAGS += -I$(src)/common/inc
7272
EXTRA_CFLAGS += -I$(src)
7373
EXTRA_CFLAGS += -Wall -MD $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-error -Wno-format-extra-args
7474
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
75-
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"520.61.05\"
75+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"520.56.06\"
7676

7777
EXTRA_CFLAGS += -Wno-unused-function
7878

kernel-open/common/inc/nv-pgprot.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,13 @@ static inline pgprot_t pgprot_modify_writecombine(pgprot_t old_prot)
7878

7979
#define NV_PGPROT_UNCACHED_DEVICE(old_prot) pgprot_noncached(old_prot)
8080
#if defined(NVCPU_AARCH64)
81+
#if defined(NV_MT_DEVICE_GRE_PRESENT)
82+
#define NV_PROT_WRITE_COMBINED_DEVICE (PROT_DEFAULT | PTE_PXN | PTE_UXN | \
83+
PTE_ATTRINDX(MT_DEVICE_GRE))
84+
#else
8185
#define NV_PROT_WRITE_COMBINED_DEVICE (PROT_DEFAULT | PTE_PXN | PTE_UXN | \
8286
PTE_ATTRINDX(MT_DEVICE_nGnRE))
87+
#endif
8388
#define NV_PGPROT_WRITE_COMBINED_DEVICE(old_prot) \
8489
__pgprot_modify(old_prot, PTE_ATTRINDX_MASK, NV_PROT_WRITE_COMBINED_DEVICE)
8590
#define NV_PGPROT_WRITE_COMBINED(old_prot) NV_PGPROT_UNCACHED(old_prot)

kernel-open/common/inc/nv.h

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -636,33 +636,27 @@ typedef enum
636636
#define NV_GET_NV_STATE(pGpu) \
637637
(nv_state_t *)((pGpu) ? (pGpu)->pOsGpuInfo : NULL)
638638

639-
static inline NvBool IS_REG_OFFSET(nv_state_t *nv, NvU64 offset, NvU64 length)
640-
{
641-
return ((offset >= nv->regs->cpu_address) &&
642-
((offset + (length - 1)) <= (nv->regs->cpu_address + (nv->regs->size - 1))));
643-
}
644-
645-
static inline NvBool IS_FB_OFFSET(nv_state_t *nv, NvU64 offset, NvU64 length)
646-
{
647-
return ((nv->fb) && (offset >= nv->fb->cpu_address) &&
648-
((offset + (length - 1)) <= (nv->fb->cpu_address + (nv->fb->size - 1))));
649-
}
650-
651-
static inline NvBool IS_UD_OFFSET(nv_state_t *nv, NvU64 offset, NvU64 length)
652-
{
653-
return ((nv->ud.cpu_address != 0) && (nv->ud.size != 0) &&
654-
(offset >= nv->ud.cpu_address) &&
655-
((offset + (length - 1)) <= (nv->ud.cpu_address + (nv->ud.size - 1))));
656-
}
657-
658-
static inline NvBool IS_IMEM_OFFSET(nv_state_t *nv, NvU64 offset, NvU64 length)
659-
{
660-
return ((nv->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address != 0) &&
661-
(nv->bars[NV_GPU_BAR_INDEX_IMEM].size != 0) &&
662-
(offset >= nv->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address) &&
663-
((offset + (length - 1)) <= (nv->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address +
664-
(nv->bars[NV_GPU_BAR_INDEX_IMEM].size - 1))));
665-
}
639+
#define IS_REG_OFFSET(nv, offset, length) \
640+
(((offset) >= (nv)->regs->cpu_address) && \
641+
(((offset) + ((length)-1)) <= \
642+
(nv)->regs->cpu_address + ((nv)->regs->size-1)))
643+
644+
#define IS_FB_OFFSET(nv, offset, length) \
645+
(((nv)->fb) && ((offset) >= (nv)->fb->cpu_address) && \
646+
(((offset) + ((length)-1)) <= (nv)->fb->cpu_address + ((nv)->fb->size-1)))
647+
648+
#define IS_UD_OFFSET(nv, offset, length) \
649+
(((nv)->ud.cpu_address != 0) && ((nv)->ud.size != 0) && \
650+
((offset) >= (nv)->ud.cpu_address) && \
651+
(((offset) + ((length)-1)) <= (nv)->ud.cpu_address + ((nv)->ud.size-1)))
652+
653+
#define IS_IMEM_OFFSET(nv, offset, length) \
654+
(((nv)->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address != 0) && \
655+
((nv)->bars[NV_GPU_BAR_INDEX_IMEM].size != 0) && \
656+
((offset) >= (nv)->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address) && \
657+
(((offset) + ((length) - 1)) <= \
658+
(nv)->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address + \
659+
((nv)->bars[NV_GPU_BAR_INDEX_IMEM].size - 1)))
666660

667661
#define NV_RM_MAX_MSIX_LINES 8
668662

kernel-open/conftest.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,6 +2334,23 @@ compile_test() {
23342334
compile_check_conftest "$CODE" "NV_PCI_DEV_HAS_ATS_ENABLED" "" "types"
23352335
;;
23362336

2337+
mt_device_gre)
2338+
#
2339+
# Determine if MT_DEVICE_GRE flag is present.
2340+
#
2341+
# MT_DEVICE_GRE flag is removed by commit 58cc6b72a21274
2342+
# ("arm64: mm: Remove unused support for Device-GRE memory type") in v5.14-rc1
2343+
# (2021-06-01).
2344+
#
2345+
CODE="
2346+
#include <asm/memory.h>
2347+
unsigned int conftest_mt_device_gre(void) {
2348+
return MT_DEVICE_GRE;
2349+
}"
2350+
2351+
compile_check_conftest "$CODE" "NV_MT_DEVICE_GRE_PRESENT" "" "types"
2352+
;;
2353+
23372354
get_user_pages)
23382355
#
23392356
# Conftest for get_user_pages()

kernel-open/nvidia/nv-mmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static int nvidia_mmap_numa(
431431
const nv_alloc_mapping_context_t *mmap_context)
432432
{
433433
NvU64 start, addr;
434-
NvU64 pages;
434+
unsigned int pages;
435435
NvU64 i;
436436

437437
pages = NV_VMA_SIZE(vma) >> PAGE_SHIFT;

kernel-open/nvidia/nv.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,9 +1429,6 @@ static int nv_open_device(nv_state_t *nv, nvidia_stack_t *sp)
14291429
return -ENODEV;
14301430
}
14311431

1432-
if (unlikely(NV_ATOMIC_READ(nvl->usage_count) >= NV_S32_MAX))
1433-
return -EMFILE;
1434-
14351432
if ( ! (nv->flags & NV_FLAG_OPEN))
14361433
{
14371434
/* Sanity check: !NV_FLAG_OPEN requires usage_count == 0 */

kernel-open/nvidia/nvidia.Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += vmalloc_has_pgprot_t_arg
243243
NV_CONFTEST_TYPE_COMPILE_TESTS += mm_has_mmap_lock
244244
NV_CONFTEST_TYPE_COMPILE_TESTS += pci_channel_state
245245
NV_CONFTEST_TYPE_COMPILE_TESTS += pci_dev_has_ats_enabled
246+
NV_CONFTEST_TYPE_COMPILE_TESTS += mt_device_gre
246247
NV_CONFTEST_TYPE_COMPILE_TESTS += remove_memory_has_nid_arg
247248
NV_CONFTEST_TYPE_COMPILE_TESTS += add_memory_driver_managed_has_mhp_flags_arg
248249
NV_CONFTEST_TYPE_COMPILE_TESTS += num_registered_fb

kernel-open/nvidia/nvlink_linux.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2015-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2015-2019 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: MIT
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -207,6 +207,8 @@ static int nvlink_fops_release(struct inode *inode, struct file *filp)
207207

208208
nvlink_print(NVLINK_DBG_INFO, "nvlink driver close\n");
209209

210+
WARN_ON(private == NULL);
211+
210212
mutex_lock(&nvlink_drvctx.lock);
211213

212214
if (private->capability_fds.fabric_mgmt > 0)

0 commit comments

Comments
 (0)