Skip to content

Commit 66ab8e8

Browse files
committed
535.274.02
1 parent 9c67f19 commit 66ab8e8

22 files changed

Lines changed: 318 additions & 97 deletions

File tree

README.md

Lines changed: 4 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 535.261.03.
4+
version 535.274.02.
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-
535.261.03 driver release. This can be achieved by installing
20+
535.274.02 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

@@ -180,15 +180,15 @@ software applications.
180180
## Compatible GPUs
181181

182182
The open-gpu-kernel-modules can be used on any Turing or later GPU
183-
(see the table below). However, in the 535.261.03 release,
183+
(see the table below). However, in the 535.274.02 release,
184184
GeForce and Workstation support is still considered alpha-quality.
185185

186186
To enable use of the open kernel modules on GeForce and Workstation GPUs,
187187
set the "NVreg_OpenRmEnableUnsupportedGpus" nvidia.ko kernel module
188188
parameter to 1. For more details, see the NVIDIA GPU driver end user
189189
README here:
190190

191-
https://us.download.nvidia.com/XFree86/Linux-x86_64/535.261.03/README/kernel_open.html
191+
https://us.download.nvidia.com/XFree86/Linux-x86_64/535.274.02/README/kernel_open.html
192192

193193
In the below table, if three IDs are listed, the first is the PCI Device
194194
ID, the second is the PCI Subsystem Vendor ID, and the third is the PCI

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=\"535.261.03\"
82+
ccflags-y += -DNV_VERSION_STRING=\"535.274.02\"
8383

8484
ifneq ($(SYSSRCHOST1X),)
8585
ccflags-y += -I$(SYSSRCHOST1X)

