Skip to content

Commit 2ccbad2

Browse files
committed
590.48.01
1 parent a5bfb10 commit 2ccbad2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2054
-359
lines changed

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 590.44.01.
4+
version 590.48.01.
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
1919
firmware and user-space NVIDIA GPU driver components from a corresponding
20-
590.44.01 driver release. This can be achieved by installing
20+
590.48.01 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

@@ -185,7 +185,7 @@ table below).
185185
For details on feature support and limitations, see the NVIDIA GPU driver
186186
end user README here:
187187

188-
https://us.download.nvidia.com/XFree86/Linux-x86_64/590.44.01/README/kernel_open.html
188+
https://us.download.nvidia.com/XFree86/Linux-x86_64/590.48.01/README/kernel_open.html
189189

190190
For vGPU support, please refer to the README.vgpu packaged in the vGPU Host
191191
Package for more details.
@@ -313,7 +313,6 @@ Subsystem Device ID.
313313
| NVIDIA GeForce RTX 2080 Super with Max-Q Design | 1E93 1D05 1089 |
314314
| Quadro RTX 5000 | 1EB0 |
315315
| Quadro RTX 4000 | 1EB1 |
316-
| EIZO Quadro MED-XN92 | 1EB1 15C3 12A0 |
317316
| Quadro RTX 5000 | 1EB5 |
318317
| Quadro RTX 5000 with Max-Q Design | 1EB5 1025 1375 |
319318
| Quadro RTX 5000 with Max-Q Design | 1EB5 1025 1401 |
@@ -960,9 +959,13 @@ Subsystem Device ID.
960959
| NVIDIA RTX PRO 6000 Blackwell Workstation Edition | 2BB1 10DE 204B |
961960
| NVIDIA RTX PRO 6000 Blackwell Workstation Edition | 2BB1 17AA 204B |
962961
| NVIDIA RTX PRO 5000 Blackwell | 2BB3 1028 204D |
962+
| NVIDIA RTX PRO 5000 72GB Blackwell | 2BB3 1028 227A |
963963
| NVIDIA RTX PRO 5000 Blackwell | 2BB3 103C 204D |
964+
| NVIDIA RTX PRO 5000 72GB Blackwell | 2BB3 103C 227A |
964965
| NVIDIA RTX PRO 5000 Blackwell | 2BB3 10DE 204D |
966+
| NVIDIA RTX PRO 5000 72GB Blackwell | 2BB3 10DE 227A |
965967
| NVIDIA RTX PRO 5000 Blackwell | 2BB3 17AA 204D |
968+
| NVIDIA RTX PRO 5000 72GB Blackwell | 2BB3 17AA 227A |
966969
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | 2BB4 1028 204C |
967970
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | 2BB4 103C 204C |
968971
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | 2BB4 10DE 204C |
@@ -1009,6 +1012,7 @@ Subsystem Device ID.
10091012
| NVIDIA RTX PRO 500 Blackwell Generation Laptop GPU | 2DB9 |
10101013
| NVIDIA GeForce RTX 5050 Laptop GPU | 2DD8 |
10111014
| NVIDIA RTX PRO 500 Blackwell Embedded GPU | 2DF9 |
1015+
| NVIDIA GB10 | 2E12 10DE 21EC |
10121016
| NVIDIA GeForce RTX 5070 | 2F04 |
10131017
| NVIDIA GeForce RTX 5070 Ti Laptop GPU | 2F18 |
10141018
| NVIDIA RTX PRO 3000 Blackwell Generation Laptop GPU | 2F38 |

kernel-open/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ccflags-y += -I$(src)/common/inc
7979
ccflags-y += -I$(src)
8080
ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
8181
ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
82-
ccflags-y += -DNV_VERSION_STRING=\"590.44.01\"
82+
ccflags-y += -DNV_VERSION_STRING=\"590.48.01\"
8383

8484
# Include and link Tegra out-of-tree modules.
8585
ifneq ($(wildcard /usr/src/nvidia/nvidia-oot),)

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,9 @@ static inline dma_addr_t nv_phys_to_dma(struct device *dev, NvU64 pa)
649649
#define NV_PRINT_AT(nv_debug_level,at) \
650650
{ \
651651
nv_printf(nv_debug_level, \
652-
"NVRM: VM: %s:%d: 0x%p, %d page(s), count = %d, " \
652+
"NVRM: VM: %s:%d: 0x%p, %d page(s), count = %lld, " \
653653
"page_table = 0x%p\n", __FUNCTION__, __LINE__, at, \
654-
at->num_pages, NV_ATOMIC_READ(at->usage_count), \
654+
at->num_pages, (long long)atomic64_read(&at->usage_count), \
655655
at->page_table); \
656656
}
657657

