Skip to content

Commit 23e9e76

Browse files
committed
550.163.01
1 parent ca09591 commit 23e9e76

62 files changed

Lines changed: 781 additions & 293 deletions

Some content is hidden

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

README.md

Lines changed: 4 additions & 3 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 550.144.03.
4+
version 550.163.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-
550.144.03 driver release. This can be achieved by installing
20+
550.163.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

@@ -188,7 +188,7 @@ encountered specific to them.
188188
For details on feature support and limitations, see the NVIDIA GPU driver
189189
end user README here:
190190

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

193193
For vGPU support, please refer to the README.vgpu packaged in the vGPU Host
194194
Package for more details.
@@ -933,4 +933,5 @@ Subsystem Device ID.
933933
| NVIDIA RTX 500 Ada Generation Laptop GPU | 28BB |
934934
| NVIDIA GeForce RTX 4060 Laptop GPU | 28E0 |
935935
| NVIDIA GeForce RTX 4050 Laptop GPU | 28E1 |
936+
| NVIDIA GeForce RTX 3050 A Laptop GPU | 28E3 |
936937
| NVIDIA RTX 2000 Ada Generation Embedded GPU | 28F8 |

kernel-open/Kbuild

Lines changed: 2 additions & 1 deletion
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-format-extra-args
8888
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
89-
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"550.144.03\"
89+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"550.163.01\"
9090

9191
ifneq ($(SYSSRCHOST1X),)
9292
EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
@@ -186,6 +186,7 @@ NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags)
186186
NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie
187187
NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
188188
NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
189+
NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
189190
NV_CONFTEST_CFLAGS += -Wno-error
190191

