Skip to content

Commit fe07287

Browse files
committed
515.76
1 parent 9855350 commit fe07287

File tree

50 files changed

+826
-371
lines changed

Some content is hidden

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

50 files changed

+826
-371
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Release 515 Entries
44

5+
### [515.76] 2022-09-20
6+
7+
#### Fixed
8+
9+
- Improved compatibility with new Linux kernel releases
10+
- Fixed possible excessive GPU power draw on an idle X11 or Wayland desktop when driving high resolutions or refresh rates
11+
512
### [515.65.01] 2022-08-02
613

714
#### Fixed

README.md

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

@@ -167,15 +167,15 @@ for the target kernel.
167167
## Compatible GPUs
168168

169169
The open-gpu-kernel-modules can be used on any Turing or later GPU
170-
(see the table below). However, in the 515.65.01 release,
170+
(see the table below). However, in the 515.76 release,
171171
GeForce and Workstation support is still considered alpha-quality.
172172

173173
To enable use of the open kernel modules on GeForce and Workstation GPUs,
174174
set the "NVreg_OpenRmEnableUnsupportedGpus" nvidia.ko kernel module
175175
parameter to 1. For more details, see the NVIDIA GPU driver end user
176176
README here:
177177

178-
https://us.download.nvidia.com/XFree86/Linux-x86_64/515.65.01/README/kernel_open.html
178+
https://us.download.nvidia.com/XFree86/Linux-x86_64/515.76/README/kernel_open.html
179179

180180
In the below table, if three IDs are listed, the first is the PCI Device
181181
ID, the second is the PCI Subsystem Vendor ID, and the third is the PCI
@@ -643,6 +643,8 @@ Subsystem Device ID.
643643
| NVIDIA A100-PG509-200 | 20B0 10DE 1450 |
644644
| NVIDIA A100-SXM4-80GB | 20B2 10DE 1463 |
645645
| NVIDIA A100-SXM4-80GB | 20B2 10DE 147F |
646+
| NVIDIA A100-SXM4-80GB | 20B2 10DE 1622 |
647+
| NVIDIA A100-SXM4-80GB | 20B2 10DE 1623 |
646648
| NVIDIA PG506-242 | 20B3 10DE 14A7 |
647649
| NVIDIA PG506-243 | 20B3 10DE 14A8 |
648650
| NVIDIA A100 80GB PCIe | 20B5 10DE 1533 |
@@ -743,6 +745,7 @@ Subsystem Device ID.
743745
| NVIDIA GeForce RTX 3050 | 2507 |
744746
| NVIDIA GeForce RTX 3050 OEM | 2508 |
745747
| NVIDIA GeForce RTX 3060 Laptop GPU | 2520 |
748+
| NVIDIA GeForce RTX 3060 Laptop GPU | 2521 |
746749
| NVIDIA GeForce RTX 3050 Ti Laptop GPU | 2523 |
747750
| NVIDIA RTX A2000 | 2531 1028 151D |
748751
| NVIDIA RTX A2000 | 2531 103C 151D |

kernel-open/Kbuild

Lines changed: 103 additions & 4 deletions
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.65.01\"
75+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"515.76\"
7676

7777
EXTRA_CFLAGS += -Wno-unused-function
7878

@@ -203,9 +203,108 @@ $(obj)/conftest/patches.h: $(NV_CONFTEST_SCRIPT)
203203
@mkdir -p $(obj)/conftest
204204
@$(NV_CONFTEST_CMD) patch_check > $@
205205

