x11-drivers/nvidia-drivers: fix missing dep (/usr/lib64/libnvidia-gtk3.so.355.11...
authorZero_Chaos <zerochaos@gentoo.org>
Fri, 18 Sep 2015 18:23:26 +0000 (14:23 -0400)
committerZero_Chaos <zerochaos@gentoo.org>
Fri, 18 Sep 2015 18:23:26 +0000 (14:23 -0400)
Package-Manager: portage-2.2.20.1

x11-drivers/nvidia-drivers/files/nvidia-drivers-355.06-pax.patch [new file with mode: 0644]
x11-drivers/nvidia-drivers/nvidia-drivers-355.11.ebuild

diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-355.06-pax.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-355.06-pax.patch
new file mode 100644 (file)
index 0000000..cc5ebdf
--- /dev/null
@@ -0,0 +1,102 @@
+diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/common/inc/nv-linux.h NVIDIA-Linux-x86_64-355.06/kernel/common/inc/nv-linux.h
+--- NVIDIA-Linux-x86_64-355.06.orig/kernel/common/inc/nv-linux.h       2015-07-29 05:13:57.000000000 +0200
++++ NVIDIA-Linux-x86_64-355.06/kernel/common/inc/nv-linux.h    2015-08-21 16:45:55.624336728 +0200
+@@ -1408,11 +1408,11 @@ extern void *nvidia_stack_t_cache;
+ #if !defined(NV_VMWARE)
+ #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
+-#define NV_KMEM_CACHE_CREATE(name, type)    \
+-    kmem_cache_create(name, sizeof(type), 0, 0, NULL)
++#define NV_KMEM_CACHE_CREATE(name, type, flags)    \
++    kmem_cache_create(name, sizeof(type), 0, flags, NULL)
+ #else
+-#define NV_KMEM_CACHE_CREATE(name, type)    \
+-    kmem_cache_create(name, sizeof(type), 0, 0, NULL, \
++#define NV_KMEM_CACHE_CREATE(name, type, flags)    \
++    kmem_cache_create(name, sizeof(type), 0, flags, NULL, \
+                       NULL)
+ #endif
+ #define NV_KMEM_CACHE_DESTROY(kmem_cache)   \
+diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv.c NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv.c
+--- NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv.c 2015-07-29 05:13:57.000000000 +0200
++++ NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv.c      2015-08-21 16:44:51.008340178 +0200
+@@ -719,7 +719,7 @@ int __init nvidia_init_module(void)
+ #endif
+     nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name,
+-                                                nvidia_stack_t);
++                                                nvidia_stack_t, SLAB_USERCOPY);
+     if (nvidia_stack_t_cache == NULL)
+     {
+         nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
+@@ -861,7 +861,7 @@ int __init nvidia_init_module(void)
+     nv_state_init_gpu_uuid_cache(nv);
+     nvidia_pte_t_cache = NV_KMEM_CACHE_CREATE(nvidia_pte_cache_name,
+-                                              nvidia_pte_t);
++                                              nvidia_pte_t, 0);
+     if (nvidia_pte_t_cache == NULL)
+     {
+         rc = -ENOMEM;
+@@ -872,7 +872,7 @@ int __init nvidia_init_module(void)
+     if (!nv_multiple_kernel_modules)
+     {
+         nvidia_p2p_page_t_cache = NV_KMEM_CACHE_CREATE(nvidia_p2p_page_cache_name,
+-                                                       nvidia_p2p_page_t);
++                                                       nvidia_p2p_page_t, 0);
+         if (nvidia_p2p_page_t_cache == NULL)
+         {
+             rc = -ENOMEM;
+diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv-mmap.c NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv-mmap.c
+--- NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia/nv-mmap.c    2015-07-29 05:13:57.000000000 +0200
++++ NVIDIA-Linux-x86_64-355.06/kernel/nvidia/nv-mmap.c 2015-08-21 16:58:15.968297199 +0200
+@@ -113,12 +113,12 @@ nvidia_vma_release(struct vm_area_struct
+ }
+ #if defined(NV_VM_OPERATIONS_STRUCT_HAS_ACCESS)
+-static int
++static ssize_t
+ nvidia_vma_access(
+     struct vm_area_struct *vma,
+     unsigned long addr,
+     void *buffer,
+-    int length,
++    size_t length,
+     int write
+ )
+ {
+diff -urp NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia-uvm/uvm_common.c NVIDIA-Linux-x86_64-355.06/kernel/nvidia-uvm/uvm_common.c
+--- NVIDIA-Linux-x86_64-355.06.orig/kernel/nvidia-uvm/uvm_common.c     2015-07-29 05:10:08.000000000 +0200
++++ NVIDIA-Linux-x86_64-355.06/kernel/nvidia-uvm/uvm_common.c  2015-08-21 17:00:33.788289841 +0200
+@@ -60,7 +60,7 @@ static void uvmnext_exit(void)
+ {
+ }
+-static NV_STATUS uvmnext_isr_top_half(void)
++static NV_STATUS uvmnext_isr_top_half(UvmGpuUuid *gpuUuidStruct)
+ {
+     return NV_ERR_NO_INTR_PENDING;
+ }
+@@ -79,7 +79,6 @@ NvBool uvmnext_activated(void)
+ #endif // NVIDIA_UVM_NEXT_ENABLED
+ static dev_t g_uvmBaseDev;
+-struct UvmOpsUvmEvents g_exportedUvmOps;
+ // TODO: This would be easier if RM allowed for multiple registrations, since we
+ //       could register UVM-Lite and UVM-Next separately (bug 1372835).
+@@ -112,9 +111,11 @@ static NV_STATUS uvmSetupGpuProvider(voi
+     NV_STATUS status = NV_OK;
+ #ifdef NVIDIA_UVM_RM_ENABLED
+-    g_exportedUvmOps.startDevice = uvm_gpu_event_start_device;
+-    g_exportedUvmOps.stopDevice  = uvm_gpu_event_stop_device;
+-    g_exportedUvmOps.isrTopHalf  = uvmnext_isr_top_half;
++    static struct UvmOpsUvmEvents g_exportedUvmOps = {
++        .startDevice = uvm_gpu_event_start_device,
++        .stopDevice  = uvm_gpu_event_stop_device,
++        .isrTopHalf  = uvmnext_isr_top_half,
++    };
+     // call RM to exchange the function pointers.
+     status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps);
index 102dce3312adbcdfc59af8be4b8696d51b20b6f2..8fb9df04aee7d84285a5b9ea237766e392223e12 100644 (file)
@@ -35,6 +35,7 @@ REQUIRED_USE="
 
 COMMON="
        app-eselect/eselect-opencl
+       gtk3? ( x11-libs/cairo )
        kernel_linux? ( >=sys-libs/glibc-2.6.1 )
        X? (
                >=app-eselect/eselect-opengl-1.0.9
@@ -168,8 +169,7 @@ src_prepare() {
                ewarn "Using PAX patches is not supported. You will be asked to"
                ewarn "use a standard kernel should you have issues. Should you"
                ewarn "need support with these patches, contact the PaX team."
-               epatch "${FILESDIR}"/${PN}-346.16-pax-usercopy.patch
-               epatch "${FILESDIR}"/${PN}-346.16-pax-constify.patch
+               epatch "${FILESDIR}"/${PN}-355.06-pax.patch
        fi
 
        # Allow user patches so they can support RC kernels and whatever else