@@ -919,7 +919,7 @@ struct nv_dma_buf
919919
typedef struct nv_alloc_s {
920920
struct nv_alloc_s *next;
921921
struct device *dev;
922-
atomic_t usage_count;
922+
atomic64_t usage_count;
923923
struct {
924924
NvBool contig : 1;
925925
NvBool guest : 1;
@@ -1248,7 +1248,7 @@ struct nv_pci_tegra_devfreq_dev;
12481248
typedef struct nv_linux_state_s {
12491249
nv_state_t nv_state;
12501250

1251-
atomic_t usage_count;
1251+
atomic64_t usage_count;
12521252

12531253
NvU32 suspend_count;
12541254

@@ -1627,9 +1627,9 @@ static inline NvBool nv_alloc_release(nv_linux_file_private_t *nvlfp, nv_alloc_t
16271627
{
16281628
NV_PRINT_AT(NV_DBG_MEMINFO, at);
16291629

1630-
if (NV_ATOMIC_DEC_AND_TEST(at->usage_count))
1630+
if (atomic64_dec_and_test(&at->usage_count))
16311631
{
1632-
NV_ATOMIC_INC(at->usage_count);
1632+
atomic64_inc(&at->usage_count);
16331633

16341634
at->next = nvlfp->free_list;
16351635
nvlfp->free_list = at;

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

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,33 @@ static inline struct rw_semaphore *nv_mmap_get_lock(struct mm_struct *mm)
196196
* Commit 45ad9f5290dc updated vma_start_write() to call __vma_start_write().
197197
*/
198198
void nv_vma_start_write(struct vm_area_struct *);
199+
200+
static inline void nv_vma_flags_set_word(struct vm_area_struct *vma, unsigned long flags)
201+
{
202+
nv_vma_start_write(vma);
203+
#if defined(NV_VMA_FLAGS_SET_WORD_PRESENT)
204+
vma_flags_set_word(&vma->flags, flags);
205+
#else
206+
ACCESS_PRIVATE(vma, __vm_flags) |= flags;
199207
#endif
208+
}
209+
210+
static inline void nv_vma_flags_clear_word(struct vm_area_struct *vma, unsigned long flags)
211+
{
212+
nv_vma_start_write(vma);
213+
#if defined(NV_VMA_FLAGS_SET_WORD_PRESENT)
214+
vma_flags_clear_word(&vma->flags, flags);
215+
#else
216+
ACCESS_PRIVATE(vma, __vm_flags) &= ~flags;
217+
#endif
218+
}
219+
#endif // !NV_CAN_CALL_VMA_START_WRITE
200220

201221
static inline void nv_vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
202222
{
203223
#if !NV_CAN_CALL_VMA_START_WRITE
204-
nv_vma_start_write(vma);
205-
ACCESS_PRIVATE(vma, __vm_flags) |= flags;
206-
#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
224+
nv_vma_flags_set_word(vma, flags);
225+
#elif defined(NV_VM_FLAGS_SET_PRESENT)
207226
vm_flags_set(vma, flags);
208227
#else
209228
vma->vm_flags |= flags;
@@ -213,9 +232,8 @@ static inline void nv_vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
213232
static inline void nv_vm_flags_clear(struct vm_area_struct *vma, vm_flags_t flags)
214233
{
215234
#if !NV_CAN_CALL_VMA_START_WRITE
216-
nv_vma_start_write(vma);
217-
ACCESS_PRIVATE(vma, __vm_flags) &= ~flags;
218-
#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
235+
nv_vma_flags_clear_word(vma, flags);
236+
#elif defined(NV_VM_FLAGS_SET_PRESENT)
219237
vm_flags_clear(vma, flags);
220238
#else
221239
vma->vm_flags &= ~flags;

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@
3636
#define NV_MAX_ISR_DELAY_MS (NV_MAX_ISR_DELAY_US / 1000)
3737
#define NV_NSECS_TO_JIFFIES(nsec) ((nsec) * HZ / 1000000000)
3838

39+
/*
40+
* in_hardirq() was added in v5.11-rc1 (2020-12-15) to replace in_irq().
41+
* Fall back to in_irq() for older kernels that don't have in_hardirq().
42+
*/
43+
static inline NvBool nv_in_hardirq(void)
44+
{
45+
#if defined(in_hardirq)
46+
return in_hardirq();
47+
#else
48+
return in_irq();
49+
#endif
50+
}
51+
3952
#if !defined(NV_KTIME_GET_RAW_TS64_PRESENT)
4053
static inline void ktime_get_raw_ts64(struct timespec64 *ts64)
4154
{
@@ -82,7 +95,7 @@ static inline NV_STATUS nv_sleep_us(unsigned int us)
8295
ktime_get_raw_ts64(&tm1);
8396
#endif
8497

85-
if (in_irq() && (us > NV_MAX_ISR_DELAY_US))
98+
if (nv_in_hardirq() && (us > NV_MAX_ISR_DELAY_US))
8699
return NV_ERR_GENERIC;
87100

88101
mdelay_safe_msec = us / 1000;
@@ -127,7 +140,7 @@ static inline NV_STATUS nv_sleep_ms(unsigned int ms)
127140
tm_start = tm_aux;
128141
#endif
129142

130-
if (in_irq() && (ms > NV_MAX_ISR_DELAY_MS))
143+
if (nv_in_hardirq() && (ms > NV_MAX_ISR_DELAY_MS))
131144
{
132145
return NV_ERR_GENERIC;
133146
}

kernel-open/conftest.sh

Lines changed: 76 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,6 +2114,35 @@ compile_test() {
21142114
compile_check_conftest "$CODE" "NV_GET_BACKLIGHT_DEVICE_BY_NAME_PRESENT" "" "functions"
21152115
;;
21162116

2117+
dma_map_ops_has_map_phys)
2118+
#
2119+
# Determine if .map_phys exists in struct dma_map_ops.
2120+
#
2121+
# Commit 14cb413af00c ("dma-mapping: remove unused mapping resource callbacks")
2122+
# removed .map_resource operation and replaced it with .map_phys.
2123+
#
2124+
echo "$CONFTEST_PREAMBLE
2125+
#include <linux/dma-map-ops.h>
2126+
int conftest_dma_map_ops_has_map_phys(void) {
2127+
return offsetof(struct dma_map_ops, map_phys);
2128+
}
2129+
int conftest_dma_map_ops_has_unmap_phys(void) {
2130+
return offsetof(struct dma_map_ops, unmap_phys);
2131+
}" > conftest$$.c
2132+
2133+
$CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
2134+
rm -f conftest$$.c
2135+
2136+
if [ -f conftest$$.o ]; then
2137+
echo "#define NV_DMA_MAP_OPS_HAS_MAP_PHYS" | append_conftest "types"
2138+
rm -f conftest$$.o
2139+
return
2140+
else
2141+
echo "#undef NV_DMA_MAP_OPS_HAS_MAP_PHYS" | append_conftest "types"
2142+
return
2143+
fi
2144+
;;
2145+
21172146
dma_buf_ops_has_map)
21182147
#
21192148
# Determine if .map exists in dma_buf_ops.
@@ -3938,6 +3967,27 @@ compile_test() {
39383967
compile_check_conftest "$CODE" "NV_PCI_REBAR_GET_POSSIBLE_SIZES_PRESENT" "" "functions"
39393968
;;
39403969

3970+
pci_resize_resource_has_exclude_bars_arg)
3971+
#
3972+
# Determine if pci_resize_resource() has exclude_bars argument.
3973+
#
3974+
# exclude_bars argument was added to pci_resize_resource by commit
3975+
# 337b1b566db0 (11/14/2025) ("PCI: Fix restoring BARs on BAR resize rollback path")
3976+
# in linux-next.
3977+
#
3978+
CODE="
3979+
#include <linux/pci.h>
3980+
3981+
typeof(pci_resize_resource) conftest_pci_resize_resource_has_exclude_bars_arg;
3982+
int __must_check conftest_pci_resize_resource_has_exclude_bars_arg(struct pci_dev *dev,
3983+
int i, int size,
3984+
int exclude_bars) {
3985+
return 0;
3986+
}"
3987+
3988+
compile_check_conftest "$CODE" "NV_PCI_RESIZE_RESOURCE_HAS_EXCLUDE_BARS_ARG" "" "types"
3989+
;;
3990+
39413991
drm_connector_has_override_edid)
39423992
#
39433993
# Determine if 'struct drm_connector' has an 'override_edid' member.
@@ -3976,22 +4026,39 @@ compile_test() {
39764026
compile_check_conftest "$CODE" "NV_IOMMU_SVA_BIND_DEVICE_HAS_DRVDATA_ARG" "" "types"
39774027
;;
39784028

3979-
vm_area_struct_has_const_vm_flags)
4029+
vm_flags_set)
39804030
#
3981-
# Determine if the 'vm_area_struct' structure has
3982-
# const 'vm_flags'.
4031+
# Determine if the vm_flags_set() function is present. The
4032+
# presence of this function indicates that the vm_flags_clear()
4033+
# function is also present.
39834034
#
3984-
# A union of '__vm_flags' and 'const vm_flags' was added by
4035+
# The functions vm_flags_set()/ vm_flags_clear() were added by
39854036
# commit bc292ab00f6c ("mm: introduce vma->vm_flags wrapper
3986-
# functions") in v6.3.
4037+
# functions") in v6.3-rc1 (2023-02-09).
39874038
#
39884039
CODE="
3989-
#include <linux/mm_types.h>
3990-
int conftest_vm_area_struct_has_const_vm_flags(void) {
3991-
return offsetof(struct vm_area_struct, __vm_flags);
4040+
#include <linux/mm.h>
4041+
void conftest_vm_flags_set(void) {
4042+
vm_flags_set();
4043+
}"
4044+
4045+
compile_check_conftest "$CODE" "NV_VM_FLAGS_SET_PRESENT" "" "functions"
4046+
;;
4047+
4048+
vma_flags_set_word)
4049+
#
4050+
# Determine if the vma_flags_set_word() function is present.
4051+
#
4052+
# Added by commit c3f7c506e8f1 ("mm: introduce VMA flags bitmap type")
4053+
# in v6.19-rc1.
4054+
#
4055+
CODE="
4056+
#include <linux/mm.h>
4057+
void conftest_vma_flags_set_word(void) {
4058+
vma_flags_set_word();
39924059
}"
39934060

3994-
compile_check_conftest "$CODE" "NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS" "" "types"
4061+
compile_check_conftest "$CODE" "NV_VMA_FLAGS_SET_WORD_PRESENT" "" "functions"
39954062
;;
39964063

39974064
drm_driver_has_dumb_destroy)

kernel-open/nvidia-drm/nvidia-drm-crtc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ static int __nv_drm_cursor_atomic_check(struct drm_plane *plane,
15541554

15551555
WARN_ON(nv_plane->layer_idx != NVKMS_KAPI_LAYER_INVALID_IDX);
15561556

1557-
nv_drm_for_each_crtc_in_state(plane_state->state, crtc, crtc_state, i) {
1557+
for_each_new_crtc_in_state(plane_state->state, crtc, crtc_state, i) {
15581558
struct nv_drm_crtc_state *nv_crtc_state = to_nv_crtc_state(crtc_state);
15591559
struct NvKmsKapiHeadRequestedConfig *head_req_config =
15601560
&nv_crtc_state->req_config;
@@ -1600,7 +1600,7 @@ static int nv_drm_plane_atomic_check(struct drm_plane *plane,
16001600

16011601
WARN_ON(nv_plane->layer_idx == NVKMS_KAPI_LAYER_INVALID_IDX);
16021602

1603-
nv_drm_for_each_crtc_in_state(plane_state->state, crtc, crtc_state, i) {
1603+
for_each_new_crtc_in_state(plane_state->state, crtc, crtc_state, i) {
16041604
struct nv_drm_crtc_state *nv_crtc_state = to_nv_crtc_state(crtc_state);
16051605
struct NvKmsKapiHeadRequestedConfig *head_req_config =
16061606
&nv_crtc_state->req_config;
@@ -2430,7 +2430,7 @@ static int nv_drm_crtc_atomic_check(struct drm_crtc *crtc,
24302430

24312431
req_config->flags.displaysChanged = NV_TRUE;
24322432

2433-
nv_drm_for_each_connector_in_state(crtc_state->state,
2433+
for_each_new_connector_in_state(crtc_state->state,
24342434
connector, connector_state, j) {
24352435
if (connector_state->crtc != crtc) {
24362436
continue;

kernel-open/nvidia-drm/nvidia-drm-helper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* drm_atomic_helper_disable_all() is copied from
5555
* linux/drivers/gpu/drm/drm_atomic_helper.c and modified to use
5656
* nv_drm_for_each_crtc instead of drm_for_each_crtc to loop over all crtcs,
57-
* use nv_drm_for_each_*_in_state instead of for_each_connector_in_state to loop
57+
* use for_each_new_*_in_state instead of for_each_connector_in_state to loop
5858
* over all modeset object states, and use drm_atomic_state_free() if
5959
* drm_atomic_state_put() is not available.
6060
*
@@ -139,13 +139,13 @@ int nv_drm_atomic_helper_disable_all(struct drm_device *dev,
139139
plane_state->rotation = DRM_MODE_ROTATE_0;
140140
}
141141

142-
nv_drm_for_each_connector_in_state(state, conn, conn_state, i) {
142+
for_each_new_connector_in_state(state, conn, conn_state, i) {
143143
ret = drm_atomic_set_crtc_for_connector(conn_state, NULL);
144144
if (ret < 0)
145145
goto free;
146146
}
147147

148-
nv_drm_for_each_plane_in_state(state, plane, plane_state, i) {
148+
for_each_new_plane_in_state(state, plane, plane_state, i) {
149149
ret = drm_atomic_set_crtc_for_plane(plane_state, NULL);
150150
if (ret < 0)
151151
goto free;

0 commit comments

Comments
 (0)