191192
NV_CONFTEST_COMPILE_TEST_HEADERS := $(obj)/conftest/macros.h

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: 124 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5321,6 +5321,45 @@ compile_test() {
53215321

53225322
compile_check_conftest "$CODE" "NV_FOLLOW_PFN_PRESENT" "" "functions"
53235323
;;
5324+
5325+
follow_pte_arg_vma)
5326+
#
5327+
# Determine if the first argument of follow_pte is
5328+
# mm_struct or vm_area_struct.
5329+
#
5330+
# The first argument was changed from mm_struct to vm_area_struct by
5331+
# commit 29ae7d96d166 ("mm: pass VMA instead of MM to follow_pte()")
5332+
#
5333+
CODE="
5334+
#include <linux/mm.h>
5335+
5336+
typeof(follow_pte) conftest_follow_pte_has_vma_arg;
5337+
int conftest_follow_pte_has_vma_arg(struct vm_area_struct *vma,
5338+
unsigned long address,
5339+
pte_t **ptep,
5340+
spinlock_t **ptl) {
5341+
return 0;
5342+
}"
5343+
5344+
compile_check_conftest "$CODE" "NV_FOLLOW_PTE_ARG1_VMA" "" "types"
5345+
;;
5346+
5347+
ptep_get)
5348+
#
5349+
# Determine if ptep_get() is present.
5350+
#
5351+
# ptep_get() was added by commit 481e980a7c19
5352+
# ("mm: Allow arches to provide ptep_get()")
5353+
#
5354+
CODE="
5355+
#include <linux/mm.h>
5356+
void conftest_ptep_get(void) {
5357+
ptep_get();
5358+
}"
5359+
5360+
compile_check_conftest "$CODE" "NV_PTEP_GET_PRESENT" "" "functions"
5361+
;;
5362+
53245363
drm_plane_atomic_check_has_atomic_state_arg)
53255364
#
53265365
# Determine if drm_plane_helper_funcs::atomic_check takes 'state'
@@ -6269,6 +6308,32 @@ compile_test() {
62696308
compile_check_conftest "$CODE" "NV_NUM_REGISTERED_FB_PRESENT" "" "types"
62706309
;;
62716310

6311+
acpi_video_register_backlight)
6312+
#
6313+
# Determine if acpi_video_register_backlight() function is present
6314+
#
6315+
# acpi_video_register_backlight was added by commit 3dbc80a3e4c55c
6316+
# (ACPI: video: Make backlight class device registration a separate
6317+
# step (v2)) for v6.0 (2022-09-02).
6318+
# Note: the include directive for <linux/types> in this conftest is
6319+
# necessary in order to support kernels between commit 0b9f7d93ca61
6320+
# ("ACPI / i915: ignore firmware requests backlight change") for
6321+
# v3.16 (2014-07-07) and commit 3bd6bce369f5 ("ACPI / video: Port
6322+
# to new backlight interface selection API") for v4.2 (2015-07-16).
6323+
# Kernels within this range use the 'bool' type and the related
6324+
# 'false' value in <acpi/video.h> without first including the
6325+
# definitions of that type and value.
6326+
#
6327+
CODE="
6328+
#include <linux/types.h>
6329+
#include <acpi/video.h>
6330+
void conftest_acpi_video_register_backlight(void) {
6331+
acpi_video_register_backlight(0);
6332+
}"
6333+
6334+
compile_check_conftest "$CODE" "NV_ACPI_VIDEO_REGISTER_BACKLIGHT" "" "functions"
6335+
;;
6336+
62726337
acpi_video_backlight_use_native)
62736338
#
62746339
# Determine if acpi_video_backlight_use_native() function is present
@@ -6652,13 +6717,18 @@ compile_test() {
66526717
#
66536718
# Determine whether drm_client_setup is present.
66546719
#
6655-
# Added by commit d07fdf922592 ("drm/fbdev-ttm:
6656-
# Convert to client-setup") in v6.13.
6720+
# Added by commit d07fdf922592 ("drm/fbdev-ttm: Convert to
6721+
# client-setup") in v6.13 in drm/drm_client_setup.h, but then moved
6722+
# to drm/clients/drm_client_setup.h by commit b86711c6d6e2
6723+
# ("drm/client: Move public client header to clients/ subdirectory")
6724+
# in linux-next b86711c6d6e2.
66576725
#
66586726
CODE="
66596727
#include <drm/drm_fb_helper.h>
66606728
#if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
66616729
#include <drm/drm_client_setup.h>
6730+
#elif defined(NV_DRM_CLIENTS_DRM_CLIENT_SETUP_H_PRESENT)
6731+
#include <drm/clients/drm_client_setup.h>
66626732
#endif
66636733
void conftest_drm_client_setup(void) {
66646734
drm_client_setup();
@@ -7038,6 +7108,58 @@ compile_test() {
70387108
compile_check_conftest "$CODE" "NV_FOLIO_TEST_SWAPCACHE_PRESENT" "" "functions"
70397109
;;
70407110

7111+
7112+
drm_driver_has_date)
7113+
#
7114+
# Determine if the 'drm_driver' structure has a 'date' field.
7115+
#
7116+
# Removed by commit cb2e1c2136f7 ("drm: remove driver date from
7117+
# struct drm_driver and all drivers") in linux-next, expected in
7118+
# v6.14.
7119+
#
7120+
CODE="
7121+
#if defined(NV_DRM_DRMP_H_PRESENT)
7122+
#include <drm/drmP.h>
7123+
#endif
7124+
7125+
#if defined(NV_DRM_DRM_DRV_H_PRESENT)
7126+
#include <drm/drm_drv.h>
7127+
#endif
7128+
7129+
int conftest_drm_driver_has_date(void) {
7130+
return offsetof(struct drm_driver, date);
7131+
}"
7132+
7133+
compile_check_conftest "$CODE" "NV_DRM_DRIVER_HAS_DATE" "" "types"
7134+
;;
7135+
7136+
drm_connector_helper_funcs_mode_valid_has_const_mode_arg)
7137+
#
7138+
# Determine if the 'mode' pointer argument is const in
7139+
# drm_connector_helper_funcs::mode_valid.
7140+
#
7141+
# The 'mode' pointer argument in
7142+
# drm_connector_helper_funcs::mode_valid was made const by commit
7143+
# 26d6fd81916e ("drm/connector: make mode_valid take a const struct
7144+
# drm_display_mode") in linux-next, expected in v6.15.
7145+
#
7146+
CODE="
7147+
#if defined(NV_DRM_DRM_ATOMIC_HELPER_H_PRESENT)
7148+
#include <drm/drm_atomic_helper.h>
7149+
#endif
7150+
7151+
static int conftest_drm_connector_mode_valid(struct drm_connector *connector,
7152+
const struct drm_display_mode *mode) {
7153+
return 0;
7154+
}
7155+
7156+
const struct drm_connector_helper_funcs conftest_drm_connector_helper_funcs = {
7157+
.mode_valid = conftest_drm_connector_mode_valid,
7158+
};"
7159+
7160+
compile_check_conftest "$CODE" "NV_DRM_CONNECTOR_HELPER_FUNCS_MODE_VALID_HAS_CONST_MODE_ARG" "" "types"
7161+
;;
7162+
70417163
# When adding a new conftest entry, please use the correct format for
70427164
# specifying the relevant upstream Linux kernel commit. Please
70437165
# avoid specifying -rc kernels, and only use SHAs that actually exist

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,13 @@
6565
#if defined(NV_DRM_CLIENT_SETUP_PRESENT) && \
6666
(defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) || \
6767
defined(NV_APERTURE_REMOVE_CONFLICTING_PCI_DEVICES_PRESENT))
68+
// XXX remove dependency on DRM_TTM_HELPER by implementing nvidia-drm's own
69+
// .fbdev_probe callback that uses NVKMS kapi
70+
#if IS_ENABLED(CONFIG_DRM_TTM_HELPER)
6871
#define NV_DRM_FBDEV_AVAILABLE
6972
#define NV_DRM_CLIENT_AVAILABLE
7073
#endif
74+
#endif
7175

7276
/*
7377
* We can support color management if either drm_helper_crtc_enable_color_mgmt()

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,11 @@ static int nv_drm_connector_get_modes(struct drm_connector *connector)
314314
}
315315

316316
static int nv_drm_connector_mode_valid(struct drm_connector *connector,
317+
#if defined(NV_DRM_CONNECTOR_HELPER_FUNCS_MODE_VALID_HAS_CONST_MODE_ARG)
318+
const struct drm_display_mode *mode)
319+
#else
317320
struct drm_display_mode *mode)
321+
#endif
318322
{
319323
struct drm_device *dev = connector->dev;
320324
struct nv_drm_device *nv_dev = to_nv_device(dev);

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,14 +1730,18 @@ static struct drm_driver nv_drm_driver = {
17301730
.name = "nvidia-drm",
17311731

17321732
.desc = "NVIDIA DRM driver",
1733+
1734+
#if defined(NV_DRM_DRIVER_HAS_DATE)
17331735
.date = "20160202",
1736+
#endif
17341737

17351738
#if defined(NV_DRM_DRIVER_HAS_DEVICE_LIST)
17361739
.device_list = LIST_HEAD_INIT(nv_drm_driver.device_list),
17371740
#elif defined(NV_DRM_DRIVER_HAS_LEGACY_DEV_LIST)
17381741
.legacy_dev_list = LIST_HEAD_INIT(nv_drm_driver.legacy_dev_list),
17391742
#endif
1740-
#if defined(DRM_FBDEV_TTM_DRIVER_OPS)
1743+
// XXX implement nvidia-drm's own .fbdev_probe callback that uses NVKMS kapi directly
1744+
#if defined(NV_DRM_FBDEV_AVAILABLE) && defined(DRM_FBDEV_TTM_DRIVER_OPS)
17411745
DRM_FBDEV_TTM_DRIVER_OPS,
17421746
#endif
17431747
};

kernel-open/nvidia-drm/nvidia-drm-sources.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,6 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffe
134134
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_mode_create_dp_colorspace_property_has_supported_colorspaces_arg
135135
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_unlocked_ioctl_flag_present
136136
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_output_poll_changed
137+
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_date
137138
NV_CONFTEST_TYPE_COMPILE_TESTS += file_operations_fop_unsigned_offset_present
139+
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_connector_helper_funcs_mode_valid_has_const_mode_arg

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,11 @@ nvkms_register_backlight(NvU32 gpu_id, NvU32 display_id, void *drv_priv,
996996

997997
#if defined(NV_ACPI_VIDEO_BACKLIGHT_USE_NATIVE)
998998
if (!acpi_video_backlight_use_native()) {
999+
#if defined(NV_ACPI_VIDEO_REGISTER_BACKLIGHT)
1000+
nvkms_log(NVKMS_LOG_LEVEL_INFO, NVKMS_LOG_PREFIX,
1001+
"ACPI reported no NVIDIA native backlight available; attempting to use ACPI backlight.");
1002+
acpi_video_register_backlight();
1003+
#endif
9991004
return NULL;
10001005
}
10011006
#endif

kernel-open/nvidia-modeset/nvidia-modeset.Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,4 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += list_is_first
102102
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ktime_get_real_ts64
103103
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ktime_get_raw_ts64
104104
NV_CONFTEST_FUNCTION_COMPILE_TESTS += acpi_video_backlight_use_native
105+
NV_CONFTEST_FUNCTION_COMPILE_TESTS += acpi_video_register_backlight

0 commit comments

Comments
 (0)