Skip to content

Instantly share code, notes, and snippets.

@tpruzina
Created November 17, 2017 00:25
Show Gist options
  • Save tpruzina/c6180120c1b50635b562a841f79dd530 to your computer and use it in GitHub Desktop.
Save tpruzina/c6180120c1b50635b562a841f79dd530 to your computer and use it in GitHub Desktop.
NVIDIA-Linux-x86_64-387.22 patch for 4.15-staging-cf9b0772f2e410645fece13b749bd56505b998b8
diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/Kbuild NVIDIA-Linux-x86_64-387.22.patched/kernel/Kbuild
--- NVIDIA-Linux-x86_64-387.22/kernel/Kbuild 2017-10-26 07:11:01.000000000 +0200
+++ NVIDIA-Linux-x86_64-387.22.patched/kernel/Kbuild 2017-10-31 19:20:41.430505370 +0100
@@ -61,6 +61,7 @@
EXTRA_CFLAGS += -Wall -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"387.22\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Wno-sign-compare -Wno-format-extra-args
EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
+EXTRA_CFLAGS += -mtune=native
#
# Detect SGI UV systems and apply system-specific optimizations.
diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-connector.c NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-connector.c
--- NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-connector.c 2017-10-26 09:29:25.000000000 +0200
+++ NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-connector.c 2017-11-16 20:15:35.123121624 +0100
@@ -107,7 +107,7 @@
break;
}
- encoder = drm_encoder_find(dev, id);
+ encoder = drm_encoder_find(dev, NULL, id);
if (encoder == NULL)
{
diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-crtc.c NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-crtc.c
--- NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-crtc.c 2017-10-26 09:29:25.000000000 +0200
+++ NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-crtc.c 2017-11-17 01:06:06.298997404 +0100
@@ -434,7 +434,7 @@
goto done;
}
- crtc = drm_crtc_find(dev, params->crtc_id);
+ crtc = drm_crtc_find(dev, NULL, params->crtc_id);
if (!crtc) {
NV_DRM_DEV_LOG_DEBUG(nv_dev, "Unknown CRTC ID %d\n", params->crtc_id);
ret = -ENOENT;
diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-linux.c NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-linux.c
--- NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-linux.c 2017-10-26 09:29:26.000000000 +0200
+++ NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-linux.c 2017-11-14 01:47:40.815680166 +0100
@@ -185,7 +185,7 @@
module_exit(nv_linux_drm_exit);
#if defined(MODULE_LICENSE)
- MODULE_LICENSE("MIT");
+ MODULE_LICENSE("GPL");
#endif
#if defined(MODULE_INFO)
MODULE_INFO(supported, "external");
diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-modeset.c NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-modeset.c
--- NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-modeset.c 2017-10-26 09:29:25.000000000 +0200
+++ NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-modeset.c 2017-11-17 01:16:51.188958966 +0100
@@ -252,7 +252,7 @@
/* Loops over all crtcs and fill head configuration for changes */
- for_each_crtc_in_state(state, crtc, crtc_state, i)
+ for_each_new_crtc_in_state(state, crtc, crtc_state, i)
{
struct nvidia_drm_crtc *nv_crtc;
struct NvKmsKapiHeadRequestedConfig *head_requested_config;
@@ -303,7 +303,7 @@
head_requested_config->flags.displaysChanged = NV_TRUE;
- for_each_connector_in_state(state, connector, connector_state, j) {
+ for_each_new_connector_in_state(state, connector, connector_state, j) {
if (connector_state->crtc != crtc) {
continue;
}
@@ -324,7 +324,7 @@
/* Loops over all planes and fill plane configuration for changes */
- for_each_plane_in_state(state, plane, plane_state, i)
+ for_each_new_plane_in_state(state, plane, plane_state, i)
{
struct NvKmsKapiHeadRequestedConfig *head_requested_config;
@@ -634,7 +634,7 @@
nvidia_drm_write_combine_flush();
}
- for_each_crtc_in_state(state, crtc, crtc_state, i) {
+ for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
struct nvidia_drm_crtc *nv_crtc = DRM_CRTC_TO_NV_CRTC(crtc);
struct nv_drm_crtc_state *nv_crtc_state = to_nv_crtc_state(crtc->state);
struct nv_drm_flip *nv_flip = nv_crtc_state->nv_flip;
diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/nvidia-uvm/uvm8_va_block.c NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-uvm/uvm8_va_block.c
--- NVIDIA-Linux-x86_64-387.22/kernel/nvidia-uvm/uvm8_va_block.c 2017-10-26 09:29:23.000000000 +0200
+++ NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-uvm/uvm8_va_block.c 2017-11-14 01:43:56.176693556 +0100
@@ -36,6 +36,8 @@
#include "uvm8_perf_prefetch.h"
#include "uvm8_mem.h"
+#include <linux/sched/task_stack.h>
+
typedef enum
{
BLOCK_PTE_OP_MAP,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment