diff --git a/6.10/misc/nvidia/0001-Make-modeset-and-fbdev-default-enabled.patch b/6.10/misc/nvidia/0001-Make-modeset-and-fbdev-default-enabled.patch index 58fe0b3e..472c3794 100644 --- a/6.10/misc/nvidia/0001-Make-modeset-and-fbdev-default-enabled.patch +++ b/6.10/misc/nvidia/0001-Make-modeset-and-fbdev-default-enabled.patch @@ -1,15 +1,19 @@ -From 448ba7ac50659c2ffe5244107e6469648009647a Mon Sep 17 00:00:00 2001 +From da9767db1498ab8a679edccb297fa8a8e72ca628 Mon Sep 17 00:00:00 2001 From: Peter Jung -Date: Thu, 26 Sep 2024 14:50:38 +0200 -Subject: [PATCH 1/5] Make modeset and fbdev default enabled +Date: Fri, 18 Oct 2024 22:40:05 +0200 +Subject: [PATCH 1/6] Make modeset and fbdev default enabled +This is generally required for Wayland on NVIDIA support. +NVIDIA is also planing to enable this as default in the future. + +Signed-off-by: Peter Jung --- nvidia-drm/nvidia-drm-linux.c | 4 ++-- nvidia-drm/nvidia-drm-os-interface.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nvidia-drm/nvidia-drm-linux.c b/nvidia-drm/nvidia-drm-linux.c -index 8c59b7cb..c7f4a239 100644 +index 78429510..83d40983 100644 --- a/nvidia-drm/nvidia-drm-linux.c +++ b/nvidia-drm/nvidia-drm-linux.c @@ -31,13 +31,13 @@ @@ -20,7 +24,7 @@ index 8c59b7cb..c7f4a239 100644 + "Enable atomic kernel modesetting (1 = enable (default), 0 = disable)"); module_param_named(modeset, nv_drm_modeset_module_param, bool, 0400); - #if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) + #if defined(NV_DRM_FBDEV_AVAILABLE) MODULE_PARM_DESC( fbdev, - "Create a framebuffer device (1 = enable, 0 = disable (default)) (EXPERIMENTAL)"); @@ -44,5 +48,5 @@ index 473004b5..75fb34b6 100644 void *nv_drm_calloc(size_t nmemb, size_t size) { -- -2.46.2 +2.47.0 diff --git a/6.10/misc/nvidia/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch b/6.10/misc/nvidia/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch index b725c38f..3936c89a 100644 --- a/6.10/misc/nvidia/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch +++ b/6.10/misc/nvidia/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch @@ -1,8 +1,11 @@ -From ec0dc03cc4fb4cf5cab644e6e3a02d15da6771dc Mon Sep 17 00:00:00 2001 +From 0638bf38e24b9fd304805686b4b8b4d8d127d21d Mon Sep 17 00:00:00 2001 From: Peter Jung -Date: Thu, 26 Sep 2024 14:51:20 +0200 -Subject: [PATCH 2/5] Do not error on unkown CPU Type and add Zen5 support +Date: Fri, 18 Oct 2024 22:40:38 +0200 +Subject: [PATCH 2/6] Do not error on unkown CPU Type and add Zen5 support +Currently the Zen 5 CPU is an unknown CPU and prints an error in dmesg. Fix this with adding Zen5 support as well as change the print to a warning. + +Signed-off-by: Peter Jung --- src/nvidia/src/kernel/platform/cpu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) @@ -30,5 +33,5 @@ index bb76a9c2..6832e77c 100644 } } -- -2.46.2 +2.47.0 diff --git a/6.10/misc/nvidia/0003-Add-IBT-Support.patch b/6.10/misc/nvidia/0003-Add-IBT-Support.patch index 921320b6..56bf487c 100644 --- a/6.10/misc/nvidia/0003-Add-IBT-Support.patch +++ b/6.10/misc/nvidia/0003-Add-IBT-Support.patch @@ -1,8 +1,9 @@ -From ed4bcc72f91df7fe69c3ff0ac0aa45e268949f46 Mon Sep 17 00:00:00 2001 +From ca61ee8197185b9db1d1f1d61460c60a0933eeb3 Mon Sep 17 00:00:00 2001 From: Peter Jung -Date: Thu, 26 Sep 2024 14:51:45 +0200 -Subject: [PATCH 3/5] Add IBT Support +Date: Fri, 18 Oct 2024 22:40:58 +0200 +Subject: [PATCH 3/6] Add IBT support +Signed-off-by: Peter Jung --- src/nvidia-modeset/Makefile | 1 + 1 file changed, 1 insertion(+) @@ -20,5 +21,5 @@ index 2b96f3fa..ed934014 100644 CFLAGS += $(CONDITIONAL_CFLAGS) -- -2.46.2 +2.47.0 diff --git a/6.10/misc/nvidia/0004-6.11-Add-fix-for-fbdev.patch b/6.10/misc/nvidia/0004-6.11-Add-fix-for-fbdev.patch deleted file mode 100644 index 07bdeea5..00000000 --- a/6.10/misc/nvidia/0004-6.11-Add-fix-for-fbdev.patch +++ /dev/null @@ -1,199 +0,0 @@ -From 772eaa91e1e79fb0a4a7e9d80abd99db7a0c0b61 Mon Sep 17 00:00:00 2001 -From: Peter Jung -Date: Thu, 26 Sep 2024 14:52:57 +0200 -Subject: [PATCH 4/5] 6.11: Add fix for fbdev - ---- - kernel-open/conftest.sh | 23 ++++++++++++++++++- - kernel-open/header-presence-tests.mk | 1 + - kernel-open/nvidia-drm/nvidia-drm-drv.c | 22 +++++++++++------- - kernel-open/nvidia-drm/nvidia-drm-linux.c | 2 +- - .../nvidia-drm/nvidia-drm-os-interface.h | 8 ++++++- - kernel-open/nvidia-drm/nvidia-drm-sources.mk | 1 + - 6 files changed, 46 insertions(+), 11 deletions(-) - -diff --git a/kernel-open/conftest.sh b/kernel-open/conftest.sh -index 1226cea2..4a239e63 100755 ---- a/kernel-open/conftest.sh -+++ b/kernel-open/conftest.sh -@@ -6596,7 +6596,9 @@ compile_test() { - # Determine whether drm_fbdev_generic_setup is present. - # - # Added by commit 9060d7f49376 ("drm/fb-helper: Finish the -- # generic fbdev emulation") in v4.19. -+ # generic fbdev emulation") in v4.19. Removed by commit -+ # aae4682e5d66 ("drm/fbdev-generic: Convert to fbdev-ttm") -+ # in v6.11. - # - CODE=" - #include -@@ -6610,6 +6612,25 @@ compile_test() { - compile_check_conftest "$CODE" "NV_DRM_FBDEV_GENERIC_SETUP_PRESENT" "" "functions" - ;; - -+ drm_fbdev_ttm_setup) -+ # -+ # Determine whether drm_fbdev_ttm_setup is present. -+ # -+ # Added by commit aae4682e5d66 ("drm/fbdev-generic: -+ # Convert to fbdev-ttm") in v6.11. -+ # -+ CODE=" -+ #include -+ #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) -+ #include -+ #endif -+ void conftest_drm_fbdev_ttm_setup(void) { -+ drm_fbdev_ttm_setup(); -+ }" -+ -+ compile_check_conftest "$CODE" "NV_DRM_FBDEV_TTM_SETUP_PRESENT" "" "functions" -+ ;; -+ - drm_aperture_remove_conflicting_pci_framebuffers) - # - # Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present. -diff --git a/kernel-open/header-presence-tests.mk b/kernel-open/header-presence-tests.mk -index e8d2e02b..40204ae4 100644 ---- a/kernel-open/header-presence-tests.mk -+++ b/kernel-open/header-presence-tests.mk -@@ -15,6 +15,7 @@ NV_HEADER_PRESENCE_TESTS = \ - drm/drm_atomic_uapi.h \ - drm/drm_drv.h \ - drm/drm_fbdev_generic.h \ -+ drm/drm_fbdev_ttm.h \ - drm/drm_framebuffer.h \ - drm/drm_connector.h \ - drm/drm_probe_helper.h \ -diff --git a/kernel-open/nvidia-drm/nvidia-drm-drv.c b/kernel-open/nvidia-drm/nvidia-drm-drv.c -index 359ff0c4..50028c26 100644 ---- a/kernel-open/nvidia-drm/nvidia-drm-drv.c -+++ b/kernel-open/nvidia-drm/nvidia-drm-drv.c -@@ -64,12 +64,14 @@ - #include - #endif - --#if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) -+#if defined(NV_DRM_FBDEV_AVAILABLE) - #include - #include - #endif - --#if defined(NV_DRM_DRM_FBDEV_GENERIC_H_PRESENT) -+#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) -+#include -+#elif defined(NV_DRM_DRM_FBDEV_GENERIC_H_PRESENT) - #include - #endif - -@@ -476,7 +478,7 @@ static int nv_drm_load(struct drm_device *dev, unsigned long flags) - return -ENODEV; - } - --#if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) -+#if defined(NV_DRM_FBDEV_AVAILABLE) - /* - * If fbdev is enabled, take modeset ownership now before other DRM clients - * can take master (and thus NVKMS ownership). -@@ -610,7 +612,7 @@ static void __nv_drm_unload(struct drm_device *dev) - - /* Release modeset ownership if fbdev is enabled */ - --#if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) -+#if defined(NV_DRM_FBDEV_AVAILABLE) - if (nv_dev->hasFramebufferConsole) { - drm_atomic_helper_shutdown(dev); - nvKms->releaseOwnership(nv_dev->pDevice); -@@ -1838,7 +1840,7 @@ void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info) - goto failed_drm_register; - } - --#if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) -+#if defined(NV_DRM_FBDEV_AVAILABLE) - if (nv_drm_fbdev_module_param && - drm_core_check_feature(dev, DRIVER_MODESET)) { - -@@ -1851,9 +1853,13 @@ void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info) - drm_aperture_remove_conflicting_pci_framebuffers(pdev, nv_drm_driver.name); - #endif - } -+ #if defined(NV_DRM_FBDEV_TTM_AVAILABLE) -+ drm_fbdev_ttm_setup(dev, 32); -+ #elif defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) - drm_fbdev_generic_setup(dev, 32); -+ #endif - } --#endif /* defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) */ -+#endif /* defined(NV_DRM_FBDEV_AVAILABLE) */ - - /* Add NVIDIA-DRM device into list */ - -@@ -1995,12 +2001,12 @@ void nv_drm_suspend_resume(NvBool suspend) - - if (suspend) { - drm_kms_helper_poll_disable(dev); --#if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) -+#if defined(NV_DRM_FBDEV_AVAILABLE) - drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 1); - #endif - drm_mode_config_reset(dev); - } else { --#if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) -+#if defined(NV_DRM_FBDEV_AVAILABLE) - drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 0); - #endif - drm_kms_helper_poll_enable(dev); -diff --git a/kernel-open/nvidia-drm/nvidia-drm-linux.c b/kernel-open/nvidia-drm/nvidia-drm-linux.c -index c7f4a239..83d40983 100644 ---- a/kernel-open/nvidia-drm/nvidia-drm-linux.c -+++ b/kernel-open/nvidia-drm/nvidia-drm-linux.c -@@ -34,7 +34,7 @@ MODULE_PARM_DESC( - "Enable atomic kernel modesetting (1 = enable (default), 0 = disable)"); - module_param_named(modeset, nv_drm_modeset_module_param, bool, 0400); - --#if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) -+#if defined(NV_DRM_FBDEV_AVAILABLE) - MODULE_PARM_DESC( - fbdev, - "Create a framebuffer device (1 = enable (default), 0 = disable) (EXPERIMENTAL)"); -diff --git a/kernel-open/nvidia-drm/nvidia-drm-os-interface.h b/kernel-open/nvidia-drm/nvidia-drm-os-interface.h -index 6f8cfea9..a6b0f947 100644 ---- a/kernel-open/nvidia-drm/nvidia-drm-os-interface.h -+++ b/kernel-open/nvidia-drm/nvidia-drm-os-interface.h -@@ -59,14 +59,20 @@ typedef struct nv_timer nv_drm_timer; - #endif - - #if defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) -+#define NV_DRM_FBDEV_AVAILABLE - #define NV_DRM_FBDEV_GENERIC_AVAILABLE - #endif - -+#if defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) -+#define NV_DRM_FBDEV_AVAILABLE -+#define NV_DRM_FBDEV_TTM_AVAILABLE -+#endif -+ - struct page; - - /* Set to true when the atomic modeset feature is enabled. */ - extern bool nv_drm_modeset_module_param; --#if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) -+#if defined(NV_DRM_FBDEV_AVAILABLE) - /* Set to true when the nvidia-drm driver should install a framebuffer device */ - extern bool nv_drm_fbdev_module_param; - #endif -diff --git a/kernel-open/nvidia-drm/nvidia-drm-sources.mk b/kernel-open/nvidia-drm/nvidia-drm-sources.mk -index 7ef0c5b8..247096b7 100644 ---- a/kernel-open/nvidia-drm/nvidia-drm-sources.mk -+++ b/kernel-open/nvidia-drm/nvidia-drm-sources.mk -@@ -67,6 +67,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += fence_set_error - NV_CONFTEST_FUNCTION_COMPILE_TESTS += sync_file_get_fence - NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffers - NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_generic_setup -+NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_ttm_setup - NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_connector_attach_hdr_output_metadata_property - NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_helper_crtc_enable_color_mgmt - NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_crtc_enable_color_mgmt --- -2.46.2 - diff --git a/6.10/misc/nvidia/0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch b/6.10/misc/nvidia/0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch new file mode 100644 index 00000000..1b0d9dc4 --- /dev/null +++ b/6.10/misc/nvidia/0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch @@ -0,0 +1,121 @@ +From d9c29dc72db55db98c2430dc3783835ef881da5e Mon Sep 17 00:00:00 2001 +From: Peter Jung +Date: Fri, 18 Oct 2024 22:42:42 +0200 +Subject: [PATCH 4/7] Fix for 6.12.0-rc1 + drm_mode_config_funcs.output_poll_changed removal + +Tentative fix for NVIDIA 560.35.03 driver for Linux 6.12-rc1. + +Based on https://gist.github.com/joanbm/a6d3f7f873a60dec0aa4a734c0f1d64e + +Signed-off-by: Peter Jung +--- + kernel-open/nvidia-drm/nvidia-drm-drv.c | 48 +++++++++++++++++++++++-- + 1 file changed, 45 insertions(+), 3 deletions(-) + +diff --git a/kernel-open/nvidia-drm/nvidia-drm-drv.c b/kernel-open/nvidia-drm/nvidia-drm-drv.c +index 8cb94219..c82feef6 100644 +--- a/kernel-open/nvidia-drm/nvidia-drm-drv.c ++++ b/kernel-open/nvidia-drm/nvidia-drm-drv.c +@@ -100,6 +100,11 @@ + #include + #endif + ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0) ++#include ++#endif ++ + static int nv_drm_revoke_modeset_permission(struct drm_device *dev, + struct drm_file *filep, + NvU32 dpyId); +@@ -147,7 +152,7 @@ static char* nv_get_transfer_function_name( + + #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE) + +-#if defined(NV_DRM_OUTPUT_POLL_CHANGED_PRESENT) ++//#if defined(NV_DRM_OUTPUT_POLL_CHANGED_PRESENT) + static void nv_drm_output_poll_changed(struct drm_device *dev) + { + struct drm_connector *connector = NULL; +@@ -191,7 +196,7 @@ static void nv_drm_output_poll_changed(struct drm_device *dev) + nv_drm_connector_list_iter_end(&conn_iter); + #endif + } +-#endif /* NV_DRM_OUTPUT_POLL_CHANGED_PRESENT */ ++//#endif /* NV_DRM_OUTPUT_POLL_CHANGED_PRESENT */ + + static struct drm_framebuffer *nv_drm_framebuffer_create( + struct drm_device *dev, +@@ -229,7 +234,7 @@ static const struct drm_mode_config_funcs nv_mode_config_funcs = { + .atomic_check = nv_drm_atomic_check, + .atomic_commit = nv_drm_atomic_commit, + +- #if defined(NV_DRM_OUTPUT_POLL_CHANGED_PRESENT) ++ #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) + .output_poll_changed = nv_drm_output_poll_changed, + #endif + }; +@@ -1711,6 +1716,10 @@ static const struct file_operations nv_drm_fops = { + .read = drm_read, + + .llseek = noop_llseek, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0) ++ // Rel. commit. "fs: move FMODE_UNSIGNED_OFFSET to fop_flags" (Christian Brauner, 9 Aug 2024) ++ .fop_flags = FOP_UNSIGNED_OFFSET, ++#endif + }; + + static const struct drm_ioctl_desc nv_drm_ioctls[] = { +@@ -1939,6 +1948,20 @@ void nv_drm_update_drm_driver_features(void) + } + + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0) ++static int hotplug_helper_client_hotplug(struct drm_client_dev *client) ++{ ++ nv_drm_output_poll_changed(client->dev); ++ return 0; ++} ++ ++static const struct drm_client_funcs nv_hotplug_helper_client_funcs = { ++ .owner = THIS_MODULE, ++ .hotplug = hotplug_helper_client_hotplug, ++}; ++#endif ++ ++ + + /* + * Helper function for allocate/register DRM device for given NVIDIA GPU ID. +@@ -2029,8 +2052,27 @@ void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info) + nv_dev->next = dev_list; + dev_list = nv_dev; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0) ++ /* Register a DRM client for receiving hotplug events */ ++ struct drm_client_dev *client = kzalloc(sizeof(*client), GFP_KERNEL); ++ if (client == NULL || drm_client_init(dev, client, ++ "nv-hotplug-helper", &nv_hotplug_helper_client_funcs)) { ++ printk(KERN_WARNING "Failed to initialize the nv-hotplug-helper DRM client."); ++ goto failed_drm_client_init; ++ } ++ ++ drm_client_register(client); ++ pr_info("Registered the nv-hotplug-helper DRM client."); ++#endif ++ + return; /* Success */ + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0) ++failed_drm_client_init: ++ ++ kfree(client); ++#endif ++ + failed_drm_register: + + nv_drm_dev_free(dev); +-- +2.47.0 + diff --git a/6.10/misc/nvidia/0005-6.12-drm_outpull_pill-changed-check.patch b/6.10/misc/nvidia/0005-6.12-drm_outpull_pill-changed-check.patch deleted file mode 100644 index e6f8e519..00000000 --- a/6.10/misc/nvidia/0005-6.12-drm_outpull_pill-changed-check.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 94ad29389cd5129401adea6925f987f4529abb1c Mon Sep 17 00:00:00 2001 -From: Peter Jung -Date: Thu, 26 Sep 2024 14:53:31 +0200 -Subject: [PATCH 5/5] 6.12: drm_outpull_pill changed check - ---- - kernel-open/conftest.sh | 23 ++++++++++++++++++++ - kernel-open/nvidia-drm/nvidia-drm-drv.c | 4 ++++ - kernel-open/nvidia-drm/nvidia-drm-sources.mk | 1 + - 3 files changed, 28 insertions(+) - -diff --git a/kernel-open/conftest.sh b/kernel-open/conftest.sh -index 4a239e63..4d6fff64 100755 ---- a/kernel-open/conftest.sh -+++ b/kernel-open/conftest.sh -@@ -6631,6 +6631,29 @@ compile_test() { - compile_check_conftest "$CODE" "NV_DRM_FBDEV_TTM_SETUP_PRESENT" "" "functions" - ;; - -+ drm_output_poll_changed) -+ # -+ # Determine whether drm_mode_config_funcs.output_poll_changed -+ # callback is present -+ # -+ # Removed by commit 446d0f4849b1 ("drm: Remove struct -+ # drm_mode_config_funcs.output_poll_changed") in v6.12. Hotplug -+ # event support is handled through the fbdev emulation interface -+ # going forward. -+ # -+ CODE=" -+ #if defined(NV_DRM_DRM_MODE_CONFIG_H_PRESENT) -+ #include -+ #else -+ #include -+ #endif -+ int conftest_drm_output_poll_changed_available(void) { -+ return offsetof(struct drm_mode_config_funcs, output_poll_changed); -+ }" -+ -+ compile_check_conftest "$CODE" "NV_DRM_OUTPUT_POLL_CHANGED_PRESENT" "" "types" -+ ;; -+ - drm_aperture_remove_conflicting_pci_framebuffers) - # - # Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present. -diff --git a/kernel-open/nvidia-drm/nvidia-drm-drv.c b/kernel-open/nvidia-drm/nvidia-drm-drv.c -index 50028c26..034dda66 100644 ---- a/kernel-open/nvidia-drm/nvidia-drm-drv.c -+++ b/kernel-open/nvidia-drm/nvidia-drm-drv.c -@@ -126,6 +126,7 @@ static const char* nv_get_input_colorspace_name( - - #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE) - -+#if defined(NV_DRM_OUTPUT_POLL_CHANGED_PRESENT) - static void nv_drm_output_poll_changed(struct drm_device *dev) - { - struct drm_connector *connector = NULL; -@@ -169,6 +170,7 @@ static void nv_drm_output_poll_changed(struct drm_device *dev) - nv_drm_connector_list_iter_end(&conn_iter); - #endif - } -+#endif /* NV_DRM_OUTPUT_POLL_CHANGED_PRESENT */ - - static struct drm_framebuffer *nv_drm_framebuffer_create( - struct drm_device *dev, -@@ -206,7 +208,9 @@ static const struct drm_mode_config_funcs nv_mode_config_funcs = { - .atomic_check = nv_drm_atomic_check, - .atomic_commit = nv_drm_atomic_commit, - -+ #if defined(NV_DRM_OUTPUT_POLL_CHANGED_PRESENT) - .output_poll_changed = nv_drm_output_poll_changed, -+ #endif - }; - - static void nv_drm_event_callback(const struct NvKmsKapiEvent *event) -diff --git a/kernel-open/nvidia-drm/nvidia-drm-sources.mk b/kernel-open/nvidia-drm/nvidia-drm-sources.mk -index 247096b7..f5964a57 100644 ---- a/kernel-open/nvidia-drm/nvidia-drm-sources.mk -+++ b/kernel-open/nvidia-drm/nvidia-drm-sources.mk -@@ -131,3 +131,4 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffe - NV_CONFTEST_TYPE_COMPILE_TESTS += drm_mode_create_dp_colorspace_property_has_supported_colorspaces_arg - NV_CONFTEST_TYPE_COMPILE_TESTS += drm_syncobj_features_present - NV_CONFTEST_TYPE_COMPILE_TESTS += drm_unlocked_ioctl_flag_present -+NV_CONFTEST_TYPE_COMPILE_TESTS += drm_output_poll_changed --- -2.46.2 - diff --git a/6.10/misc/nvidia/0006-silence-event-assert-until-570.patch b/6.10/misc/nvidia/0006-silence-event-assert-until-570.patch new file mode 100644 index 00000000..d7fe7c07 --- /dev/null +++ b/6.10/misc/nvidia/0006-silence-event-assert-until-570.patch @@ -0,0 +1,34 @@ +From 348ca7e5e83bc36101172993f3aa60ae8ae5a2c7 Mon Sep 17 00:00:00 2001 +From: Peter Jung +Date: Fri, 18 Oct 2024 22:44:33 +0200 +Subject: [PATCH 6/6] silence-event-assert-until-570 + +Currently, when playing CS2 it reports a massive spam in the dmesg log. This will be fixed in the 570 driver. +Silence it for now. + +Signed-off-by: Peter Jung +--- + src/nvidia/src/kernel/rmapi/event_notification.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/nvidia/src/kernel/rmapi/event_notification.c b/src/nvidia/src/kernel/rmapi/event_notification.c +index cf78eadd..d6937cac 100644 +--- a/src/nvidia/src/kernel/rmapi/event_notification.c ++++ b/src/nvidia/src/kernel/rmapi/event_notification.c +@@ -286,11 +286,11 @@ static NV_STATUS _gpuEngineEventNotificationListNotify + portSyncSpinlockAcquire(pEventNotificationList->pSpinlock); + { + // We don't expect this to be called multiple times in parallel +- NV_ASSERT_OR_ELSE(pEventNotificationList->pendingEventNotifyCount == 0, ++ if (pEventNotificationList->pendingEventNotifyCount != 0) + { + portSyncSpinlockRelease(pEventNotificationList->pSpinlock); + return NV_ERR_INVALID_STATE; +- }); ++ } + + EngineEventNotificationListIter it = + listIterAll(&pEventNotificationList->eventNotificationList); +-- +2.47.0 + diff --git a/6.10/misc/nvidia/0009-fix-hdmi-names.patch b/6.10/misc/nvidia/0009-fix-hdmi-names.patch new file mode 100644 index 00000000..2e9bb569 --- /dev/null +++ b/6.10/misc/nvidia/0009-fix-hdmi-names.patch @@ -0,0 +1,51 @@ +From 5dc6c82dbf58d7c9a801d0332f1eede5495bd7cb Mon Sep 17 00:00:00 2001 +From: Peter Jung +Date: Fri, 18 Oct 2024 22:44:59 +0200 +Subject: [PATCH 7/7] nvkms: Sanitize & trim ELD product name strings + +Signed-off-by: Peter Jung +--- + src/nvidia-modeset/src/nvkms-hdmi.c | 26 ++++++-------------------- + 1 file changed, 6 insertions(+), 20 deletions(-) + +diff --git a/src/nvidia-modeset/src/nvkms-hdmi.c b/src/nvidia-modeset/src/nvkms-hdmi.c +index 07841ef5..338d2dad 100644 +--- a/src/nvidia-modeset/src/nvkms-hdmi.c ++++ b/src/nvidia-modeset/src/nvkms-hdmi.c +@@ -1046,27 +1046,13 @@ static NvBool FillELDBuffer(const NVDpyEvoRec *pDpyEvo, + + if (status == NVT_STATUS_SUCCESS) { + /* +- * NvTiming_GetProductName() returns a nul-terminated string, but the +- * string in the EDID is terminated with 0x0A and padded with 0x20. +- * Put back these special characters. ++ * NvTiming_GetProductName returns a nul-terminated string. Figure out ++ * how long it is and copy the bytes up to, but not including, the nul ++ * terminator. + */ +- NvBool pastTerminator = FALSE; +- NvU32 i; +- +- for (i = 0; i < NVT_EDID_LDD_PAYLOAD_SIZE; i++) { +- if (pastTerminator) { +- name[i] = 0x20; +- } +- if (name[i] == '\0') { +- name[i] = 0x0A; +- pastTerminator = TRUE; +- } +- } +- +- monitorNameLen = NVT_EDID_LDD_PAYLOAD_SIZE; +- pEld->buffer[4] |= NVT_EDID_LDD_PAYLOAD_SIZE; +- nvkms_memcpy(&pEld->buffer[20], name, +- NVT_EDID_LDD_PAYLOAD_SIZE); ++ monitorNameLen = nvkms_strlen((char *)name); ++ pEld->buffer[4] |= monitorNameLen; ++ nvkms_memcpy(&pEld->buffer[20], name, monitorNameLen); + } + + /* offset 20 + MNL ~ 20 + MNL + (3 * SAD_Count) - 1 : CEA_SADs */ +-- +2.47.0 + diff --git a/6.11/misc/nvidia/0003-Add-IBT-support.patch b/6.11/misc/nvidia/0003-Add-IBT-Support.patch similarity index 100% rename from 6.11/misc/nvidia/0003-Add-IBT-support.patch rename to 6.11/misc/nvidia/0003-Add-IBT-Support.patch diff --git a/6.12/misc/nvidia/0003-Add-IBT-support.patch b/6.12/misc/nvidia/0003-Add-IBT-Support.patch similarity index 100% rename from 6.12/misc/nvidia/0003-Add-IBT-support.patch rename to 6.12/misc/nvidia/0003-Add-IBT-Support.patch diff --git a/6.6/misc/nvidia/0003-Add-IBT-support.patch b/6.6/misc/nvidia/0003-Add-IBT-Support.patch similarity index 100% rename from 6.6/misc/nvidia/0003-Add-IBT-support.patch rename to 6.6/misc/nvidia/0003-Add-IBT-Support.patch diff --git a/Files b/Files index 8b2bb0c8..133bfc41 100644 --- a/Files +++ b/Files @@ -448,23 +448,19 @@ │   │   ├── 0001-Make-modeset-and-fbdev-default-enabled.patch │   │   ├── 0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch │   │   ├── 0003-Add-IBT-Support.patch -│   │   ├── 0004-6.11-Add-fix-for-fbdev.patch -│   │   └── 0005-6.12-drm_outpull_pill-changed-check.patch -│   ├── sched -│   │   ├── 0001-bore-cachy-ext.patch -│   │   ├── 0001-bore-cachy.patch -│   │   ├── 0001-bore-cachy-rt.patch -│   │   ├── 0001-bore.patch -│   │   ├── 0001-echo-cachy.patch -│   │   ├── 0001-echo.patch -│   │   ├── 0001-prjc-cachy.patch -│   │   ├── 0001-prjc.patch -│   │   └── 0001-sched-ext.patch -│   └── sched-dev +│   │   ├── 0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch +│   │   ├── 0006-silence-event-assert-until-570.patch +│   │   └── 0009-fix-hdmi-names.patch +│   └── sched │   ├── 0001-bore-cachy-ext.patch │   ├── 0001-bore-cachy.patch │   ├── 0001-bore-cachy-rt.patch -│   └── 0001-bore.patch +│   ├── 0001-bore.patch +│   ├── 0001-echo-cachy.patch +│   ├── 0001-echo.patch +│   ├── 0001-prjc-cachy.patch +│   ├── 0001-prjc.patch +│   └── 0001-sched-ext.patch ├── 6.11 │   ├── 0001-address-masking.patch │   ├── 0002-amd-cache-optimizer.patch @@ -494,7 +490,7 @@ │   │   └── nvidia │   │   ├── 0001-Make-modeset-and-fbdev-default-enabled.patch │   │   ├── 0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch -│   │   ├── 0003-Add-IBT-support.patch +│   │   ├── 0003-Add-IBT-Support.patch │   │   ├── 0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch │   │   ├── 0006-silence-event-assert-until-570.patch │   │   └── 0009-fix-hdmi-names.patch @@ -544,7 +540,7 @@ │   │   └── nvidia │   │   ├── 0001-Make-modeset-and-fbdev-default-enabled.patch │   │   ├── 0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch -│   │   ├── 0003-Add-IBT-support.patch +│   │   ├── 0003-Add-IBT-Support.patch │   │   ├── 0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch │   │   ├── 0006-silence-event-assert-until-570.patch │   │   └── 0009-fix-hdmi-names.patch @@ -722,7 +718,7 @@ │   │   └── nvidia │   │   ├── 0001-Make-modeset-and-fbdev-default-enabled.patch │   │   ├── 0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch -│   │   ├── 0003-Add-IBT-support.patch +│   │   ├── 0003-Add-IBT-Support.patch │   │   ├── 0004-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch │   │   ├── 0006-silence-event-assert-until-570.patch │   │   └── 0009-fix-hdmi-names.patch @@ -868,4 +864,6 @@ │   ├── 0001-prjc.patch │   └── 0001-sched-ext.patch ├── Files -└── README.md \ No newline at end of file +└── README.md + +101 directories, 766 files