Control: tags 1148469 + patch Hello,
I encountered the same failure to build the nvidia module on my system running debian testing with linux 7.2
I backported the changes from the upstream nvidia repo on the 580 branch to fix the failures. With those changes the modules compiles and loads on my machine (which has a Quadro M2200 gpu) with nvidia-smi working. That said I didn't stress test it much as my machine also has an integrated gpu which is used most of the time.
I've attached the .debdiff with my changes and I also created an MR (https://salsa.debian.org/nvidia-team/nvidia-graphics-drivers/-/merge_requests/18), I don't know which is preferred. I've tested that my modified package build using dpkg-buildpackage.
This is my first time trying to contribute, despite spending a few evenings reading up on the wiki, I am pretty unfamiliar with the process and the tools and used an LLM to guide me through it so I apologize if my approach is not correct.
Thanks.
diff -Nru nvidia-graphics-drivers-550.163.01/debian/changelog nvidia-graphics-drivers-550.163.01/debian/changelog --- nvidia-graphics-drivers-550.163.01/debian/changelog 2026-06-11 14:33:08.000000000 +0200 +++ nvidia-graphics-drivers-550.163.01/debian/changelog 2026-10-07 19:35:04.000000000 +0200 @@ -1,3 +1,17 @@ +nvidia-graphics-drivers (550.163.01-5.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Backport the strncpy() removal fix from 580.178.04 (strscpy, strscpy_pad, + snprintf, memcpy). + * Backport the drm_atomic_state -> drm_atomic_commit rename handling from + 580.173.02 (drm_atomic_commit_struct_present conftest, + nv_drm_atomic_state_base_t typedef and nv_drm_atomic_state_base_*() + wrappers). + * Fix kernel module compilation failure against Linux 7.2. + (Closes: #1148469, #1148283) + + -- Thomas Ferrand <[email protected]> Wed, 07 Oct 2026 19:35:04 +0200 + nvidia-graphics-drivers (550.163.01-5.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru nvidia-graphics-drivers-550.163.01/debian/patches/module/0087-fix-linux-7.2-strncpy.patch nvidia-graphics-drivers-550.163.01/debian/patches/module/0087-fix-linux-7.2-strncpy.patch --- nvidia-graphics-drivers-550.163.01/debian/patches/module/0087-fix-linux-7.2-strncpy.patch 1970-01-01 01:00:00.000000000 +0100 +++ nvidia-graphics-drivers-550.163.01/debian/patches/module/0087-fix-linux-7.2-strncpy.patch 2026-10-07 19:28:18.000000000 +0200 @@ -0,0 +1,99 @@ +From ffc3c0ce86544041d3711d8d7f565578f62a8a87 Mon Sep 17 00:00:00 2001 +From: Thomas <[email protected]> +Date: Sat, 26 Sep 2026 02:21:38 +0200 +Subject: [PATCH 1/2] Remove usages of strncpy() + +Replace usage of strncpy() the same way it is done in version +580.178.04 of the nvidia open-gpu-kernel-modules code. +For the functions that where removed in that version, use strscpy_pad +instead. +--- + nvidia-modeset/nvidia-modeset-linux.c | 9 ++++++++- + nvidia-uvm/uvm_pmm_gpu.c | 4 +++- + nvidia/linux_nvswitch.c | 11 +++++++++-- + nvidia/os-interface.c | 5 +++-- + 4 files changed, 23 insertions(+), 6 deletions(-) + +diff --git a/nvidia-modeset/nvidia-modeset-linux.c b/nvidia-modeset/nvidia-modeset-linux.c +index a5ecf35..0ce291e 100644 +--- a/nvidia-modeset/nvidia-modeset-linux.c ++++ b/nvidia-modeset/nvidia-modeset-linux.c +@@ -351,7 +351,14 @@ int nvkms_strcmp(const char *s1, const char *s2) + + char* nvkms_strncpy(char *dest, const char *src, size_t n) + { +- return strncpy(dest, src, n); ++ /* ++ * strncpy() was removed from kernel in 7.2. Use strscpy_pad() instead, ++ * hoping that the blob doesn't rely on the absence of terminator when src is ++ * bigger than dest. ++ */ ++ strscpy_pad(dest, src, n); ++ ++ return dest; + } + + void nvkms_usleep(NvU64 usec) +diff --git a/nvidia-uvm/uvm_pmm_gpu.c b/nvidia-uvm/uvm_pmm_gpu.c +index 922403a..4766c81 100644 +--- a/nvidia-uvm/uvm_pmm_gpu.c ++++ b/nvidia-uvm/uvm_pmm_gpu.c +@@ -3038,7 +3038,9 @@ static NV_STATUS init_chunk_split_cache_level(uvm_pmm_gpu_t *pmm, size_t level) + size_t size; + size_t align; + if (level == 0) { +- strncpy(chunk_split_cache[level].name, "uvm_gpu_chunk_t", sizeof(chunk_split_cache[level].name) - 1); ++ snprintf(chunk_split_cache[level].name, ++ sizeof(chunk_split_cache[level].name), ++ "uvm_gpu_chunk_t"); + size = sizeof(uvm_gpu_chunk_t); + align = __alignof__(uvm_gpu_chunk_t); + } else { +diff --git a/nvidia/linux_nvswitch.c b/nvidia/linux_nvswitch.c +index 40cb0d7..2a3e27e 100644 +--- a/nvidia/linux_nvswitch.c ++++ b/nvidia/linux_nvswitch.c +@@ -2026,7 +2026,7 @@ nvswitch_os_read_registry_dword + return -NVL_ERR_GENERIC; + } + +- strncpy(regkey_val, regkey_val_start, regkey_val_len); ++ memcpy(regkey_val, regkey_val_start, regkey_val_len); + regkey_val[regkey_val_len] = '\0'; + + if (nvswitch_os_strtouint(regkey_val, data) != 0) +@@ -2381,7 +2381,14 @@ nvswitch_os_strncpy + NvLength length + ) + { +- return strncpy(dest, src, length); ++ /* ++ * strncpy() was removed from kernel in 7.2. Use strscpy_pad() instead, ++ * hoping that the blob doesn't rely on the absence of terminator when src is ++ * bigger than dest. ++ */ ++ strscpy_pad(dest, src, length); ++ ++ return dest; + } + + int +diff --git a/nvidia/os-interface.c b/nvidia/os-interface.c +index 375a418..a8b556a 100644 +--- a/nvidia/os-interface.c ++++ b/nvidia/os-interface.c +@@ -750,8 +750,9 @@ NvU32 NV_API_CALL os_get_current_process(void) + void NV_API_CALL os_get_current_process_name(char *buf, NvU32 len) + { + task_lock(current); +- strncpy(buf, current->comm, len - 1); +- buf[len - 1] = '\0'; ++ if (strscpy(buf, current->comm, len) < 0) { ++ // strscpy() returns -E2BIG on truncation, which is acceptable here. ++ } + task_unlock(current); + } + +-- +2.53.0 + diff -Nru nvidia-graphics-drivers-550.163.01/debian/patches/module/0088-fix-linux-7.2-drm-atomic.patch nvidia-graphics-drivers-550.163.01/debian/patches/module/0088-fix-linux-7.2-drm-atomic.patch --- nvidia-graphics-drivers-550.163.01/debian/patches/module/0088-fix-linux-7.2-drm-atomic.patch 1970-01-01 01:00:00.000000000 +0100 +++ nvidia-graphics-drivers-550.163.01/debian/patches/module/0088-fix-linux-7.2-drm-atomic.patch 2026-10-07 19:03:36.000000000 +0200 @@ -0,0 +1,423 @@ +From c6109d819470959da51b518dea27516a5661ee83 Mon Sep 17 00:00:00 2001 +From: Thomas <[email protected]> +Date: Sat, 26 Sep 2026 03:01:54 +0200 +Subject: [PATCH 2/2] Rename drm_atomic_state to drm_atomic_commit + +Copy the changes make to nvidia open-gpu-kernel-modules in version +580.173.02 to use drm_atomic_commit instead of drm_atomic_state. +This is done conditionnally, based on a conftest (similar to what is +done upstream) but additionnally the test macros from other conftest +that were testing things on drm_atomic_state need to be adapted +--- + conftest.sh | 16 +++++ + nvidia-drm/nvidia-drm-connector.c | 2 +- + nvidia-drm/nvidia-drm-crtc.c | 12 ++-- + nvidia-drm/nvidia-drm-drv.c | 8 +-- + nvidia-drm/nvidia-drm-helper.c | 6 +- + nvidia-drm/nvidia-drm-helper.h | 109 ++++++++++++++++++++++++++++++ + nvidia-drm/nvidia-drm-modeset.c | 24 ++++--- + nvidia-drm/nvidia-drm-modeset.h | 13 ++-- + nvidia-drm/nvidia-drm-sources.mk | 1 + + 9 files changed, 160 insertions(+), 31 deletions(-) + +diff --git a/conftest.sh b/conftest.sh +index ef1adc3..f62a365 100644 +--- a/conftest.sh ++++ b/conftest.sh +@@ -3547,6 +3547,22 @@ compile_test() { + compile_check_conftest "$CODE" "NV_DRM_ATOMIC_STATE_REF_COUNTING_PRESENT" "" "functions" + ;; + ++ drm_atomic_commit_struct_present) ++ # ++ # Determine if 'struct drm_atomic_state' has been renamed to ++ # 'struct drm_atomic_commit'. ++ # ++ # Renamed by commit 5164f7e7ff8e ("drm: Rename struct ++ # drm_atomic_state to drm_atomic_commit"), expected in Linux v7.2. ++ # ++ CODE=" ++ #include <drm/drm_atomic.h> ++ ++ struct drm_atomic_commit state;" ++ ++ compile_check_conftest "$CODE" "NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT" "" "types" ++ ;; ++ + vm_ops_fault_removed_vma_arg) + # + # Determine if vma.vm_ops.fault takes (vma, vmf), or just (vmf) +diff --git a/nvidia-drm/nvidia-drm-connector.c b/nvidia-drm/nvidia-drm-connector.c +index 2fd4d96..0b2a871 100644 +--- a/nvidia-drm/nvidia-drm-connector.c ++++ b/nvidia-drm/nvidia-drm-connector.c +@@ -362,7 +362,7 @@ static const NvU32 __nv_drm_connector_supported_colorspaces = + #if defined(NV_DRM_CONNECTOR_ATTACH_HDR_OUTPUT_METADATA_PROPERTY_PRESENT) + static int + __nv_drm_connector_atomic_check(struct drm_connector *connector, +- struct drm_atomic_state *state) ++ nv_drm_atomic_state_base_t *state) + { + struct drm_connector_state *new_connector_state = + drm_atomic_get_new_connector_state(state, connector); +diff --git a/nvidia-drm/nvidia-drm-crtc.c b/nvidia-drm/nvidia-drm-crtc.c +index 2dfd3e4..a89b08f 100644 +--- a/nvidia-drm/nvidia-drm-crtc.c ++++ b/nvidia-drm/nvidia-drm-crtc.c +@@ -585,16 +585,16 @@ static int __nv_drm_cursor_atomic_check(struct drm_plane *plane, + return 0; + } + +-#if defined(NV_DRM_PLANE_ATOMIC_CHECK_HAS_ATOMIC_STATE_ARG) ++#if defined(NV_DRM_PLANE_ATOMIC_CHECK_HAS_FULL_STATE_ARG) + static int nv_drm_plane_atomic_check(struct drm_plane *plane, +- struct drm_atomic_state *state) ++ nv_drm_atomic_state_base_t *state) + #else + static int nv_drm_plane_atomic_check(struct drm_plane *plane, + struct drm_plane_state *plane_state) + #endif + { + struct nv_drm_plane *nv_plane = to_nv_plane(plane); +-#if defined(NV_DRM_PLANE_ATOMIC_CHECK_HAS_ATOMIC_STATE_ARG) ++#if defined(NV_DRM_PLANE_ATOMIC_CHECK_HAS_FULL_STATE_ARG) + struct drm_plane_state *plane_state = + drm_atomic_get_new_plane_state(state, plane); + #endif +@@ -1170,15 +1170,15 @@ fail: + * the 'nv_drm_crtc_state::req_config', that is fine because 'nv_drm_crtc_state' + * will be discarded if ->atomic_check() fails. + */ +-#if defined(NV_DRM_CRTC_ATOMIC_CHECK_HAS_ATOMIC_STATE_ARG) ++#if defined(NV_DRM_CRTC_ATOMIC_CHECK_HAS_FULL_STATE_ARG) + static int nv_drm_crtc_atomic_check(struct drm_crtc *crtc, +- struct drm_atomic_state *state) ++ nv_drm_atomic_state_base_t *state) + #else + static int nv_drm_crtc_atomic_check(struct drm_crtc *crtc, + struct drm_crtc_state *crtc_state) + #endif + { +-#if defined(NV_DRM_CRTC_ATOMIC_CHECK_HAS_ATOMIC_STATE_ARG) ++#if defined(NV_DRM_CRTC_ATOMIC_CHECK_HAS_FULL_STATE_ARG) + struct drm_crtc_state *crtc_state = + drm_atomic_get_new_crtc_state(state, crtc); + #endif +diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c +index 8c0fc29..eedcf94 100644 +--- a/nvidia-drm/nvidia-drm-drv.c ++++ b/nvidia-drm/nvidia-drm-drv.c +@@ -1159,7 +1159,7 @@ static int nv_drm_grant_permission_ioctl(struct drm_device *dev, void *data, + } + + static int +-nv_drm_atomic_disable_connector(struct drm_atomic_state *state, ++nv_drm_atomic_disable_connector(nv_drm_atomic_state_base_t *state, + struct nv_drm_connector *nv_connector) + { + struct drm_crtc_state *crtc_state; +@@ -1192,7 +1192,7 @@ static int nv_drm_revoke_modeset_permission(struct drm_device *dev, + struct drm_file *filep, NvU32 dpyId) + { + struct drm_modeset_acquire_ctx *pctx; +- struct drm_atomic_state *state; ++ nv_drm_atomic_state_base_t *state; + struct drm_connector *connector; + struct drm_crtc *crtc; + int ret = 0; +@@ -1209,7 +1209,7 @@ static int nv_drm_revoke_modeset_permission(struct drm_device *dev, + pctx = dev->mode_config.acquire_ctx; + #endif + +- state = drm_atomic_state_alloc(dev); ++ state = nv_drm_atomic_state_base_alloc(dev); + if (!state) { + ret = -ENOMEM; + goto done; +@@ -1250,7 +1250,7 @@ static int nv_drm_revoke_modeset_permission(struct drm_device *dev, + ret = drm_atomic_commit(state); + done: + #if defined(NV_DRM_ATOMIC_STATE_REF_COUNTING_PRESENT) +- drm_atomic_state_put(state); ++ nv_drm_atomic_state_base_put(state); + #else + if (ret != 0) { + drm_atomic_state_free(state); +diff --git a/nvidia-drm/nvidia-drm-helper.c b/nvidia-drm/nvidia-drm-helper.c +index 953daca..360cb5e 100644 +--- a/nvidia-drm/nvidia-drm-helper.c ++++ b/nvidia-drm/nvidia-drm-helper.c +@@ -112,7 +112,7 @@ static void __nv_drm_framebuffer_put(struct drm_framebuffer *fb) + int nv_drm_atomic_helper_disable_all(struct drm_device *dev, + struct drm_modeset_acquire_ctx *ctx) + { +- struct drm_atomic_state *state; ++ nv_drm_atomic_state_base_t *state; + struct drm_connector_state *conn_state; + struct drm_connector *conn; + struct drm_plane_state *plane_state; +@@ -122,7 +122,7 @@ int nv_drm_atomic_helper_disable_all(struct drm_device *dev, + unsigned plane_mask = 0; + int ret, i; + +- state = drm_atomic_state_alloc(dev); ++ state = nv_drm_atomic_state_base_alloc(dev); + if (!state) + return -ENOMEM; + +@@ -197,7 +197,7 @@ free: + } + + #if defined(NV_DRM_ATOMIC_STATE_REF_COUNTING_PRESENT) +- drm_atomic_state_put(state); ++ nv_drm_atomic_state_base_put(state); + #else + if (ret != 0) { + drm_atomic_state_free(state); +diff --git a/nvidia-drm/nvidia-drm-helper.h b/nvidia-drm/nvidia-drm-helper.h +index 958326a..863fc5e 100644 +--- a/nvidia-drm/nvidia-drm-helper.h ++++ b/nvidia-drm/nvidia-drm-helper.h +@@ -185,6 +185,115 @@ nv_drm_prime_pages_to_sg(struct drm_device *dev, + #include <drm/drm_atomic.h> + #include <drm/drm_atomic_helper.h> + ++/* ++ * Linux commit 5164f7e7ff8e ("drm: Rename struct drm_atomic_state to ++ * drm_atomic_commit"), expected in Linux v7.2, renamed the top-level atomic ++ * commit object and its lifetime helpers. ++ */ ++#if defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++typedef struct drm_atomic_commit nv_drm_atomic_state_base_t; ++#else ++typedef struct drm_atomic_state nv_drm_atomic_state_base_t; ++#endif ++ ++/* ++ * Linux commits 29b77ad7b9ca ("drm/atomic: Pass the full state to CRTC ++ * atomic_check") and 7c11b99a8e58 ("drm/atomic: Pass the full state to ++ * planes atomic_check") changed the CRTC and plane helper atomic_check ++ * callbacks from per-object state arguments to the full atomic transaction ++ * state. The existing conftests detect those full-state callback signatures ++ * when the argument type is still struct drm_atomic_state. ++ * ++ * Linux commit 5164f7e7ff8e ("drm: Rename struct drm_atomic_state to ++ * drm_atomic_commit"), expected in Linux v7.2, renamed that full transaction ++ * type. In those kernels, the callbacks still use the full atomic transaction ++ * state ABI, but the argument type is struct drm_atomic_commit. Either ++ * conftest means the helper callbacks take the full atomic transaction state. ++ */ ++#if defined(NV_DRM_CRTC_ATOMIC_CHECK_HAS_ATOMIC_STATE_ARG) || \ ++ defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++#define NV_DRM_CRTC_ATOMIC_CHECK_HAS_FULL_STATE_ARG ++#endif ++ ++#if defined(NV_DRM_PLANE_ATOMIC_CHECK_HAS_ATOMIC_STATE_ARG) || \ ++ defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++#define NV_DRM_PLANE_ATOMIC_CHECK_HAS_FULL_STATE_ARG ++#endif ++ ++/* ++ * The conftests for the drm_atomic_helper_swap_state() signature probe the ++ * argument type struct drm_atomic_state, which the same Linux 7.2 commit ++ * renamed to struct drm_atomic_commit. The signature itself did not change: ++ * it takes the full state and a 'stall' flag, and returns int. ++ */ ++#if defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++#define NV_DRM_ATOMIC_HELPER_SWAP_STATE_HAS_STALL_ARG ++#define NV_DRM_ATOMIC_HELPER_SWAP_STATE_RETURN_INT ++#endif ++ ++/* ++ * Linux commit 5164f7e7ff8e ("drm: Rename struct drm_atomic_state to ++ * drm_atomic_commit"), expected in Linux v7.2, also renamed ++ * drm_atomic_state_get()/drm_atomic_state_put() to ++ * drm_atomic_commit_get()/drm_atomic_commit_put(). The conftest for atomic ++ * state reference counting probes for the old names, so it reports a false ++ * negative on those kernels: reference counting itself is still present. ++ */ ++#if defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++#define NV_DRM_ATOMIC_STATE_REF_COUNTING_PRESENT ++#endif ++ ++static inline nv_drm_atomic_state_base_t * ++nv_drm_atomic_state_base_alloc(struct drm_device *dev) ++{ ++#if defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++ return drm_atomic_commit_alloc(dev); ++#else ++ return drm_atomic_state_alloc(dev); ++#endif ++} ++ ++static inline int ++nv_drm_atomic_state_base_init(struct drm_device *dev, ++ nv_drm_atomic_state_base_t *state) ++{ ++#if defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++ return drm_atomic_commit_init(dev, state); ++#else ++ return drm_atomic_state_init(dev, state); ++#endif ++} ++ ++static inline void ++nv_drm_atomic_state_base_put(nv_drm_atomic_state_base_t *state) ++{ ++#if defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++ drm_atomic_commit_put(state); ++#else ++ drm_atomic_state_put(state); ++#endif ++} ++ ++static inline void ++nv_drm_atomic_state_base_default_clear(nv_drm_atomic_state_base_t *state) ++{ ++#if defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++ drm_atomic_commit_default_clear(state); ++#else ++ drm_atomic_state_default_clear(state); ++#endif ++} ++ ++static inline void ++nv_drm_atomic_state_base_default_release(nv_drm_atomic_state_base_t *state) ++{ ++#if defined(NV_DRM_ATOMIC_COMMIT_STRUCT_PRESENT) ++ drm_atomic_commit_default_release(state); ++#else ++ drm_atomic_state_default_release(state); ++#endif ++} ++ + int nv_drm_atomic_helper_disable_all(struct drm_device *dev, + struct drm_modeset_acquire_ctx *ctx); + +diff --git a/nvidia-drm/nvidia-drm-modeset.c b/nvidia-drm/nvidia-drm-modeset.c +index c6488cd..5a6e941 100644 +--- a/nvidia-drm/nvidia-drm-modeset.c ++++ b/nvidia-drm/nvidia-drm-modeset.c +@@ -44,21 +44,23 @@ + + struct nv_drm_atomic_state { + struct NvKmsKapiRequestedModeSetConfig config; +- struct drm_atomic_state base; ++ nv_drm_atomic_state_base_t base; + }; + + static inline struct nv_drm_atomic_state *to_nv_atomic_state( +- struct drm_atomic_state *state) ++ nv_drm_atomic_state_base_t *state) + { + return container_of(state, struct nv_drm_atomic_state, base); + } + +-struct drm_atomic_state *nv_drm_atomic_state_alloc(struct drm_device *dev) ++nv_drm_atomic_state_base_t * ++nv_drm_atomic_state_alloc(struct drm_device *dev) + { + struct nv_drm_atomic_state *nv_state = + nv_drm_calloc(1, sizeof(*nv_state)); + +- if (nv_state == NULL || drm_atomic_state_init(dev, &nv_state->base) < 0) { ++ if (nv_state == NULL || ++ nv_drm_atomic_state_base_init(dev, &nv_state->base) < 0) { + nv_drm_free(nv_state); + return NULL; + } +@@ -66,16 +68,16 @@ struct drm_atomic_state *nv_drm_atomic_state_alloc(struct drm_device *dev) + return &nv_state->base; + } + +-void nv_drm_atomic_state_clear(struct drm_atomic_state *state) ++void nv_drm_atomic_state_clear(nv_drm_atomic_state_base_t *state) + { +- drm_atomic_state_default_clear(state); ++ nv_drm_atomic_state_base_default_clear(state); + } + +-void nv_drm_atomic_state_free(struct drm_atomic_state *state) ++void nv_drm_atomic_state_free(nv_drm_atomic_state_base_t *state) + { + struct nv_drm_atomic_state *nv_state = + to_nv_atomic_state(state); +- drm_atomic_state_default_release(state); ++ nv_drm_atomic_state_base_default_release(state); + nv_drm_free(nv_state); + } + +@@ -229,7 +231,7 @@ static int __nv_drm_get_syncpt_data( + */ + static int + nv_drm_atomic_apply_modeset_config(struct drm_device *dev, +- struct drm_atomic_state *state, ++ nv_drm_atomic_state_base_t *state, + bool commit) + { + struct nv_drm_device *nv_dev = to_nv_device(dev); +@@ -314,7 +316,7 @@ nv_drm_atomic_apply_modeset_config(struct drm_device *dev, + } + + int nv_drm_atomic_check(struct drm_device *dev, +- struct drm_atomic_state *state) ++ nv_drm_atomic_state_base_t *state) + { + int ret = 0; + +@@ -399,7 +401,7 @@ static void __nv_drm_handle_flip_event(struct nv_drm_crtc *nv_crtc) + } + + int nv_drm_atomic_commit(struct drm_device *dev, +- struct drm_atomic_state *state, ++ nv_drm_atomic_state_base_t *state, + bool nonblock) + { + int ret = -EBUSY; +diff --git a/nvidia-drm/nvidia-drm-modeset.h b/nvidia-drm/nvidia-drm-modeset.h +index 40df631..27de9b8 100644 +--- a/nvidia-drm/nvidia-drm-modeset.h ++++ b/nvidia-drm/nvidia-drm-modeset.h +@@ -27,20 +27,21 @@ + + #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE) + ++#include "nvidia-drm-helper.h" + #include "nvkms-kapi.h" + + struct drm_device; +-struct drm_atomic_state; + +-struct drm_atomic_state *nv_drm_atomic_state_alloc(struct drm_device *dev); +-void nv_drm_atomic_state_clear(struct drm_atomic_state *state); +-void nv_drm_atomic_state_free(struct drm_atomic_state *state); ++nv_drm_atomic_state_base_t * ++nv_drm_atomic_state_alloc(struct drm_device *dev); ++void nv_drm_atomic_state_clear(nv_drm_atomic_state_base_t *state); ++void nv_drm_atomic_state_free(nv_drm_atomic_state_base_t *state); + + int nv_drm_atomic_check(struct drm_device *dev, +- struct drm_atomic_state *state); ++ nv_drm_atomic_state_base_t *state); + + int nv_drm_atomic_commit(struct drm_device *dev, +- struct drm_atomic_state *state, bool nonblock); ++ nv_drm_atomic_state_base_t *state, bool nonblock); + + + void nv_drm_handle_flip_occurred(struct nv_drm_device *nv_dev, +diff --git a/nvidia-drm/nvidia-drm-sources.mk b/nvidia-drm/nvidia-drm-sources.mk +index 35905e9..b1d22c0 100644 +--- a/nvidia-drm/nvidia-drm-sources.mk ++++ b/nvidia-drm/nvidia-drm-sources.mk +@@ -117,6 +117,7 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_gem_prime_callbacks + NV_CONFTEST_TYPE_COMPILE_TESTS += drm_crtc_atomic_check_has_atomic_state_arg + NV_CONFTEST_TYPE_COMPILE_TESTS += drm_gem_object_vmap_has_map_arg + NV_CONFTEST_TYPE_COMPILE_TESTS += drm_plane_atomic_check_has_atomic_state_arg ++NV_CONFTEST_TYPE_COMPILE_TESTS += drm_atomic_commit_struct_present + NV_CONFTEST_TYPE_COMPILE_TESTS += drm_device_has_pdev + NV_CONFTEST_TYPE_COMPILE_TESTS += drm_crtc_state_has_no_vblank + NV_CONFTEST_TYPE_COMPILE_TESTS += drm_mode_config_has_allow_fb_modifiers +-- +2.53.0 + diff -Nru nvidia-graphics-drivers-550.163.01/debian/patches/module/series nvidia-graphics-drivers-550.163.01/debian/patches/module/series --- nvidia-graphics-drivers-550.163.01/debian/patches/module/series 2026-06-07 03:49:33.000000000 +0200 +++ nvidia-graphics-drivers-550.163.01/debian/patches/module/series 2026-10-07 19:29:53.000000000 +0200 @@ -38,6 +38,10 @@ 0085-fix-dma-fence-and-pahole-awk-shim-for-linux-7.0.patch 0086-add-MODULE_DESCRIPTION.patch +# kernel 7.2 support +0087-fix-linux-7.2-strncpy.patch +0088-fix-linux-7.2-drm-atomic.patch + # build system updates conftest-verbose.patch use-kbuild-compiler.patch

