blob: 4b1cecc7cf4c019235d6bfb7f40bd4b1ffc77241 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
index 8ef4c27..85c43f2 100644
--- a/nvidia-drm/nvidia-drm-drv.c
+++ b/nvidia-drm/nvidia-drm-drv.c
@@ -887,7 +888,11 @@ static void nv_drm_update_drm_driver_features(void)
nv_drm_driver.dumb_create = nv_drm_dumb_create;
nv_drm_driver.dumb_map_offset = nv_drm_dumb_map_offset;
+// Rel. commit "drm: remove dumb_destroy callback" (Christian König, 26 Jan 2023)
+// NB: No resources are leaked, the kernel releases the same resources by default
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
nv_drm_driver.dumb_destroy = nv_drm_dumb_destroy;
+#endif
#endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
}
|