kernel-open/conftest.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4041,6 +4041,43 @@ compile_test() {
40414041
fi
40424042
;;
40434043

4044+
drm_fb_create_takes_format_info)
4045+
#
4046+
# Determine if a `struct drm_format_info *` is passed into
4047+
# the .fb_create callback. If so, it will have 4 arguments.
4048+
# This parameter was added in commit 81112eaac559 ("drm:
4049+
# Pass the format info to .fb_create") in linux-next
4050+
# (2025-07-16)
4051+
CODE="
4052+
#include <drm/drm_mode_config.h>
4053+
#include <drm/drm_framebuffer.h>
4054+
4055+
static const struct drm_mode_config_funcs funcs;
4056+
void conftest_drm_fb_create_takes_format_info(void) {
4057+
funcs.fb_create(NULL, NULL, NULL, NULL);
4058+
}"
4059+
4060+
compile_check_conftest "$CODE" "NV_DRM_FB_CREATE_TAKES_FORMAT_INFO" "" "types"
4061+
;;
4062+
4063+
drm_fill_fb_struct_takes_format_info)
4064+
#
4065+
# Determine if a `struct drm_format_info *` is passed into
4066+
# drm_helper_mode_fill_fb_struct(). If so, it will have 4 arguments.
4067+
# This parameter was added in commit a34cc7bf1034 ("drm:
4068+
# Allow the caller to pass in the format info to
4069+
# drm_helper_mode_fill_fb_struct()") in linux-next
4070+
# (2025-07-16)
4071+
CODE="
4072+
#include <drm/drm_modeset_helper.h>
4073+
4074+
void conftest_drm_fill_fb_struct_takes_format_info(void) {
4075+
drm_helper_mode_fill_fb_struct(NULL, NULL, NULL, NULL);
4076+
}"
4077+
4078+
compile_check_conftest "$CODE" "NV_DRM_FILL_FB_STRUCT_TAKES_FORMAT_INFO" "" "types"
4079+
;;
4080+
40444081
drm_connector_funcs_have_mode_in_name)
40454082
#
40464083
# Determine if _mode_ is present in connector function names. We

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,14 @@ static void nv_drm_output_poll_changed(struct drm_device *dev)
154154
static struct drm_framebuffer *nv_drm_framebuffer_create(
155155
struct drm_device *dev,
156156
struct drm_file *file,
157-
#if defined(NV_DRM_HELPER_MODE_FILL_FB_STRUCT_HAS_CONST_MODE_CMD_ARG)
157+
#if defined(NV_DRM_FB_CREATE_TAKES_FORMAT_INFO)
158+
const struct drm_format_info *info,
159+
#endif
160+
#if defined(NV_DRM_HELPER_MODE_FILL_FB_STRUCT_HAS_CONST_MODE_CMD_ARG)
158161
const struct drm_mode_fb_cmd2 *cmd
159-
#else
162+
#else
160163
struct drm_mode_fb_cmd2 *cmd
161-
#endif
164+
#endif
162165
)
163166
{
164167
struct drm_mode_fb_cmd2 local_cmd;
@@ -169,11 +172,14 @@ static struct drm_framebuffer *nv_drm_framebuffer_create(
169172
fb = nv_drm_internal_framebuffer_create(
170173
dev,
171174
file,
175+
#if defined(NV_DRM_FB_CREATE_TAKES_FORMAT_INFO)
176+
info,
177+
#endif
172178
&local_cmd);
173179

174-
#if !defined(NV_DRM_HELPER_MODE_FILL_FB_STRUCT_HAS_CONST_MODE_CMD_ARG)
180+
#if !defined(NV_DRM_HELPER_MODE_FILL_FB_STRUCT_HAS_CONST_MODE_CMD_ARG)
175181
*cmd = local_cmd;
176-
#endif
182+
#endif
177183

178184
return fb;
179185
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ static int nv_drm_framebuffer_init(struct drm_device *dev,
206206
struct drm_framebuffer *nv_drm_internal_framebuffer_create(
207207
struct drm_device *dev,
208208
struct drm_file *file,
209+
#if defined(NV_DRM_FB_CREATE_TAKES_FORMAT_INFO)
210+
const struct drm_format_info *info,
211+
#endif
209212
struct drm_mode_fb_cmd2 *cmd)
210213
{
211214
struct nv_drm_device *nv_dev = to_nv_device(dev);
@@ -259,6 +262,9 @@ struct drm_framebuffer *nv_drm_internal_framebuffer_create(
259262
dev,
260263
#endif
261264
&nv_fb->base,
265+
#if defined(NV_DRM_FB_CREATE_TAKES_FORMAT_INFO)
266+
info,
267+
#endif
262268
cmd);
263269

264270
/*

kernel-open/nvidia-drm/nvidia-drm-fb.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ static inline struct nv_drm_framebuffer *to_nv_framebuffer(
5959
struct drm_framebuffer *nv_drm_internal_framebuffer_create(
6060
struct drm_device *dev,
6161
struct drm_file *file,
62+
#if defined(NV_DRM_FB_CREATE_TAKES_FORMAT_INFO)
63+
const struct drm_format_info *info,
64+
#endif
6265
struct drm_mode_fb_cmd2 *cmd);
6366

6467
#endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,13 @@ int nv_drm_atomic_commit(struct drm_device *dev,
451451
#else
452452
drm_atomic_helper_swap_state(dev, state);
453453
#endif
454+
/*
455+
* Used to update legacy modeset state pointers to support UAPIs not updated
456+
* by the core atomic modeset infrastructure.
457+
*
458+
* Example: /sys/class/drm/<card connector>/enabled
459+
*/
460+
drm_atomic_helper_update_legacy_modeset_state(dev, state);
454461

455462
/*
456463
* nv_drm_atomic_commit_internal() must not return failure after

kernel-open/nvidia-drm/nvidia-drm.Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,4 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_output_poll_changed
139139
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_date
140140
NV_CONFTEST_TYPE_COMPILE_TESTS += file_operations_fop_unsigned_offset_present
141141
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_connector_helper_funcs_mode_valid_has_const_mode_arg
142+
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_fb_create_takes_format_info

kernel-open/nvidia-uvm/uvm_va_block.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11519,6 +11519,11 @@ NV_STATUS uvm_va_block_evict_chunks(uvm_va_block_t *va_block,
1151911519
return NV_ERR_NO_MEMORY;
1152011520
}
1152111521

11522+
if (uvm_va_block_is_hmm(va_block)) {
11523+
memset(block_context->hmm.src_pfns, 0, sizeof(block_context->hmm.src_pfns));
11524+
memset(block_context->hmm.dst_pfns, 0, sizeof(block_context->hmm.dst_pfns));
11525+
}
11526+
1152211527
pages_to_evict = &block_context->caller_page_mask;
1152311528
uvm_page_mask_zero(pages_to_evict);
1152411529
chunk_region.outer = 0;

kernel-open/nvidia/nv-frontend.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ MODULE_ALIAS_CHARDEV_MAJOR(NV_MAJOR_DEVICE_NUMBER);
4242
* DMA_BUF namespace is added by commit id 16b0314aa746
4343
* ("dma-buf: move dma-buf symbols into the DMA_BUF module namespace") in 5.16
4444
*/
45+
#if defined(NV_MODULE_IMPORT_NS_TAKES_CONSTANT)
4546
MODULE_IMPORT_NS(DMA_BUF);
46-
47-
#endif
47+
#else
48+
MODULE_IMPORT_NS("DMA_BUF");
49+
#endif // defined(NV_MODULE_IMPORT_NS_TAKES_CONSTANT)
50+
#endif // defined(MODULE_IMPORT_NS)
4851

4952
static NvU32 nv_num_instances;
5053

0 commit comments

Comments
 (0)