diff --git a/.SRCINFO b/.SRCINFO index 43a429d70ab73..003275fc424dd 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = nvidia-390xx-utils pkgver = 390.157 - pkgrel = 18 + pkgrel = 19 url = https://www.nvidia.com/ arch = x86_64 license = custom @@ -25,6 +25,7 @@ pkgbase = nvidia-390xx-utils source = gcc-15.patch source = kernel-6.15.patch source = kernel-6.17.patch + source = kernel-6.19.patch source = kernel-4.16+-memory-encryption.patch b2sums = 8e24aea70b139185bd682b080d32aeda673e6e92b45a90e6f6e0d736674180400bc8bd1aa5c66b8d033fc9d5e0cfffed456a87298bd93a3afbbc30b8dc48c4e9 b2sums = c1da4ce5784e43385465913a95053a3e54f800aac6f1b49f33e2a77504d76da5e6db6ec7074fbe7ba5f52dcef9e1ebaa620942c33ff825a56caba5c9c8b0d1be @@ -46,6 +47,7 @@ pkgbase = nvidia-390xx-utils b2sums = a957b5d3afb60d4879c5e25bf4b947a670048e23559864f5bced6b9ab4f79e3f9c62ad7fad52def372fa2dbe4df70410d205aa4386021e1f4db476b02836fcc5 b2sums = 68345d8fb2ea00bd7042fe6cf1c8e63c8f9be411a710eb4f40734ca109f278466d9de1f4b3a2676767b7c16d179ce9b382ebe49c181d081f157304d220d69b12 b2sums = efaed80af94533496ea77293ce48e383d836559316b8a2c9dd36a73c5ea3170f8ee61ec9a4151db13e4a28a167d3b9d7773baad9c082596e8f043de92b4c1932 + b2sums = ec79dfcb1b31b5935993ed2ad91678e24ae46a9b23b5c11a611bdcefc1948a06ec8e4cce82b0eff7742ffef232a1c619ab8b3d0b72a57e8149f8dbde8cc69179 b2sums = a8234f542c2324ad698443e3decf7b6eacf3cb420b7aded787f102a8d32b64c2a8d45ea58e37a5e3b6f2f060f0cccd63d3a182065f57c606006d0ff8c7f6bb05 pkgname = nvidia-390xx-utils diff --git a/PKGBUILD b/PKGBUILD index baf444b224fe5..c78073837165a 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,7 +8,7 @@ pkgbase=nvidia-390xx-utils pkgname=('nvidia-390xx-utils' 'opencl-nvidia-390xx' 'nvidia-390xx-dkms') pkgver=390.157 -pkgrel=18 +pkgrel=19 arch=('x86_64') url="https://www.nvidia.com/" license=('custom') @@ -34,6 +34,7 @@ source=('nvidia-drm-outputclass.conf' gcc-15.patch kernel-6.15.patch kernel-6.17.patch + kernel-6.19.patch kernel-4.16+-memory-encryption.patch) b2sums=('8e24aea70b139185bd682b080d32aeda673e6e92b45a90e6f6e0d736674180400bc8bd1aa5c66b8d033fc9d5e0cfffed456a87298bd93a3afbbc30b8dc48c4e9' 'c1da4ce5784e43385465913a95053a3e54f800aac6f1b49f33e2a77504d76da5e6db6ec7074fbe7ba5f52dcef9e1ebaa620942c33ff825a56caba5c9c8b0d1be' @@ -55,6 +56,7 @@ b2sums=('8e24aea70b139185bd682b080d32aeda673e6e92b45a90e6f6e0d736674180400bc8bd1 'a957b5d3afb60d4879c5e25bf4b947a670048e23559864f5bced6b9ab4f79e3f9c62ad7fad52def372fa2dbe4df70410d205aa4386021e1f4db476b02836fcc5' '68345d8fb2ea00bd7042fe6cf1c8e63c8f9be411a710eb4f40734ca109f278466d9de1f4b3a2676767b7c16d179ce9b382ebe49c181d081f157304d220d69b12' 'efaed80af94533496ea77293ce48e383d836559316b8a2c9dd36a73c5ea3170f8ee61ec9a4151db13e4a28a167d3b9d7773baad9c082596e8f043de92b4c1932' + 'ec79dfcb1b31b5935993ed2ad91678e24ae46a9b23b5c11a611bdcefc1948a06ec8e4cce82b0eff7742ffef232a1c619ab8b3d0b72a57e8149f8dbde8cc69179' 'a8234f542c2324ad698443e3decf7b6eacf3cb420b7aded787f102a8d32b64c2a8d45ea58e37a5e3b6f2f060f0cccd63d3a182065f57c606006d0ff8c7f6bb05') create_links() { @@ -120,6 +122,12 @@ prepare() { # From Joan Bruguera (https://github.com/joanbm/nvidia-470xx-linux-mainline/blob/master/patches/nvidia-470xx-fix-linux-6.17.patch) patch -Np1 -i ../kernel-6.17.patch + # From Joan Bruguera ( + # https://github.com/joanbm/nvidia-470xx-linux-mainline/blob/master/patches/nvidia-470xx-fix-linux-6.19-part1.patch + # https://github.com/joanbm/nvidia-470xx-linux-mainline/blob/master/patches/nvidia-470xx-fix-linux-6.19-part2.patch + # ), edited by vnctdj + patch -Np1 -i ../kernel-6.19.patch + cd kernel sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf diff --git a/kernel-6.19.patch b/kernel-6.19.patch new file mode 100644 index 0000000000000..522103949a603 --- /dev/null +++ b/kernel-6.19.patch @@ -0,0 +1,469 @@ +diff --git a/kernel/common/inc/nv-memdbg.h b/kernel/common/inc/nv-memdbg.h +index c618ead..8212d44 100644 +--- a/kernel/common/inc/nv-memdbg.h ++++ b/kernel/common/inc/nv-memdbg.h +@@ -28,8 +28,9 @@ void nv_memdbg_exit(void); + + #else + +-#define NV_MEMDBG_ADD(ptr, size) +-#define NV_MEMDBG_REMOVE(ptr, size) ++// NB: Using while(0) to avoid -Wempty-body warnings ++#define NV_MEMDBG_ADD(ptr, size) while(0) ++#define NV_MEMDBG_REMOVE(ptr, size) while(0) + + #endif /* NV_MEM_LOGGER */ + +diff --git a/kernel/conftest.sh b/kernel/conftest.sh +index 1106ea5..fe2a7b9 100755 +--- a/kernel/conftest.sh ++++ b/kernel/conftest.sh +@@ -256,6 +256,11 @@ build_cflags() { + CFLAGS="$CFLAGS -mfentry -DCC_USING_FENTRY" + fi + fi ++ ++ # Rel. commit "Kbuild: enable -fms-extensions" (Rasmus Villemoes, 20 Oct 2025) ++ # Enable the flags since the Linux headers use those extensions in some structs ++ # See https://www.phoronix.com/news/Linux-6.19-Patch-Would-MS-Ext ++ CFLAGS="$CFLAGS -fms-extensions" + } + + CONFTEST_PREAMBLE="#include \"conftest/headers.h\" +diff --git a/kernel/nvidia-drm/nvidia-drm-crtc.c b/kernel/nvidia-drm/nvidia-drm-crtc.c +index 6d5478e..9253bd5 100644 +--- a/kernel/nvidia-drm/nvidia-drm-crtc.c ++++ b/kernel/nvidia-drm/nvidia-drm-crtc.c +@@ -151,7 +151,7 @@ static int nv_drm_plane_atomic_check(struct drm_plane *plane, + goto done; + } + +- nv_drm_for_each_crtc_in_state(plane_state->state, crtc, crtc_state, i) { ++ for_each_new_crtc_in_state(plane_state->state, crtc, crtc_state, i) { + struct nv_drm_crtc_state *nv_crtc_state = to_nv_crtc_state(crtc_state); + struct NvKmsKapiHeadRequestedConfig *head_req_config = + &nv_crtc_state->req_config; +@@ -368,8 +368,8 @@ static int nv_drm_crtc_atomic_check(struct drm_crtc *crtc, + + req_config->flags.displaysChanged = NV_TRUE; + +- nv_drm_for_each_connector_in_state(crtc_state->state, +- connector, connector_state, j) { ++ for_each_new_connector_in_state(crtc_state->state, ++ connector, connector_state, j) { + if (connector_state->crtc != crtc) { + continue; + } +diff --git a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c +index 2bcf29c..6e8d258 100644 +--- a/kernel/nvidia-drm/nvidia-drm-drv.c ++++ b/kernel/nvidia-drm/nvidia-drm-drv.c +@@ -540,13 +540,13 @@ void nv_drm_master_drop(struct drm_device *dev, struct drm_file *file_priv) + + drm_modeset_lock_all(dev); + +- if ((err = nv_drm_atomic_helper_disable_all( ++ if ((err = drm_atomic_helper_disable_all( + dev, + dev->mode_config.acquire_ctx)) != 0) { + + NV_DRM_DEV_LOG_ERR( + nv_dev, +- "nv_drm_atomic_helper_disable_all failed with error code %d !", ++ "drm_atomic_helper_disable_all failed with error code %d !", + err); + } + +diff --git a/kernel/nvidia-drm/nvidia-drm-helper.c b/kernel/nvidia-drm/nvidia-drm-helper.c +index 8b89afe..e6ab0e6 100644 +--- a/kernel/nvidia-drm/nvidia-drm-helper.c ++++ b/kernel/nvidia-drm/nvidia-drm-helper.c +@@ -62,141 +62,4 @@ static void __nv_drm_framebuffer_put(struct drm_framebuffer *fb) + + } + +-/* +- * drm_atomic_helper_disable_all() has been added by commit +- * 1494276000db789c6d2acd85747be4707051c801, which is Signed-off-by: +- * Thierry Reding +- * Daniel Vetter +- * +- * drm_atomic_helper_disable_all() is copied from +- * linux/drivers/gpu/drm/drm_atomic_helper.c and modified to use +- * nv_drm_for_each_crtc instead of drm_for_each_crtc to loop over all crtcs, +- * use nv_drm_for_each_*_in_state instead of for_each_connector_in_state to loop +- * over all modeset object states, and use drm_atomic_state_free() if +- * drm_atomic_state_put() is not available. +- * +- * drm_atomic_helper_disable_all() is copied from +- * linux/drivers/gpu/drm/drm_atomic_helper.c @ +- * 49d70aeaeca8f62b72b7712ecd1e29619a445866, which has the following +- * copyright and license information: +- * +- * Copyright (C) 2014 Red Hat +- * Copyright (C) 2014 Intel Corp. +- * +- * Permission is hereby granted, free of charge, to any person obtaining a +- * copy of this software and associated documentation files (the "Software"), +- * to deal in the Software without restriction, including without limitation +- * the rights to use, copy, modify, merge, publish, distribute, sublicense, +- * and/or sell copies of the Software, and to permit persons to whom the +- * Software is furnished to do so, subject to the following conditions: +- * +- * The above copyright notice and this permission notice shall be included in +- * all copies or substantial portions of the Software. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +- * OTHER DEALINGS IN THE SOFTWARE. +- * +- * Authors: +- * Rob Clark +- * Daniel Vetter +- */ +-int nv_drm_atomic_helper_disable_all(struct drm_device *dev, +- struct drm_modeset_acquire_ctx *ctx) +-{ +- struct drm_atomic_state *state; +- struct drm_connector_state *conn_state; +- struct drm_connector *conn; +- struct drm_plane_state *plane_state; +- struct drm_plane *plane; +- struct drm_crtc_state *crtc_state; +- struct drm_crtc *crtc; +- unsigned plane_mask = 0; +- int ret, i; +- +- state = drm_atomic_state_alloc(dev); +- if (!state) +- return -ENOMEM; +- +- state->acquire_ctx = ctx; +- +- nv_drm_for_each_crtc(crtc, dev) { +- crtc_state = drm_atomic_get_crtc_state(state, crtc); +- if (IS_ERR(crtc_state)) { +- ret = PTR_ERR(crtc_state); +- goto free; +- } +- +- crtc_state->active = false; +- +- ret = drm_atomic_set_mode_prop_for_crtc(crtc_state, NULL); +- if (ret < 0) +- goto free; +- +- ret = drm_atomic_add_affected_planes(state, crtc); +- if (ret < 0) +- goto free; +- +- ret = drm_atomic_add_affected_connectors(state, crtc); +- if (ret < 0) +- goto free; +- } +- +- nv_drm_for_each_connector_in_state(state, conn, conn_state, i) { +- ret = drm_atomic_set_crtc_for_connector(conn_state, NULL); +- if (ret < 0) +- goto free; +- } +- +- nv_drm_for_each_plane_in_state(state, plane, plane_state, i) { +- ret = drm_atomic_set_crtc_for_plane(plane_state, NULL); +- if (ret < 0) +- goto free; +- +- drm_atomic_set_fb_for_plane(plane_state, NULL); +- plane_mask |= BIT(drm_plane_index(plane)); +- plane->old_fb = plane->fb; +- } +- +- ret = drm_atomic_commit(state); +-free: +- if (plane_mask) { +- drm_for_each_plane_mask(plane, dev, plane_mask) { +- if (ret == 0) { +- plane->fb = NULL; +- plane->crtc = NULL; +- +- WARN_ON(plane->state->fb); +- WARN_ON(plane->state->crtc); +- +- if (plane->old_fb) +- __nv_drm_framebuffer_put(plane->old_fb); +- } +- plane->old_fb = NULL; +- } +- } +- +-#if defined(NV_DRM_ATOMIC_STATE_REF_COUNTING_PRESENT) +- drm_atomic_state_put(state); +-#else +- if (ret != 0) { +- drm_atomic_state_free(state); +- } else { +- /* +- * In case of success, drm_atomic_commit() takes care to cleanup and +- * free @state. +- * +- * Comment placed above drm_atomic_commit() says: The caller must not +- * free or in any other way access @state. If the function fails then +- * the caller must clean up @state itself. +- */ +- } +-#endif +- return ret; +-} +- + #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */ +diff --git a/kernel/nvidia-drm/nvidia-drm-helper.h b/kernel/nvidia-drm/nvidia-drm-helper.h +index 831737d..0fce7b2 100644 +--- a/kernel/nvidia-drm/nvidia-drm-helper.h ++++ b/kernel/nvidia-drm/nvidia-drm-helper.h +@@ -156,127 +156,6 @@ nv_drm_prime_pages_to_sg(struct drm_device *dev, + #include + #include + +-int nv_drm_atomic_helper_disable_all(struct drm_device *dev, +- struct drm_modeset_acquire_ctx *ctx); +- +-/* +- * for_each_connector_in_state(), for_each_crtc_in_state() and +- * for_each_plane_in_state() were added by kernel commit +- * df63b9994eaf942afcdb946d27a28661d7dfbf2a which was Signed-off-by: +- * Ander Conselvan de Oliveira +- * Daniel Vetter +- * +- * for_each_connector_in_state(), for_each_crtc_in_state() and +- * for_each_plane_in_state() were copied from +- * include/drm/drm_atomic.h @ +- * 21a01abbe32a3cbeb903378a24e504bfd9fe0648 +- * which has the following copyright and license information: +- * +- * Copyright (C) 2014 Red Hat +- * Copyright (C) 2014 Intel Corp. +- * +- * Permission is hereby granted, free of charge, to any person obtaining a +- * copy of this software and associated documentation files (the "Software"), +- * to deal in the Software without restriction, including without limitation +- * the rights to use, copy, modify, merge, publish, distribute, sublicense, +- * and/or sell copies of the Software, and to permit persons to whom the +- * Software is furnished to do so, subject to the following conditions: +- * +- * The above copyright notice and this permission notice shall be included in +- * all copies or substantial portions of the Software. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +- * OTHER DEALINGS IN THE SOFTWARE. +- * +- * Authors: +- * Rob Clark +- * Daniel Vetter +- */ +- +-/** +- * nv_drm_for_each_connector_in_state - iterate over all connectors in an +- * atomic update +- * @__state: &struct drm_atomic_state pointer +- * @connector: &struct drm_connector iteration cursor +- * @connector_state: &struct drm_connector_state iteration cursor +- * @__i: int iteration cursor, for macro-internal use +- * +- * This iterates over all connectors in an atomic update. Note that before the +- * software state is committed (by calling drm_atomic_helper_swap_state(), this +- * points to the new state, while afterwards it points to the old state. Due to +- * this tricky confusion this macro is deprecated. +- */ +-#if !defined(for_each_connector_in_state) +-#define nv_drm_for_each_connector_in_state(__state, \ +- connector, connector_state, __i) \ +- for ((__i) = 0; \ +- (__i) < (__state)->num_connector && \ +- ((connector) = (__state)->connectors[__i].ptr, \ +- (connector_state) = (__state)->connectors[__i].state, 1); \ +- (__i)++) \ +- for_each_if (connector) +-#else +-#define nv_drm_for_each_connector_in_state(__state, \ +- connector, connector_state, __i) \ +- for_each_connector_in_state(__state, connector, connector_state, __i) +-#endif +- +- +-/** +- * nv_drm_for_each_crtc_in_state - iterate over all CRTCs in an atomic update +- * @__state: &struct drm_atomic_state pointer +- * @crtc: &struct drm_crtc iteration cursor +- * @crtc_state: &struct drm_crtc_state iteration cursor +- * @__i: int iteration cursor, for macro-internal use +- * +- * This iterates over all CRTCs in an atomic update. Note that before the +- * software state is committed (by calling drm_atomic_helper_swap_state(), this +- * points to the new state, while afterwards it points to the old state. Due to +- * this tricky confusion this macro is deprecated. +- */ +-#if !defined(for_each_crtc_in_state) +-#define nv_drm_for_each_crtc_in_state(__state, crtc, crtc_state, __i) \ +- for ((__i) = 0; \ +- (__i) < (__state)->dev->mode_config.num_crtc && \ +- ((crtc) = (__state)->crtcs[__i].ptr, \ +- (crtc_state) = (__state)->crtcs[__i].state, 1); \ +- (__i)++) \ +- for_each_if (crtc_state) +-#else +-#define nv_drm_for_each_crtc_in_state(__state, crtc, crtc_state, __i) \ +- for_each_crtc_in_state(__state, crtc, crtc_state, __i) +-#endif +- +-/** +- * nv_drm_for_each_plane_in_state - iterate over all planes in an atomic update +- * @__state: &struct drm_atomic_state pointer +- * @plane: &struct drm_plane iteration cursor +- * @plane_state: &struct drm_plane_state iteration cursor +- * @__i: int iteration cursor, for macro-internal use +- * +- * This iterates over all planes in an atomic update. Note that before the +- * software state is committed (by calling drm_atomic_helper_swap_state(), this +- * points to the new state, while afterwards it points to the old state. Due to +- * this tricky confusion this macro is deprecated. +- */ +-#if !defined(for_each_plane_in_state) +-#define nv_drm_for_each_plane_in_state(__state, plane, plane_state, __i) \ +- for ((__i) = 0; \ +- (__i) < (__state)->dev->mode_config.num_total_plane && \ +- ((plane) = (__state)->planes[__i].ptr, \ +- (plane_state) = (__state)->planes[__i].state, 1); \ +- (__i)++) \ +- for_each_if (plane_state) +-#else +-#define nv_drm_for_each_plane_in_state(__state, plane, plane_state, __i) \ +- for_each_plane_in_state(__state, plane, plane_state, __i) +-#endif +- + static inline struct drm_crtc *nv_drm_crtc_find(struct drm_device *dev, + uint32_t id) + { +diff --git a/kernel/nvidia-drm/nvidia-drm-modeset.c b/kernel/nvidia-drm/nvidia-drm-modeset.c +index 3a57e8e..5bbcd4a 100644 +--- a/kernel/nvidia-drm/nvidia-drm-modeset.c ++++ b/kernel/nvidia-drm/nvidia-drm-modeset.c +@@ -112,20 +112,13 @@ nv_drm_atomic_apply_modeset_config(struct drm_device *dev, + struct NvKmsKapiRequestedModeSetConfig *requested_config = + &(to_nv_atomic_state(state)->config); + struct drm_crtc *crtc; +- struct drm_crtc_state *crtc_state; ++ struct drm_crtc_state *old_crtc_state, *new_crtc_state; + int i; + + memset(requested_config, 0, sizeof(*requested_config)); + + /* Loop over affected crtcs and construct NvKmsKapiRequestedModeSetConfig */ +- nv_drm_for_each_crtc_in_state(state, crtc, crtc_state, i) { +- /* +- * When commiting a state, the new state is already stored in +- * crtc->state. When checking a proposed state, the proposed state is +- * stored in crtc_state. +- */ +- struct drm_crtc_state *new_crtc_state = +- commit ? crtc->state : crtc_state; ++ for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { + struct nv_drm_crtc *nv_crtc = to_nv_crtc(crtc); + + requested_config->headRequestedConfig[nv_crtc->head] = +@@ -134,7 +127,6 @@ nv_drm_atomic_apply_modeset_config(struct drm_device *dev, + requested_config->headsMask |= 1 << nv_crtc->head; + + if (commit) { +- struct drm_crtc_state *old_crtc_state = crtc_state; + struct nv_drm_crtc_state *nv_new_crtc_state = + to_nv_crtc_state(new_crtc_state); + +@@ -220,7 +212,7 @@ int nv_drm_atomic_commit(struct drm_device *dev, + + int i; + struct drm_crtc *crtc = NULL; +- struct drm_crtc_state *crtc_state = NULL; ++ struct drm_crtc_state *new_crtc_state = NULL; + struct nv_drm_device *nv_dev = to_nv_device(dev); + + /* +@@ -230,7 +222,7 @@ int nv_drm_atomic_commit(struct drm_device *dev, + * updates to complete. + */ + if (nonblock) { +- nv_drm_for_each_crtc_in_state(state, crtc, crtc_state, i) { ++ for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { + struct nv_drm_crtc *nv_crtc = to_nv_crtc(crtc); + + /* +@@ -303,7 +295,7 @@ int nv_drm_atomic_commit(struct drm_device *dev, + } + + if (ret == 0 && !nonblock) { +- nv_drm_for_each_crtc_in_state(state, crtc, crtc_state, i) { ++ for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { + struct nv_drm_crtc *nv_crtc = to_nv_crtc(crtc); + + /* +diff --git a/kernel/nvidia-drm/nvidia-drm-priv.h b/kernel/nvidia-drm/nvidia-drm-priv.h +index 4f1a0e7..953c2eb 100644 +--- a/kernel/nvidia-drm/nvidia-drm-priv.h ++++ b/kernel/nvidia-drm/nvidia-drm-priv.h +@@ -39,6 +39,9 @@ + #include + #endif + ++// Rel. commit "drm/mm: replace drm_print.h include with a forward declaration" (Jani Nikula, 29 Oct 2025) ++#include ++ + #include "nvidia-drm-os-interface.h" + + #include "nvkms-kapi.h" +diff --git a/kernel/nvidia/nv-dma.c b/kernel/nvidia/nv-dma.c +index a06c12c..c30f8cc 100644 +--- a/kernel/nvidia/nv-dma.c ++++ b/kernel/nvidia/nv-dma.c +@@ -13,6 +13,7 @@ + + #include "os-interface.h" + #include "nv-linux.h" ++#include + + NV_STATUS nv_create_dma_map_scatterlist (nv_dma_map_t *dma_map); + void nv_destroy_dma_map_scatterlist(nv_dma_map_t *dma_map); +@@ -619,7 +620,13 @@ static NvBool nv_dma_is_map_resource_implemented + #endif + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0) ++ // Rel. commit "dma-mapping: remove unused mapping resource callbacks" (Leon Romanovsky, 15 Oct 2025) ++ // https://lore.kernel.org/all/20251015-remove-map-page-v5-0-3bbfe3a25cdf@kernel.org/ ++ return (ops->map_phys != NULL); ++#else + return (ops->map_resource != NULL); ++#endif + #else + return NV_FALSE; + #endif +diff --git a/kernel/nvidia/os-interface.c b/kernel/nvidia/os-interface.c +index 262171f..b08dd28 100644 +--- a/kernel/nvidia/os-interface.c ++++ b/kernel/nvidia/os-interface.c +@@ -193,7 +193,7 @@ BOOL NV_API_CALL os_semaphore_may_sleep(void) + + BOOL NV_API_CALL os_is_isr(void) + { +- return (in_irq()); ++ return (in_hardirq()); + } + + // return TRUE if the caller is the super-user