206-
$(obj)/conftest/headers.h: $(NV_CONFTEST_SCRIPT)
207-
@mkdir -p $(obj)/conftest
208-
@$(NV_CONFTEST_CMD) test_kernel_headers '$(NV_CONFTEST_CFLAGS)' > $@
206+
207+
# Each of these headers is checked for presence with a test #include; a
208+
# corresponding #define will be generated in conftest/headers.h.
209+
NV_HEADER_PRESENCE_TESTS = \
210+
asm/system.h \
211+
drm/drmP.h \
212+
drm/drm_auth.h \
213+
drm/drm_gem.h \
214+
drm/drm_crtc.h \
215+
drm/drm_atomic.h \
216+
drm/drm_atomic_helper.h \
217+
drm/drm_encoder.h \
218+
drm/drm_atomic_uapi.h \
219+
drm/drm_drv.h \
220+
drm/drm_framebuffer.h \
221+
drm/drm_connector.h \
222+
drm/drm_probe_helper.h \
223+
drm/drm_blend.h \
224+
drm/drm_fourcc.h \
225+
drm/drm_prime.h \
226+
drm/drm_plane.h \
227+
drm/drm_vblank.h \
228+
drm/drm_file.h \
229+
drm/drm_ioctl.h \
230+
drm/drm_device.h \
231+
drm/drm_mode_config.h \
232+
dt-bindings/interconnect/tegra_icc_id.h \
233+
generated/autoconf.h \
234+
generated/compile.h \
235+
generated/utsrelease.h \
236+
linux/efi.h \
237+
linux/kconfig.h \
238+
linux/platform/tegra/mc_utils.h \
239+
linux/semaphore.h \
240+
linux/printk.h \
241+
linux/ratelimit.h \
242+
linux/prio_tree.h \
243+
linux/log2.h \
244+
linux/of.h \
245+
linux/bug.h \
246+
linux/sched/signal.h \
247+
linux/sched/task.h \
248+
linux/sched/task_stack.h \
249+
xen/ioemu.h \
250+
linux/fence.h \
251+
linux/dma-resv.h \
252+
soc/tegra/chip-id.h \
253+
soc/tegra/fuse.h \
254+
soc/tegra/tegra_bpmp.h \
255+
video/nv_internal.h \
256+
linux/platform/tegra/dce/dce-client-ipc.h \
257+
linux/nvhost.h \
258+
linux/nvhost_t194.h \
259+
asm/book3s/64/hash-64k.h \
260+
asm/set_memory.h \
261+
asm/prom.h \
262+
asm/powernv.h \
263+
linux/atomic.h \
264+
asm/barrier.h \
265+
asm/opal-api.h \
266+
sound/hdaudio.h \
267+
asm/pgtable_types.h \
268+
linux/stringhash.h \
269+
linux/dma-map-ops.h \
270+
rdma/peer_mem.h \
271+
sound/hda_codec.h \
272+
linux/dma-buf.h \
273+
linux/time.h \
274+
linux/platform_device.h \
275+
linux/mutex.h \
276+
linux/reset.h \
277+
linux/of_platform.h \
278+
linux/of_device.h \
279+
linux/of_gpio.h \
280+
linux/gpio.h \
281+
linux/gpio/consumer.h \
282+
linux/interconnect.h \
283+
linux/pm_runtime.h \
284+
linux/clk.h \
285+
linux/clk-provider.h \
286+
linux/ioasid.h \
287+
linux/stdarg.h \
288+
linux/iosys-map.h \
289+
asm/coco.h
290+
291+
# Filename to store the define for the header in $(1); this is only consumed by
292+
# the rule below that concatenates all of these together.
293+
NV_HEADER_PRESENCE_PART = $(addprefix $(obj)/conftest/header_presence/,$(addsuffix .part,$(1)))
294+
295+
# Define a rule to check the header $(1).
296+
define NV_HEADER_PRESENCE_CHECK
297+
$$(call NV_HEADER_PRESENCE_PART,$(1)): $$(NV_CONFTEST_SCRIPT) $(obj)/conftest/uts_release
298+
@mkdir -p $$(dir $$@)
299+
@$$(NV_CONFTEST_CMD) test_kernel_header '$$(NV_CONFTEST_CFLAGS)' '$(1)' > $$@
300+
endef
301+
302+
# Evaluate the rule above for each header in the list.
303+
$(foreach header,$(NV_HEADER_PRESENCE_TESTS),$(eval $(call NV_HEADER_PRESENCE_CHECK,$(header))))
304+
305+
# Concatenate all of the parts into headers.h.
306+
$(obj)/conftest/headers.h: $(call NV_HEADER_PRESENCE_PART,$(NV_HEADER_PRESENCE_TESTS))
307+
@cat $^ > $@
209308

210309
clean-dirs := $(obj)/conftest
211310

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ static inline uid_t __kuid_val(uid_t uid)
227227
#endif
228228

229229
#include <linux/fb.h> /* fb_info struct */
230+
#include <linux/screen_info.h> /* screen_info */
230231

231232
#if !defined(CONFIG_PCI)
232233
#warning "Attempting to build driver for a platform with no PCI support!"

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,8 @@ static inline pgprot_t pgprot_modify_writecombine(pgprot_t old_prot)
7878

7979
#define NV_PGPROT_UNCACHED_DEVICE(old_prot) pgprot_noncached(old_prot)
8080
#if defined(NVCPU_AARCH64)
81-
#if defined(NV_MT_DEVICE_GRE_PRESENT)
82-
#define NV_PROT_WRITE_COMBINED_DEVICE (PROT_DEFAULT | PTE_PXN | PTE_UXN | \
83-
PTE_ATTRINDX(MT_DEVICE_GRE))
84-
#else
8581
#define NV_PROT_WRITE_COMBINED_DEVICE (PROT_DEFAULT | PTE_PXN | PTE_UXN | \
8682
PTE_ATTRINDX(MT_DEVICE_nGnRE))
87-
#endif
8883
#define NV_PGPROT_WRITE_COMBINED_DEVICE(old_prot) \
8984
__pgprot_modify(old_prot, PTE_ATTRINDX_MASK, NV_PROT_WRITE_COMBINED_DEVICE)
9085
#define NV_PGPROT_WRITE_COMBINED(old_prot) NV_PGPROT_UNCACHED(old_prot)

kernel-open/common/inc/nv.h

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -624,27 +624,45 @@ typedef enum
624624
#define NV_GET_NV_STATE(pGpu) \
625625
(nv_state_t *)((pGpu) ? (pGpu)->pOsGpuInfo : NULL)
626626

627-
#define IS_REG_OFFSET(nv, offset, length) \
628-
(((offset) >= (nv)->regs->cpu_address) && \
629-
(((offset) + ((length)-1)) <= \
630-
(nv)->regs->cpu_address + ((nv)->regs->size-1)))
631-
632-
#define IS_FB_OFFSET(nv, offset, length) \
633-
(((nv)->fb) && ((offset) >= (nv)->fb->cpu_address) && \
634-
(((offset) + ((length)-1)) <= (nv)->fb->cpu_address + ((nv)->fb->size-1)))
635-
636-
#define IS_UD_OFFSET(nv, offset, length) \
637-
(((nv)->ud.cpu_address != 0) && ((nv)->ud.size != 0) && \
638-
((offset) >= (nv)->ud.cpu_address) && \
639-
(((offset) + ((length)-1)) <= (nv)->ud.cpu_address + ((nv)->ud.size-1)))
640-
641-
#define IS_IMEM_OFFSET(nv, offset, length) \
642-
(((nv)->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address != 0) && \
643-
((nv)->bars[NV_GPU_BAR_INDEX_IMEM].size != 0) && \
644-
((offset) >= (nv)->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address) && \
645-
(((offset) + ((length) - 1)) <= \
646-
(nv)->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address + \
647-
((nv)->bars[NV_GPU_BAR_INDEX_IMEM].size - 1)))
627+
static inline NvBool IS_REG_OFFSET(nv_state_t *nv, NvU64 offset, NvU64 length)
628+
{
629+
return ((offset >= nv->regs->cpu_address) &&
630+
631+
632+
633+
((offset + (length - 1)) <= (nv->regs->cpu_address + (nv->regs->size - 1))));
634+
}
635+
636+
static inline NvBool IS_FB_OFFSET(nv_state_t *nv, NvU64 offset, NvU64 length)
637+
{
638+
return ((nv->fb) && (offset >= nv->fb->cpu_address) &&
639+
640+
641+
642+
((offset + (length - 1)) <= (nv->fb->cpu_address + (nv->fb->size - 1))));
643+
}
644+
645+
static inline NvBool IS_UD_OFFSET(nv_state_t *nv, NvU64 offset, NvU64 length)
646+
{
647+
return ((nv->ud.cpu_address != 0) && (nv->ud.size != 0) &&
648+
(offset >= nv->ud.cpu_address) &&
649+
650+
651+
652+
((offset + (length - 1)) <= (nv->ud.cpu_address + (nv->ud.size - 1))));
653+
}
654+
655+
static inline NvBool IS_IMEM_OFFSET(nv_state_t *nv, NvU64 offset, NvU64 length)
656+
{
657+
return ((nv->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address != 0) &&
658+
(nv->bars[NV_GPU_BAR_INDEX_IMEM].size != 0) &&
659+
(offset >= nv->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address) &&
660+
661+
662+
663+
((offset + (length - 1)) <= (nv->bars[NV_GPU_BAR_INDEX_IMEM].cpu_address +
664+
(nv->bars[NV_GPU_BAR_INDEX_IMEM].size - 1))));
665+
}
648666

649667
#define NV_RM_MAX_MSIX_LINES 8
650668

0 commit comments

Comments
 (0)