Skip to content

Commit f468568

Browse files
committed
535.247.01
1 parent 855c3c9 commit f468568

File tree

33 files changed

+642
-200
lines changed

33 files changed

+642
-200
lines changed

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.230.02.
4+
version 535.247.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-
535.230.02 driver release. This can be achieved by installing
20+
535.247.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

@@ -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.230.02 release,
183+
(see the table below). However, in the 535.247.01 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.230.02/README/kernel_open.html
191+
https://us.download.nvidia.com/XFree86/Linux-x86_64/535.247.01/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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ EXTRA_CFLAGS += -I$(src)/common/inc
8686
EXTRA_CFLAGS += -I$(src)
8787
EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-error -Wno-format-extra-args
8888
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
89-
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"535.230.02\"
89+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"535.247.01\"
9090

9191
ifneq ($(SYSSRCHOST1X),)
9292
EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
@@ -256,10 +256,12 @@ NV_HEADER_PRESENCE_TESTS = \
256256
drm/drm_device.h \
257257
drm/drm_mode_config.h \
258258
drm/drm_modeset_lock.h \
259+
drm/drm_client_setup.h \
259260
dt-bindings/interconnect/tegra_icc_id.h \
260261
generated/autoconf.h \
261262
generated/compile.h \
262263
generated/utsrelease.h \
264+
linux/aperture.h \
263265
linux/efi.h \
264266
linux/kconfig.h \
265267
linux/platform/tegra/mc_utils.h \
@@ -322,7 +324,8 @@ NV_HEADER_PRESENCE_TESTS = \
322324
soc/tegra/bpmp-abi.h \
323325
soc/tegra/bpmp.h \
324326
linux/cc_platform.h \
325-
asm/cpufeature.h
327+
asm/cpufeature.h \
328+
crypto/sig.h
326329

327330
# Filename to store the define for the header in $(1); this is only consumed by
328331
# the rule below that concatenates all of these together.

kernel-open/common/inc/nvmisc.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,42 @@ nvPrevPow2_U64(const NvU64 x )
694694
} \
695695
}
696696

697+
//
698+
// Bug 4851259: Newly added functions must be hidden from certain HS-signed
699+
// ucode compilers to avoid signature mismatch.
700+
//
701+
#ifndef NVDEC_1_0
702+
/*!
703+
* Returns the position of nth set bit in the given mask.
704+
*
705+
* Returns -1 if mask has fewer than n bits set.
706+
*
707+
* n is 0 indexed and has valid values 0..31 inclusive, so "zeroth" set bit is
708+
* the first set LSB.
709+
*
710+
* Example, if mask = 0x000000F0u and n = 1, the return value will be 5.
711+
* Example, if mask = 0x000000F0u and n = 4, the return value will be -1.
712+
*/
713+
static NV_FORCEINLINE NvS32
714+
nvGetNthSetBitIndex32(NvU32 mask, NvU32 n)
715+
{
716+
NvU32 seenSetBitsCount = 0;
717+
NvS32 index;
718+
FOR_EACH_INDEX_IN_MASK(32, index, mask)
719+
{
720+
if (seenSetBitsCount == n)
721+
{
722+
return index;
723+
}
724+
++seenSetBitsCount;
725+
}
726+
FOR_EACH_INDEX_IN_MASK_END;
727+
728+
return -1;
729+
}
730+
731+
#endif // NVDEC_1_0
732+
697733
//
698734
// Size to use when declaring variable-sized arrays
699735
//

kernel-open/conftest.sh

