daily pastebin goal
63%
SHARE
TWEET

nvidia 4.7

a guest Aug 21st, 2016 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -Naur nvidia-drivers/kernel/nvidia-drm/nvidia-drm-fb.c nvidia-drivers.new/kernel/nvidia-drm/nvidia-drm-fb.c
  2. --- nvidia-drivers/kernel/nvidia-drm/nvidia-drm-fb.c    2016-08-08 13:06:08.895435481 +0200
  3. +++ nvidia-drivers.new/kernel/nvidia-drm/nvidia-drm-fb.c    2016-08-08 13:16:04.215438841 +0200
  4. @@ -32,6 +32,8 @@
  5.  
  6.  #include <drm/drm_crtc_helper.h>
  7.  
  8. +#include <linux/version.h>
  9. +
  10.  static void nvidia_framebuffer_destroy(struct drm_framebuffer *fb)
  11.  {
  12.      struct nvidia_drm_device *nv_dev = fb->dev->dev_private;
  13. @@ -114,7 +116,11 @@
  14.       * We don't support any planar format, pick up first buffer only.
  15.       */
  16.  
  17. -    gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
  18. +    #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
  19. +        gem = drm_gem_object_lookup(file, cmd->handles[0]);
  20. +    #else
  21. +        gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
  22. +    #endif
  23.  
  24.      if (gem == NULL)
  25.      {
  26. diff -Naur nvidia-drivers/kernel/nvidia-drm/nvidia-drm-gem.c nvidia-drivers.new/kernel/nvidia-drm/nvidia-drm-gem.c
  27. --- nvidia-drivers/kernel/nvidia-drm/nvidia-drm-gem.c   2016-08-08 13:06:08.895435481 +0200
  28. +++ nvidia-drivers.new/kernel/nvidia-drm/nvidia-drm-gem.c   2016-08-08 13:44:56.607448618 +0200
  29. @@ -28,6 +28,8 @@
  30.  #include "nvidia-drm-ioctl.h"
  31.  #include "nvidia-drm-gem.h"
  32.  
  33. +#include <linux/version.h>
  34. +
  35.  static struct nvidia_drm_gem_object *nvidia_drm_gem_new
  36.  (
  37.      struct drm_file *file_priv,
  38. @@ -408,7 +410,11 @@
  39.  
  40.      mutex_lock(&dev->struct_mutex);
  41.  
  42. -    gem = drm_gem_object_lookup(dev, file, handle);
  43. +    #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
  44. +        gem = drm_gem_object_lookup(file, handle);
  45. +    #else
  46. +        gem = drm_gem_object_lookup(dev, file, handle);
  47. +    #endif
  48.  
  49.      if (gem == NULL)
  50.      {
  51. diff -Naur nvidia-drivers/kernel/nvidia-uvm/uvm8_gpu.c nvidia-drivers.new/kernel/nvidia-uvm/uvm8_gpu.c
  52. --- nvidia-drivers/kernel/nvidia-uvm/uvm8_gpu.c 2016-08-08 13:06:08.912435481 +0200
  53. +++ nvidia-drivers.new/kernel/nvidia-uvm/uvm8_gpu.c 2016-08-08 13:07:58.244436098 +0200
  54. @@ -647,7 +647,7 @@
  55.                     gpu->id, uvm_gpu_retained_count(gpu));
  56.  
  57.      // All channels should have been removed before the retained count went to 0
  58. -    UVM_ASSERT(radix_tree_empty(&gpu->instance_ptr_table));
  59. +    UVM_ASSERT(radix_tree_is_empty(&gpu->instance_ptr_table));
  60.  
  61.      // Remove the GPU from the table.
  62.      uvm_spin_lock_irqsave(&g_uvm_global.gpu_table_lock);
  63. diff -Naur nvidia-drivers/kernel/nvidia-uvm/uvm_linux.h nvidia-drivers.new/kernel/nvidia-uvm/uvm_linux.h
  64. --- nvidia-drivers/kernel/nvidia-uvm/uvm_linux.h    2016-08-08 13:06:08.912435481 +0200
  65. +++ nvidia-drivers.new/kernel/nvidia-uvm/uvm_linux.h    2016-08-08 13:11:46.718437388 +0200
  66. @@ -554,7 +554,7 @@
  67.      INIT_RADIX_TREE(tree, GFP_NOWAIT);
  68.  }
  69.  
  70. -static bool radix_tree_empty(struct radix_tree_root *tree)
  71. +static bool radix_tree_is_empty(struct radix_tree_root *tree)
  72.  {
  73.      void *dummy;
  74.      return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top