mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
3bdbf701ff
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
70 lines
2.3 KiB
Diff
70 lines
2.3 KiB
Diff
diff -Nur kernel.orig/nvidia/nvlink_linux.c kernel/nvidia/nvlink_linux.c
|
|
--- kernel.orig/nvidia/nvlink_linux.c 2021-06-02 19:10:01.000000000 -0400
|
|
+++ kernel/nvidia/nvlink_linux.c 2021-07-21 00:54:04.940862052 -0400
|
|
@@ -21,6 +21,7 @@
|
|
|
|
*******************************************************************************/
|
|
|
|
+#include <linux/version.h>
|
|
#include "conftest.h"
|
|
|
|
#include "nvlink_common.h"
|
|
@@ -597,7 +598,12 @@
|
|
// the requested timeout has expired, loop until less
|
|
// than a jiffie of the desired delay remains.
|
|
//
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
|
|
current->state = TASK_INTERRUPTIBLE;
|
|
+#else
|
|
+ // Rel. commit "sched: Change task_struct::state" (Peter Zijlstra, Jun 11 2021)
|
|
+ WRITE_ONCE(current->__state, TASK_INTERRUPTIBLE);
|
|
+#endif
|
|
do
|
|
{
|
|
schedule_timeout(jiffies);
|
|
diff -Nur kernel.orig/nvidia/os-interface.c kernel/nvidia/os-interface.c
|
|
--- kernel.orig/nvidia/os-interface.c 2021-06-02 19:09:57.000000000 -0400
|
|
+++ kernel/nvidia/os-interface.c 2021-07-21 00:54:31.512104423 -0400
|
|
@@ -8,6 +8,7 @@
|
|
* _NVRM_COPYRIGHT_END_
|
|
*/
|
|
|
|
+#include <linux/version.h>
|
|
#define __NO_VERSION__
|
|
#include "nv-misc.h"
|
|
|
|
@@ -580,7 +581,12 @@
|
|
// the requested timeout has expired, loop until less
|
|
// than a jiffie of the desired delay remains.
|
|
//
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
|
|
current->state = TASK_INTERRUPTIBLE;
|
|
+#else
|
|
+ // Rel. commit "sched: Change task_struct::state" (Peter Zijlstra, Jun 11 2021)
|
|
+ WRITE_ONCE(current->__state, TASK_INTERRUPTIBLE);
|
|
+#endif
|
|
do
|
|
{
|
|
schedule_timeout(jiffies);
|
|
diff -Nur kernel.orig/nvidia-drm/nvidia-drm-drv.c kernel/nvidia-drm/nvidia-drm-drv.c
|
|
--- kernel.orig/nvidia-drm/nvidia-drm-drv.c 2021-06-02 19:10:01.000000000 -0400
|
|
+++ kernel/nvidia-drm/nvidia-drm-drv.c 2021-07-21 02:56:07.552121923 -0400
|
|
@@ -20,6 +20,8 @@
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
+#include <linux/version.h>
|
|
+
|
|
#include "nvidia-drm-conftest.h" /* NV_DRM_AVAILABLE and NV_DRM_DRM_GEM_H_PRESENT */
|
|
|
|
#include "nvidia-drm-priv.h"
|
|
@@ -811,7 +813,9 @@
|
|
|
|
dev->dev_private = nv_dev;
|
|
nv_dev->dev = dev;
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
|
|
dev->pdev = pdev;
|
|
+#endif
|
|
|
|
/* Register DRM device to DRM sub-system */
|
|
|