Lines changed: 209 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5231,6 +5231,45 @@ compile_test() {
52315231

52325232
compile_check_conftest "$CODE" "NV_FOLLOW_PFN_PRESENT" "" "functions"
52335233
;;
5234+
5235+
follow_pte_arg_vma)
5236+
#
5237+
# Determine if the first argument of follow_pte is
5238+
# mm_struct or vm_area_struct.
5239+
#
5240+
# The first argument was changed from mm_struct to vm_area_struct by
5241+
# commit 29ae7d96d166 ("mm: pass VMA instead of MM to follow_pte()")
5242+
#
5243+
CODE="
5244+
#include <linux/mm.h>
5245+
5246+
typeof(follow_pte) conftest_follow_pte_has_vma_arg;
5247+
int conftest_follow_pte_has_vma_arg(struct vm_area_struct *vma,
5248+
unsigned long address,
5249+
pte_t **ptep,
5250+
spinlock_t **ptl) {
5251+
return 0;
5252+
}"
5253+
5254+
compile_check_conftest "$CODE" "NV_FOLLOW_PTE_ARG1_VMA" "" "types"
5255+
;;
5256+
5257+
ptep_get)
5258+
#
5259+
# Determine if ptep_get() is present.
5260+
#
5261+
# ptep_get() was added by commit 481e980a7c19
5262+
# ("mm: Allow arches to provide ptep_get()")
5263+
#
5264+
CODE="
5265+
#include <linux/mm.h>
5266+
void conftest_ptep_get(void) {
5267+
ptep_get();
5268+
}"
5269+
5270+
compile_check_conftest "$CODE" "NV_PTEP_GET_PRESENT" "" "functions"
5271+
;;
5272+
52345273
drm_plane_atomic_check_has_atomic_state_arg)
52355274
#
52365275
# Determine if drm_plane_helper_funcs::atomic_check takes 'state'
@@ -6125,6 +6164,32 @@ compile_test() {
61256164
compile_check_conftest "$CODE" "NV_NUM_REGISTERED_FB_PRESENT" "" "types"
61266165
;;
61276166

6167+
acpi_video_register_backlight)
6168+
#
6169+
# Determine if acpi_video_register_backlight() function is present
6170+
#
6171+
# acpi_video_register_backlight was added by commit 3dbc80a3e4c55c
6172+
# (ACPI: video: Make backlight class device registration a separate
6173+
# step (v2)) for v6.0 (2022-09-02).
6174+
# Note: the include directive for <linux/types> in this conftest is
6175+
# necessary in order to support kernels between commit 0b9f7d93ca61
6176+
# ("ACPI / i915: ignore firmware requests backlight change") for
6177+
# v3.16 (2014-07-07) and commit 3bd6bce369f5 ("ACPI / video: Port
6178+
# to new backlight interface selection API") for v4.2 (2015-07-16).
6179+
# Kernels within this range use the 'bool' type and the related
6180+
# 'false' value in <acpi/video.h> without first including the
6181+
# definitions of that type and value.
6182+
#
6183+
CODE="
6184+
#include <linux/types.h>
6185+
#include <acpi/video.h>
6186+
void conftest_acpi_video_register_backlight(void) {
6187+
acpi_video_register_backlight(0);
6188+
}"
6189+
6190+
compile_check_conftest "$CODE" "NV_ACPI_VIDEO_REGISTER_BACKLIGHT" "" "functions"
6191+
;;
6192+
61286193
acpi_video_backlight_use_native)
61296194
#
61306195
# Determine if acpi_video_backlight_use_native() function is present
@@ -6378,6 +6443,25 @@ compile_test() {
63786443
compile_check_conftest "$CODE" "NV_MEMORY_FAILURE_MF_SW_SIMULATED_DEFINED" "" "types"
63796444
;;
63806445

6446+
drm_client_setup)
6447+
#
6448+
# Determine whether drm_client_setup is present.
6449+
#
6450+
# Added by commit d07fdf922592 ("drm/fbdev-ttm:
6451+
# Convert to client-setup") in v6.13.
6452+
#
6453+
CODE="
6454+
#include <drm/drm_fb_helper.h>
6455+
#if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
6456+
#include <drm/drm_client_setup.h>
6457+
#endif
6458+
void conftest_drm_client_setup(void) {
6459+
drm_client_setup();
6460+
}"
6461+
6462+
compile_check_conftest "$CODE" "NV_DRM_CLIENT_SETUP_PRESENT" "" "functions"
6463+
;;
6464+
63816465
drm_output_poll_changed)
63826466
#
63836467
# Determine whether drm_mode_config_funcs.output_poll_changed
@@ -6401,6 +6485,38 @@ compile_test() {
64016485
compile_check_conftest "$CODE" "NV_DRM_OUTPUT_POLL_CHANGED_PRESENT" "" "types"
64026486
;;
64036487

6488+
aperture_remove_conflicting_devices)
6489+
#
6490+
# Determine whether aperture_remove_conflicting_devices is present.
6491+
#
6492+
# Added by commit 7283f862bd991 ("drm: Implement DRM aperture
6493+
# helpers under video/") in v6.0
6494+
CODE="
6495+
#if defined(NV_LINUX_APERTURE_H_PRESENT)
6496+
#include <linux/aperture.h>
6497+
#endif
6498+
void conftest_aperture_remove_conflicting_devices(void) {
6499+
aperture_remove_conflicting_devices();
6500+
}"
6501+
compile_check_conftest "$CODE" "NV_APERTURE_REMOVE_CONFLICTING_DEVICES_PRESENT" "" "functions"
6502+
;;
6503+
6504+
aperture_remove_conflicting_pci_devices)
6505+
#
6506+
# Determine whether aperture_remove_conflicting_pci_devices is present.
6507+
#
6508+
# Added by commit 7283f862bd991 ("drm: Implement DRM aperture
6509+
# helpers under video/") in v6.0
6510+
CODE="
6511+
#if defined(NV_LINUX_APERTURE_H_PRESENT)
6512+
#include <linux/aperture.h>
6513+
#endif
6514+
void conftest_aperture_remove_conflicting_pci_devices(void) {
6515+
aperture_remove_conflicting_pci_devices();
6516+
}"
6517+
compile_check_conftest "$CODE" "NV_APERTURE_REMOVE_CONFLICTING_PCI_DEVICES_PRESENT" "" "functions"
6518+
;;
6519+
64046520
crypto_tfm_ctx_aligned)
64056521
# Determine if 'crypto_tfm_ctx_aligned' is defined.
64066522
#
@@ -6422,17 +6538,17 @@ compile_test() {
64226538
# This test is not complete and may return false positive.
64236539
#
64246540
CODE="
6425-
#include <crypto/akcipher.h>
6426-
#include <crypto/algapi.h>
6427-
#include <crypto/ecc_curve.h>
6428-
#include <crypto/ecdh.h>
6429-
#include <crypto/hash.h>
6430-
#include <crypto/internal/ecc.h>
6431-
#include <crypto/kpp.h>
6432-
#include <crypto/public_key.h>
6433-
#include <crypto/sm3.h>
6434-
#include <keys/asymmetric-type.h>
6435-
#include <linux/crypto.h>
6541+
#include <crypto/akcipher.h>
6542+
#include <crypto/algapi.h>
6543+
#include <crypto/ecc_curve.h>
6544+
#include <crypto/ecdh.h>
6545+
#include <crypto/hash.h>
6546+
#include <crypto/internal/ecc.h>
6547+
#include <crypto/kpp.h>
6548+
#include <crypto/public_key.h>
6549+
#include <crypto/sm3.h>
6550+
#include <keys/asymmetric-type.h>
6551+
#include <linux/crypto.h>
64366552
void conftest_crypto(void) {
64376553
struct shash_desc sd;
64386554
struct crypto_shash cs;
@@ -6442,6 +6558,47 @@ compile_test() {
64426558
compile_check_conftest "$CODE" "NV_CRYPTO_PRESENT" "" "symbols"
64436559
;;
64446560

6561+
crypto_akcipher_verify)
6562+
#
6563+
# Determine whether the crypto_akcipher_verify API is still present.
6564+
# It was removed by commit 6b34562 ('crypto: akcipher - Drop sign/verify operations')
6565+
# in v6.13-rc1 (2024-10-04).
6566+
#
6567+
# This test is dependent on the crypto conftest to determine whether crypto should be
6568+
# enabled at all. That means that if the kernel is old enough such that crypto_akcipher_verify
6569+
#
6570+
# The test merely checks for the presence of the API, as it assumes that if the API
6571+
# is no longer present, the new API to replace it (crypto_sig_verify) must be present.
6572+
# If the kernel version is too old to have crypto_akcipher_verify, it will fail the crypto
6573+
# conftest above and all crypto code will be compiled out.
6574+
#
6575+
CODE="
6576+
#include <crypto/akcipher.h>
6577+
#include <linux/crypto.h>
6578+
void conftest_crypto_akcipher_verify(void) {
6579+
(void)crypto_akcipher_verify;
6580+
}"
6581+
6582+
compile_check_conftest "$CODE" "NV_CRYPTO_AKCIPHER_VERIFY_PRESENT" "" "symbols"
6583+
;;
6584+
6585+
ecc_digits_from_bytes)
6586+
#
6587+
# Determine whether ecc_digits_from_bytes is present.
6588+
# It was added in commit c6ab5c915da4 ('crypto: ecc - Prevent ecc_digits_from_bytes from
6589+
# reading too many bytes') in v6.10.
6590+
#
6591+
# This functionality is needed when crypto_akcipher_verify is not present.
6592+
#
6593+
CODE="
6594+
#include <crypto/internal/ecc.h>
6595+
void conftest_ecc_digits_from_bytes(void) {
6596+
(void)ecc_digits_from_bytes;
6597+
}"
6598+
6599+
compile_check_conftest "$CODE" "NV_ECC_DIGITS_FROM_BYTES_PRESENT" "" "symbols"
6600+
;;
6601+
64456602
mempolicy_has_unified_nodes)
64466603
#
64476604
# Determine if the 'mempolicy' structure has
@@ -6546,6 +6703,47 @@ compile_test() {
65466703
compile_check_conftest "$CODE" "NV_FOLIO_TEST_SWAPCACHE_PRESENT" "" "functions"
65476704
;;
65486705

6706+
module_import_ns_takes_constant)
6707+
#
6708+
# Determine if the MODULE_IMPORT_NS macro takes a string literal
6709+
# or constant.
6710+
#
6711+
# Commit cdd30ebb1b9f ("module: Convert symbol namespace to
6712+
# string literal") changed MODULE_IMPORT_NS to take a string
6713+
# literal in Linux kernel v6.13.
6714+
#
6715+
CODE="
6716+
#include <linux/module.h>
6717+
6718+
MODULE_IMPORT_NS(DMA_BUF);"
6719+
6720+
compile_check_conftest "$CODE" "NV_MODULE_IMPORT_NS_TAKES_CONSTANT" "" "generic"
6721+
;;
6722+
6723+
drm_driver_has_date)
6724+
#
6725+
# Determine if the 'drm_driver' structure has a 'date' field.
6726+
#
6727+
# Removed by commit cb2e1c2136f7 ("drm: remove driver date from
6728+
# struct drm_driver and all drivers") in linux-next, expected in
6729+
# v6.14.
6730+
#
6731+
CODE="
6732+
#if defined(NV_DRM_DRMP_H_PRESENT)
6733+
#include <drm/drmP.h>
6734+
#endif
6735+
6736+
#if defined(NV_DRM_DRM_DRV_H_PRESENT)
6737+
#include <drm/drm_drv.h>
6738+
#endif
6739+
6740+
int conftest_drm_driver_has_date(void) {
6741+
return offsetof(struct drm_driver, date);
6742+
}"
6743+
6744+
compile_check_conftest "$CODE" "NV_DRM_DRIVER_HAS_DATE" "" "types"
6745+
;;
6746+
65496747
# When adding a new conftest entry, please use the correct format for
65506748
# specifying the relevant upstream Linux kernel commit.
65516749
#

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,10 @@ static struct drm_driver nv_drm_driver = {
14391439
.name = "nvidia-drm",
14401440

14411441
.desc = "NVIDIA DRM driver",
1442+
1443+
#if defined(NV_DRM_DRIVER_HAS_DATE)
14421444
.date = "20160202",
1445+
#endif
14431446

14441447
#if defined(NV_DRM_DRIVER_HAS_DEVICE_LIST)
14451448
.device_list = LIST_HEAD_INIT(nv_drm_driver.device_list),

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,5 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += vm_area_struct_has_const_vm_flags
135135
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_dumb_destroy
136136
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_unlocked_ioctl_flag_present
137137
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_output_poll_changed
138+
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_date
138139
NV_CONFTEST_TYPE_COMPILE_TESTS += file_operations_fop_unsigned_offset_present

0 commit comments

Comments
 (0)