Skip to content

Commit 965db98

Browse files
committed
515.48.07
1 parent af26e1e commit 965db98

File tree

114 files changed

+18487
-22779
lines changed

Some content is hidden

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

114 files changed

+18487
-22779
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog
2+
3+
## Release 515 Entries
4+
5+
### [515.48.07] 2022-05-31
6+
7+
#### Added
8+
9+
- List of compatible GPUs in README.md.
10+
11+
#### Fixed
12+
13+
- Fix various README capitalizations, [#8 by @lx-is](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/8)
14+
- Automatically tag bug report issues, [#15 by @thebeanogamer](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/15)
15+
- Improve conftest.sh Script, [#37 by @Nitepone](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/37)
16+
- Update HTTP link to HTTPS, [#101 by @alcaparra](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/101)
17+
- moved array sanity check to before the array access, [#117 by @RealAstolfo](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/117)
18+
- Fixed some typos, [#122 by @FEDOyt](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/122)
19+
- Fixed capitalization, [#123 by @keroeslux](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/123)
20+
- Fix typos in NVDEC Engine Descriptor, [#126 from @TrickyDmitriy](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/126)
21+
- Extranous apostrohpes in a makefile script [sic], [#14 by @kiroma](https://github.com/NVIDIA/open-gpu-kernel-modules/issues/14)
22+
- HDMI no audio @4K above 60Hz, [#75 by @adolfotregosa](https://github.com/NVIDIA/open-gpu-kernel-modules/issues/75)
23+
- dp_configcaps.cpp:405: array index sanity check in wrong place?, [#110 by @dcb314](https://github.com/NVIDIA/open-gpu-kernel-modules/issues/110)
24+
- NVRM kgspInitRm_IMPL: missing NVDEC0 engine, cannot initialize GSP-RM, [#116 by @kfazz](https://github.com/NVIDIA/open-gpu-kernel-modules/issues/116)
25+
- ERROR: modpost: "backlight_device_register" [...nvidia-modeset.ko] undefined, [#135 by @sndirsch](https://github.com/NVIDIA/open-gpu-kernel-modules/issues/135)
26+
- aarch64 build fails, [#151 by @frezbo](https://github.com/NVIDIA/open-gpu-kernel-modules/issues/151)
27+
28+
### [515.43.04] 2022-05-11
29+
30+
- Initial release.
31+

README.md

Lines changed: 616 additions & 2 deletions
Large diffs are not rendered by default.

kernel-open/Kbuild

Lines changed: 2 additions & 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=\"515.43.04\"
75+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"515.48.07\"
7676

7777
EXTRA_CFLAGS += -Wno-unused-function
7878

@@ -94,6 +94,7 @@ EXTRA_CFLAGS += -ffreestanding
9494

9595
ifeq ($(ARCH),arm64)
9696
EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a
97+
EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,)
9798
endif
9899

99100
ifeq ($(ARCH),x86_64)

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,23 +1647,12 @@ extern NvBool nv_ats_supported;
16471647
* and any other baggage we want to carry along
16481648
*
16491649
*/
1650-
#define NV_MAXNUM_DISPLAY_DEVICES 8
1651-
1652-
typedef struct
1653-
{
1654-
acpi_handle dev_handle;
1655-
int dev_id;
1656-
} nv_video_t;
1657-
16581650
typedef struct
16591651
{
16601652
nvidia_stack_t *sp;
16611653
struct acpi_device *device;
1662-
1663-
nv_video_t pNvVideo[NV_MAXNUM_DISPLAY_DEVICES];
1664-
1654+
struct acpi_handle *handle;
16651655
int notify_handler_installed;
1666-
int default_display_mask;
16671656
} nv_acpi_t;
16681657

16691658
#endif

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ extern nvidia_module_t nv_fops;
3535

3636
void nv_acpi_register_notifier (nv_linux_state_t *);
3737
void nv_acpi_unregister_notifier (nv_linux_state_t *);
38-
int nv_acpi_init (void);
39-
int nv_acpi_uninit (void);
4038

4139
NvU8 nv_find_pci_capability (struct pci_dev *, NvU8);
4240

kernel-open/common/inc/nv.h

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -576,11 +576,9 @@ typedef enum
576576
((nv)->iso_iommu_present)
577577

578578
/*
579-
* NVIDIA ACPI event IDs to be passed into the core NVIDIA
580-
* driver for various events like display switch events,
581-
* AC/battery events, etc..
579+
* NVIDIA ACPI event ID to be passed into the core NVIDIA driver for
580+
* AC/DC event.
582581
*/
583-
#define NV_SYSTEM_ACPI_DISPLAY_SWITCH_EVENT 0x8001
584582
#define NV_SYSTEM_ACPI_BATTERY_POWER_EVENT 0x8002
585583

586584
/*
@@ -589,14 +587,6 @@ typedef enum
589587
#define NV_SYSTEM_GPU_ADD_EVENT 0x9001
590588
#define NV_SYSTEM_GPU_REMOVE_EVENT 0x9002
591589

592-
/*
593-
* Status bit definitions for display switch hotkey events.
594-
*/
595-
#define NV_HOTKEY_STATUS_DISPLAY_ENABLE_LCD 0x01
596-
#define NV_HOTKEY_STATUS_DISPLAY_ENABLE_CRT 0x02
597-
#define NV_HOTKEY_STATUS_DISPLAY_ENABLE_TV 0x04
598-
#define NV_HOTKEY_STATUS_DISPLAY_ENABLE_DFP 0x08
599-
600590
/*
601591
* NVIDIA ACPI sub-event IDs (event types) to be passed into
602592
* to core NVIDIA driver for ACPI events.

kernel-open/conftest.sh

Lines changed: 78 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,23 @@ compile_test() {
11201120
compile_check_conftest "$CODE" "NV_MDEV_SET_IOMMU_DEVICE_PRESENT" "" "functions"
11211121
;;
11221122

1123+
mdev_parent_ops_has_open_device)
1124+
# Determine if 'mdev_parent_ops' structure has a 'open_device'
1125+
# field.
1126+
#
1127+
# Added by commit 2fd585f4ed9d ("vfio: Provide better generic support
1128+
# for open/release vfio_device_ops") in 5.15 (2021-08-05)
1129+
#
1130+
CODE="
1131+
#include <linux/pci.h>
1132+
#include <linux/mdev.h>
1133+
int conftest_mdev_parent_ops_has_open_device(void) {
1134+
return offsetof(struct mdev_parent_ops, open_device);
1135+
}"
1136+
1137+
compile_check_conftest "$CODE" "NV_MDEV_PARENT_OPS_HAS_OPEN_DEVICE" "" "types"
1138+
;;
1139+
11231140
pci_irq_vector_helpers)
11241141
#
11251142
# Determine if pci_alloc_irq_vectors(), pci_free_irq_vectors()
@@ -1154,23 +1171,6 @@ compile_test() {
11541171
compile_check_conftest "$CODE" "NV_VFIO_DEVICE_GFX_PLANE_INFO_PRESENT" "" "types"
11551172
;;
11561173

1157-
vfio_device_migration_info)
1158-
#
1159-
# determine if the 'struct vfio_device_migration_info' type is present.
1160-
#
1161-
# Proposed interface for vGPU Migration
1162-
# ("[PATCH v3 0/5] Add migration support for VFIO device ")
1163-
# https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg05176.html
1164-
# Upstreamed commit a8a24f3f6e38 (vfio: UAPI for migration interface
1165-
# for device state) in v5.8 (2020-05-29)
1166-
#
1167-
CODE="
1168-
#include <linux/vfio.h>
1169-
struct vfio_device_migration_info info;"
1170-
1171-
compile_check_conftest "$CODE" "NV_VFIO_DEVICE_MIGRATION_INFO_PRESENT" "" "types"
1172-
;;
1173-
11741174
vfio_device_migration_has_start_pfn)
11751175
#
11761176
# Determine if the 'vfio_device_migration_info' structure has
@@ -5304,6 +5304,67 @@ compile_test() {
53045304
compile_check_conftest "$CODE" "NV_ACPI_BUS_GET_DEVICE_PRESENT" "" "functions"
53055305
;;
53065306

5307+
dma_resv_add_fence)
5308+
#
5309+
# Determine if the dma_resv_add_fence() function is present.
5310+
#
5311+
# dma_resv_add_excl_fence() and dma_resv_add_shared_fence() were
5312+
# removed and replaced with dma_resv_add_fence() by commit
5313+
# 73511edf8b19 ("dma-buf: specify usage while adding fences to
5314+
# dma_resv obj v7") in linux-next, expected in v5.19-rc1.
5315+
#
5316+
CODE="
5317+
#if defined(NV_LINUX_DMA_RESV_H_PRESENT)
5318+
#include <linux/dma-resv.h>
5319+
#endif
5320+
void conftest_dma_resv_add_fence(void) {
5321+
dma_resv_add_fence();
5322+
}"
5323+
5324+
compile_check_conftest "$CODE" "NV_DMA_RESV_ADD_FENCE_PRESENT" "" "functions"
5325+
;;
5326+
5327+
dma_resv_reserve_fences)
5328+
#
5329+
# Determine if the dma_resv_reserve_fences() function is present.
5330+
#
5331+
# dma_resv_reserve_shared() was removed and replaced with
5332+
# dma_resv_reserve_fences() by commit c8d4c18bfbc4
5333+
# ("dma-buf/drivers: make reserving a shared slot mandatory v4") in
5334+
# linux-next, expected in v5.19-rc1.
5335+
#
5336+
CODE="
5337+
#if defined(NV_LINUX_DMA_RESV_H_PRESENT)
5338+
#include <linux/dma-resv.h>
5339+
#endif
5340+
void conftest_dma_resv_reserve_fences(void) {
5341+
dma_resv_reserve_fences();
5342+
}"
5343+
5344+
compile_check_conftest "$CODE" "NV_DMA_RESV_RESERVE_FENCES_PRESENT" "" "functions"
5345+
;;
5346+
5347+
reservation_object_reserve_shared_has_num_fences_arg)
5348+
#
5349+
# Determine if reservation_object_reserve_shared() has 'num_fences'
5350+
# argument.
5351+
#
5352+
# reservation_object_reserve_shared() function prototype was updated
5353+
# to take 'num_fences' argument by commit ca05359f1e64 ("dma-buf:
5354+
# allow reserving more than one shared fence slot") in v4.21-rc1
5355+
# (2018-12-14).
5356+
#
5357+
CODE="
5358+
#include <linux/reservation.h>
5359+
void conftest_reservation_object_reserve_shared_has_num_fences_arg(
5360+
struct reservation_object *obj,
5361+
unsigned int num_fences) {
5362+
(void) reservation_object_reserve_shared(obj, num_fences);
5363+
}"
5364+
5365+
compile_check_conftest "$CODE" "NV_RESERVATION_OBJECT_RESERVE_SHARED_HAS_NUM_FENCES_ARG" "" "types"
5366+
;;
5367+
53075368
# When adding a new conftest entry, please use the correct format for
53085369
# specifying the relevant upstream Linux kernel commit.
53095370
#

kernel-open/nvidia-drm/nvidia-dma-resv-helper.h

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,57 @@ static inline void nv_dma_resv_fini(nv_dma_resv_t *obj)
6565
#endif
6666
}
6767

68+
static inline void nv_dma_resv_lock(nv_dma_resv_t *obj,
69+
struct ww_acquire_ctx *ctx)
70+
{
71+
#if defined(NV_LINUX_DMA_RESV_H_PRESENT)
72+
dma_resv_lock(obj, ctx);
73+
#else
74+
ww_mutex_lock(&obj->lock, ctx);
75+
#endif
76+
}
77+
78+
static inline void nv_dma_resv_unlock(nv_dma_resv_t *obj)
79+
{
80+
#if defined(NV_LINUX_DMA_RESV_H_PRESENT)
81+
dma_resv_unlock(obj);
82+
#else
83+
ww_mutex_unlock(&obj->lock);
84+
#endif
85+
}
86+
87+
static inline int nv_dma_resv_reserve_fences(nv_dma_resv_t *obj,
88+
unsigned int num_fences,
89+
NvBool shared)
90+
{
91+
#if defined(NV_DMA_RESV_RESERVE_FENCES_PRESENT)
92+
return dma_resv_reserve_fences(obj, num_fences);
93+
#else
94+
if (shared) {
95+
#if defined(NV_LINUX_DMA_RESV_H_PRESENT)
96+
return dma_resv_reserve_shared(obj, num_fences);
97+
#elif defined(NV_RESERVATION_OBJECT_RESERVE_SHARED_HAS_NUM_FENCES_ARG)
98+
return reservation_object_reserve_shared(obj, num_fences);
99+
#else
100+
unsigned int i;
101+
for (i = 0; i < num_fences; i++) {
102+
reservation_object_reserve_shared(obj);
103+
}
104+
#endif
105+
}
106+
return 0;
107+
#endif
108+
}
109+
68110
static inline void nv_dma_resv_add_excl_fence(nv_dma_resv_t *obj,
69111
nv_dma_fence_t *fence)
70112
{
71113
#if defined(NV_LINUX_DMA_RESV_H_PRESENT)
114+
#if defined(NV_DMA_RESV_ADD_FENCE_PRESENT)
115+
dma_resv_add_fence(obj, fence, DMA_RESV_USAGE_WRITE);
116+
#else
72117
dma_resv_add_excl_fence(obj, fence);
118+
#endif
73119
#else
74120
reservation_object_add_excl_fence(obj, fence);
75121
#endif

kernel-open/nvidia-drm/nvidia-drm-prime-fence.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,18 @@ int nv_drm_gem_fence_attach_ioctl(struct drm_device *dev,
499499
goto fence_context_create_fence_failed;
500500
}
501501

502-
nv_dma_resv_add_excl_fence(&nv_gem->resv, fence);
502+
nv_dma_resv_lock(&nv_gem->resv, NULL);
503503

504-
ret = 0;
504+
ret = nv_dma_resv_reserve_fences(&nv_gem->resv, 1, false);
505+
if (ret == 0) {
506+
nv_dma_resv_add_excl_fence(&nv_gem->resv, fence);
507+
} else {
508+
NV_DRM_DEV_LOG_ERR(
509+
nv_dev,
510+
"Failed to reserve fence. Error code: %d", ret);
511+
}
512+
513+
nv_dma_resv_unlock(&nv_gem->resv);
505514

506515
fence_context_create_fence_failed:
507516
nv_drm_gem_object_unreference_unlocked(&nv_gem_fence_context->base);

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,6 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_plane_atomic_check_has_atomic_state_arg
115115
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_device_has_pdev
116116
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_crtc_state_has_no_vblank
117117
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_mode_config_has_allow_fb_modifiers
118+
NV_CONFTEST_TYPE_COMPILE_TESTS += dma_resv_add_fence
119+
NV_CONFTEST_TYPE_COMPILE_TESTS += dma_resv_reserve_fences
120+
NV_CONFTEST_TYPE_COMPILE_TESTS += reservation_object_reserve_shared_has_num_fences_arg

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@ NvBool nvkms_allow_write_combining(void)
976976
return __rm_ops.system_info.allow_write_combining;
977977
}
978978

979+
#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
979980
/*************************************************************************
980981
* Implementation of sysfs interface to control backlight
981982
*************************************************************************/
@@ -1034,11 +1035,13 @@ static const struct backlight_ops nvkms_backlight_ops = {
10341035
.update_status = nvkms_update_backlight_status,
10351036
.get_brightness = nvkms_get_backlight_brightness,
10361037
};
1038+
#endif /* IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) */
10371039

10381040
struct nvkms_backlight_device*
10391041
nvkms_register_backlight(NvU32 gpu_id, NvU32 display_id, void *drv_priv,
10401042
NvU32 current_brightness)
10411043
{
1044+
#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
10421045
char name[18];
10431046
struct backlight_properties props = {
10441047
.brightness = current_brightness,
@@ -1093,15 +1096,20 @@ nvkms_register_backlight(NvU32 gpu_id, NvU32 display_id, void *drv_priv,
10931096
nvkms_free(gpu_info, NV_MAX_GPUS * sizeof(*gpu_info));
10941097

10951098
return nvkms_bd;
1099+
#else
1100+
return NULL;
1101+
#endif /* IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) */
10961102
}
10971103

10981104
void nvkms_unregister_backlight(struct nvkms_backlight_device *nvkms_bd)
10991105
{
1106+
#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
11001107
if (nvkms_bd->dev) {
11011108
backlight_device_unregister(nvkms_bd->dev);
11021109
}
11031110

11041111
nvkms_free(nvkms_bd, sizeof(*nvkms_bd));
1112+
#endif /* IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) */
11051113
}
11061114

11071115
/*************************************************************************

kernel-open/nvidia-uvm/uvm_linux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static inline const struct cpumask *uvm_cpumask_of_node(int node)
232232
#define __GFP_NORETRY 0
233233
#endif
234234

235-
#define NV_UVM_GFP_FLAGS (GFP_KERNEL | __GFP_NORETRY)
235+
#define NV_UVM_GFP_FLAGS (GFP_KERNEL)
236236

237237
#if !defined(NV_ADDRESS_SPACE_INIT_ONCE_PRESENT)
238238
void address_space_init_once(struct address_space *mapping);

kernel-open/nvidia-uvm/uvm_maxwell_ce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static void maxwell_membar_after_transfer(uvm_push_t *push)
151151

152152
// Flush on transfers only works when paired with a semaphore release. Use a
153153
// host WFI + MEMBAR.
154-
// http://nvbugs/1709888
154+
// Bug 1709888
155155
gpu->parent->host_hal->wait_for_idle(push);
156156

157157
if (uvm_push_get_and_reset_flag(push, UVM_PUSH_FLAG_NEXT_MEMBAR_GPU))

kernel-open/nvidia/linux_nvswitch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,12 +1805,12 @@ nvswitch_exit
18051805
return;
18061806
}
18071807

1808-
nvswitch_procfs_exit();
1809-
18101808
nvswitch_ctl_exit();
18111809

18121810
pci_unregister_driver(&nvswitch_pci_driver);
18131811

1812+
nvswitch_procfs_exit();
1813+
18141814
cdev_del(&nvswitch.cdev);
18151815

18161816
unregister_chrdev_region(nvswitch.devno, NVSWITCH_MINOR_COUNT);

0 commit comments

Comments
 (0)