[nvidia-kmod/el7] Add epoch to kmod-nvidia-newest obsolete version
by Nicolas Chauvet
commit 066d2a268a6099caf0c874a1709dc3160e5f5a99
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Tue May 9 22:05:15 2017 +0100
Add epoch to kmod-nvidia-newest obsolete version
nvidia-kmod.spec | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index fbdc943..116170e 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -10,7 +10,7 @@ Name: nvidia-kmod
Epoch: 2
Version: 375.66
# Taken over by kmodtool
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -30,7 +30,7 @@ BuildRequires: %{AkmodsBuildRequires}
%{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} }
# kmodtool does its magic here
-%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterfile %{SOURCE11} --obsolete-name nvidia-newest --obsolete-version "%{version}" %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
+%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterfile %{SOURCE11} --obsolete-name nvidia-newest --obsolete-version "%{?epoch}:%{version}" %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
%description
The nvidia %{version} display driver kernel module for kernel %{kversion}.
@@ -39,7 +39,7 @@ The nvidia %{version} display driver kernel module for kernel %{kversion}.
# error out if there was something wrong with kmodtool
%{?kmodtool_check}
# print kmodtool output for debugging purposes:
-kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterfile %{SOURCE11} --obsolete-name nvidia-newest --obsolete-version "%{version}" %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
+kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterfile %{SOURCE11} --obsolete-name nvidia-newest --obsolete-version "%{?epoch}:%{version}" %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
%setup -T -c
tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{version}-%{_target_cpu}.tar.xz
# patch loop
@@ -73,6 +73,9 @@ done
%changelog
+* Tue May 09 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 2:375.66-2
+- Add epoch to kmod-nvidia-newest obsolete version
+
* Fri May 05 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 2:375.66-1
- Update to 375.66 release
7 years, 4 months
[nvidia-kmod/el7] Update to 375.66 release
by Nicolas Chauvet
commit 5e54dbe560d705fc721d2fc908cfce3ea13f7434
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Sat May 6 00:21:51 2017 +0100
Update to 375.66 release
kernel_4.11.patch | 103 +-----------------------------------------------------
nvidia-kmod.spec | 7 ++--
2 files changed, 6 insertions(+), 104 deletions(-)
---
diff --git a/kernel_4.11.patch b/kernel_4.11.patch
index 09daf25..dd6e508 100644
--- a/kernel_4.11.patch
+++ b/kernel_4.11.patch
@@ -1,104 +1,3 @@
---- a/kernel/nvidia-drm/nvidia-drm-drv.c
-+++ b/kernel/nvidia-drm/nvidia-drm-drv.c
-@@ -48,6 +48,8 @@
- #include <drm/drm_auth.h>
- #endif
-
-+#include <linux/version.h>
-+
- static struct nvidia_drm_device *dev_list = NULL;
-
- #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
-@@ -398,7 +400,11 @@
- return 0;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- static int nvidia_drm_unload(struct drm_device *dev)
-+#else
-+static void nvidia_drm_unload(struct drm_device *dev)
-+#endif
- {
- #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
- struct NvKmsKapiDevice *pDevice = NULL;
-@@ -412,7 +418,11 @@
-
- if (!nvidia_drm_modeset_enabled(dev))
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- return 0;
-+#else
-+ return;
-+#endif
- }
-
- mutex_lock(&nv_dev->lock);
-@@ -445,7 +455,11 @@
-
- #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- return 0;
-+#else
-+ return;
-+#endif
- }
-
- #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
-@@ -542,7 +556,9 @@
- void *data,
- struct drm_file *file_priv)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
- struct nvidia_drm_device *nv_dev = dev->dev_private;
-+#endif
- struct drm_nvidia_get_client_capability_params *params = data;
-
- switch (params->capability)
-
---- a/kernel/nvidia-drm/nvidia-drm-gem.c
-+++ b/kernel/nvidia-drm/nvidia-drm-gem.c
-@@ -31,6 +31,8 @@
-
- #include "nv-mm.h"
-
-+#include <linux/version.h>
-+
- static struct nvidia_drm_gem_object *nvidia_drm_gem_new
- (
- struct drm_file *file_priv,
-@@ -511,11 +513,19 @@
- * Note that nvidia_drm_vma_fault() can be called for different or same
- * ranges of the same drm_gem_object simultaneously.
- */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- static int nvidia_drm_vma_fault(struct vm_area_struct *vma,
- struct vm_fault *vmf)
-+#else
-+static int nvidia_drm_vma_fault(struct vm_fault *vmf)
-+#endif
- {
- unsigned long address = nv_page_fault_va(vmf);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- struct drm_gem_object *gem = vma->vm_private_data;
-+#else
-+ struct drm_gem_object *gem = vmf->vma->vm_private_data;
-+#endif
- struct nvidia_drm_gem_object *nv_gem =
- DRM_GEM_OBJECT_TO_NV_GEM_OBJECT(gem);
- unsigned long page_offset, pfn;
-@@ -526,7 +536,11 @@
-
- page_offset = vmf->pgoff - drm_vma_node_start(&gem->vma_node);
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- ret = vm_insert_pfn(vma, address, pfn + page_offset);
-+#else
-+ ret = vm_insert_pfn(vmf->vma, address, pfn + page_offset);
-+#endif
-
- switch (ret) {
- case 0:
--- a/kernel/nvidia-drm/nvidia-drm-linux.c
+++ b/kernel/nvidia-drm/nvidia-drm-linux.c
@@ -20,6 +20,8 @@
@@ -110,7 +9,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/err.h>
-@@ -185,7 +187,11 @@
+@@ -196,7 +198,11 @@
module_exit(nv_linux_drm_exit);
#if defined(MODULE_LICENSE)
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index 49ec009..fbdc943 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -7,8 +7,8 @@
%global debug_package %{nil}
Name: nvidia-kmod
-Epoch: 1
-Version: 381.09
+Epoch: 2
+Version: 375.66
# Taken over by kmodtool
Release: 1%{?dist}
Summary: NVIDIA display driver kernel module
@@ -73,6 +73,9 @@ done
%changelog
+* Fri May 05 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 2:375.66-1
+- Update to 375.66 release
+
* Fri Apr 07 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:381.09-1
- Update to 381.09 beta
7 years, 4 months
[nvidia-kmod/el7] Update to 381.09 beta
by Nicolas Chauvet
commit 5e9af9df47a96ad662e7411258150112cada85b9
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Fri Apr 7 11:12:39 2017 +0100
Update to 381.09 beta
kernel_4.10.patch | 382 ------------------------------------------------------
kernel_4.11.patch | 125 ++++++++++++++++++
nvidia-kmod.spec | 7 +-
3 files changed, 130 insertions(+), 384 deletions(-)
---
diff --git a/kernel_4.11.patch b/kernel_4.11.patch
new file mode 100644
index 0000000..09daf25
--- /dev/null
+++ b/kernel_4.11.patch
@@ -0,0 +1,125 @@
+--- a/kernel/nvidia-drm/nvidia-drm-drv.c
++++ b/kernel/nvidia-drm/nvidia-drm-drv.c
+@@ -48,6 +48,8 @@
+ #include <drm/drm_auth.h>
+ #endif
+
++#include <linux/version.h>
++
+ static struct nvidia_drm_device *dev_list = NULL;
+
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+@@ -398,7 +400,11 @@
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ static int nvidia_drm_unload(struct drm_device *dev)
++#else
++static void nvidia_drm_unload(struct drm_device *dev)
++#endif
+ {
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+ struct NvKmsKapiDevice *pDevice = NULL;
+@@ -412,7 +418,11 @@
+
+ if (!nvidia_drm_modeset_enabled(dev))
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ return 0;
++#else
++ return;
++#endif
+ }
+
+ mutex_lock(&nv_dev->lock);
+@@ -445,7 +455,11 @@
+
+ #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ return 0;
++#else
++ return;
++#endif
+ }
+
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+@@ -542,7 +556,9 @@
+ void *data,
+ struct drm_file *file_priv)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
+ struct nvidia_drm_device *nv_dev = dev->dev_private;
++#endif
+ struct drm_nvidia_get_client_capability_params *params = data;
+
+ switch (params->capability)
+
+--- a/kernel/nvidia-drm/nvidia-drm-gem.c
++++ b/kernel/nvidia-drm/nvidia-drm-gem.c
+@@ -31,6 +31,8 @@
+
+ #include "nv-mm.h"
+
++#include <linux/version.h>
++
+ static struct nvidia_drm_gem_object *nvidia_drm_gem_new
+ (
+ struct drm_file *file_priv,
+@@ -511,11 +513,19 @@
+ * Note that nvidia_drm_vma_fault() can be called for different or same
+ * ranges of the same drm_gem_object simultaneously.
+ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ static int nvidia_drm_vma_fault(struct vm_area_struct *vma,
+ struct vm_fault *vmf)
++#else
++static int nvidia_drm_vma_fault(struct vm_fault *vmf)
++#endif
+ {
+ unsigned long address = nv_page_fault_va(vmf);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ struct drm_gem_object *gem = vma->vm_private_data;
++#else
++ struct drm_gem_object *gem = vmf->vma->vm_private_data;
++#endif
+ struct nvidia_drm_gem_object *nv_gem =
+ DRM_GEM_OBJECT_TO_NV_GEM_OBJECT(gem);
+ unsigned long page_offset, pfn;
+@@ -526,7 +536,11 @@
+
+ page_offset = vmf->pgoff - drm_vma_node_start(&gem->vma_node);
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ ret = vm_insert_pfn(vma, address, pfn + page_offset);
++#else
++ ret = vm_insert_pfn(vmf->vma, address, pfn + page_offset);
++#endif
+
+ switch (ret) {
+ case 0:
+--- a/kernel/nvidia-drm/nvidia-drm-linux.c
++++ b/kernel/nvidia-drm/nvidia-drm-linux.c
+@@ -20,6 +20,8 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#include <linux/version.h>
++
+ #include <linux/module.h>
+ #include <linux/slab.h>
+ #include <linux/err.h>
+@@ -185,7 +187,11 @@
+ module_exit(nv_linux_drm_exit);
+
+ #if defined(MODULE_LICENSE)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 10, 0)
++ MODULE_LICENSE("Dual MIT/GPL");
++#else
+ MODULE_LICENSE("MIT");
++#endif
+ #endif
+ #if defined(MODULE_INFO)
+ MODULE_INFO(supported, "external");
+
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index d84fb75..49ec009 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -8,7 +8,7 @@
Name: nvidia-kmod
Epoch: 1
-Version: 378.13
+Version: 381.09
# Taken over by kmodtool
Release: 1%{?dist}
Summary: NVIDIA display driver kernel module
@@ -19,7 +19,7 @@ URL: http://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: nv-linux-arm.patch
Patch1: nv-linux-arm2.patch
-Patch2: kernel_4.10.patch
+Patch2: kernel_4.11.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i686 x86_64 armv7hl
@@ -73,6 +73,9 @@ done
%changelog
+* Fri Apr 07 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:381.09-1
+- Update to 381.09 beta
+
* Sun Mar 05 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:378.13-1
- Update to 378.13
7 years, 4 months
[nvidia-kmod/el7] Update to 378.13
by Nicolas Chauvet
commit 44b1a0922ca470b922d3d3928256e191a37470e7
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Sun Mar 5 08:36:53 2017 +0000
Update to 378.13
nvidia-kmod.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index c99ab53..d84fb75 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -8,9 +8,9 @@
Name: nvidia-kmod
Epoch: 1
-Version: 375.39
+Version: 378.13
# Taken over by kmodtool
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -73,6 +73,9 @@ done
%changelog
+* Sun Mar 05 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:378.13-1
+- Update to 378.13
+
* Mon Feb 20 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:375.39-2
- patch for 4.10 kernel
7 years, 4 months
[nvidia-kmod/el7] patch for 4.10 kernel
by Nicolas Chauvet
commit 9ddac9b8d6a72a5735bb30079c15bfad4adf4611
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Mon Feb 20 21:12:26 2017 +0000
patch for 4.10 kernel
kernel_4.10.patch | 382 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
nvidia-kmod.spec | 7 +-
2 files changed, 388 insertions(+), 1 deletion(-)
---
diff --git a/kernel_4.10.patch b/kernel_4.10.patch
new file mode 100644
index 0000000..4ad9f8a
--- /dev/null
+++ b/kernel_4.10.patch
@@ -0,0 +1,382 @@
+From ca8b106738521823707f3567cedb41ca158792a3 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone(a)canonical.com>
+Date: Wed, 15 Feb 2017 10:53:42 +0100
+Subject: [PATCH 1/1] Add support for Linux 4.10
+
+---
+ common/inc/nv-mm.h | 9 ++++--
+ nvidia-drm/nvidia-drm-fence.c | 72 +++++++++++++++++++++++++++++++++++++++++++
+ nvidia-drm/nvidia-drm-gem.h | 6 ++++
+ nvidia-drm/nvidia-drm-priv.h | 7 +++++
+ nvidia/nv-pat.c | 40 ++++++++++++++++++++++++
+ 5 files changed, 132 insertions(+), 2 deletions(-)
+
+diff --git a/kernel/common/inc/nv-mm.h b/kernel/common/inc/nv-mm.h
+index 06d7da4..e5cc56a 100644
+--- a/kernel/common/inc/nv-mm.h
++++ b/kernel/common/inc/nv-mm.h
+@@ -46,6 +46,8 @@
+ * 2016 Dec 14:5b56d49fc31dbb0487e14ead790fc81ca9fb2c99
+ */
+
++#include <linux/version.h>
++
+ #if defined(NV_GET_USER_PAGES_REMOTE_PRESENT)
+ #if defined(NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS)
+ #define NV_GET_USER_PAGES get_user_pages
+@@ -92,10 +94,13 @@
+ pages, vmas, NULL);
+
+ #else
+-
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ return get_user_pages_remote(tsk, mm, start, nr_pages, flags,
+ pages, vmas);
+-
++#else
++ return get_user_pages_remote(tsk, mm, start, nr_pages, flags,
++ pages, vmas, NULL);
++#endif
+ #endif
+
+ }
+diff --git a/kernel/nvidia-drm/nvidia-drm-fence.c b/kernel/nvidia-drm/nvidia-drm-fence.c
+index 5e98c5f..fa2c508 100644
+--- a/kernel/nvidia-drm/nvidia-drm-fence.c
++++ b/kernel/nvidia-drm/nvidia-drm-fence.c
+@@ -31,7 +31,11 @@
+
+ #if defined(NV_DRM_DRIVER_HAS_GEM_PRIME_RES_OBJ)
+ struct nv_fence {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ struct fence base;
++#else
++ struct dma_fence base;
++#endif
+ spinlock_t lock;
+
+ struct nvidia_drm_device *nv_dev;
+@@ -51,7 +55,11 @@ nv_fence_ready_to_signal(struct nv_fence *nv_fence)
+
+ static const char *nvidia_drm_gem_prime_fence_op_get_driver_name
+ (
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ struct fence *fence
++#else
++ struct dma_fence *fence
++#endif
+ )
+ {
+ return "NVIDIA";
+@@ -59,7 +67,11 @@ static const char *nvidia_drm_gem_prime_fence_op_get_driver_name
+
+ static const char *nvidia_drm_gem_prime_fence_op_get_timeline_name
+ (
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ struct fence *fence
++#else
++ struct dma_fence *fence
++#endif
+ )
+ {
+ return "nvidia.prime";
+@@ -67,7 +79,11 @@ static const char *nvidia_drm_gem_prime_fence_op_get_timeline_name
+
+ static bool nvidia_drm_gem_prime_fence_op_signaled
+ (
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ struct fence *fence
++#else
++ struct dma_fence *fence
++#endif
+ )
+ {
+ struct nv_fence *nv_fence = container_of(fence, struct nv_fence, base);
+@@ -99,7 +115,11 @@ unlock_struct_mutex:
+
+ static bool nvidia_drm_gem_prime_fence_op_enable_signaling
+ (
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ struct fence *fence
++#else
++ struct dma_fence *fence
++#endif
+ )
+ {
+ bool ret = true;
+@@ -107,7 +127,11 @@ static bool nvidia_drm_gem_prime_fence_op_enable_signaling
+ struct nvidia_drm_gem_object *nv_gem = nv_fence->nv_gem;
+ struct nvidia_drm_device *nv_dev = nv_fence->nv_dev;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ if (fence_is_signaled(fence))
++#else
++ if (dma_fence_is_signaled(fence))
++#endif
+ {
+ return false;
+ }
+@@ -136,7 +160,11 @@ static bool nvidia_drm_gem_prime_fence_op_enable_signaling
+ }
+
+ nv_gem->fenceContext.softFence = fence;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ fence_get(fence);
++#else
++ dma_fence_get(fence);
++#endif
+
+ unlock_struct_mutex:
+ mutex_unlock(&nv_dev->dev->struct_mutex);
+@@ -146,7 +174,11 @@ unlock_struct_mutex:
+
+ static void nvidia_drm_gem_prime_fence_op_release
+ (
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ struct fence *fence
++#else
++ struct dma_fence *fence
++#endif
+ )
+ {
+ struct nv_fence *nv_fence = container_of(fence, struct nv_fence, base);
+@@ -155,7 +187,11 @@ static void nvidia_drm_gem_prime_fence_op_release
+
+ static signed long nvidia_drm_gem_prime_fence_op_wait
+ (
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ struct fence *fence,
++#else
++ struct dma_fence *fence,
++#endif
+ bool intr,
+ signed long timeout
+ )
+@@ -170,12 +206,20 @@ static signed long nvidia_drm_gem_prime_fence_op_wait
+ * that it should never get hit during normal operation, but not so long
+ * that the system becomes unresponsive.
+ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ return fence_default_wait(fence, intr,
++#else
++ return dma_fence_default_wait(fence, intr,
++#endif
+ (timeout == MAX_SCHEDULE_TIMEOUT) ?
+ msecs_to_jiffies(96) : timeout);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ static const struct fence_ops nvidia_drm_gem_prime_fence_ops = {
++#else
++static const struct dma_fence_ops nvidia_drm_gem_prime_fence_ops = {
++#endif
+ .get_driver_name = nvidia_drm_gem_prime_fence_op_get_driver_name,
+ .get_timeline_name = nvidia_drm_gem_prime_fence_op_get_timeline_name,
+ .signaled = nvidia_drm_gem_prime_fence_op_signaled,
+@@ -285,7 +329,11 @@ static void nvidia_drm_gem_prime_fence_signal
+ bool force
+ )
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ struct fence *fence = nv_gem->fenceContext.softFence;
++#else
++ struct dma_fence *fence = nv_gem->fenceContext.softFence;
++#endif
+
+ WARN_ON(!mutex_is_locked(&nv_dev->dev->struct_mutex));
+
+@@ -301,10 +349,18 @@ static void nvidia_drm_gem_prime_fence_signal
+
+ if (force || nv_fence_ready_to_signal(nv_fence))
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ fence_signal(&nv_fence->base);
++#else
++ dma_fence_signal(&nv_fence->base);
++#endif
+
+ nv_gem->fenceContext.softFence = NULL;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ fence_put(&nv_fence->base);
++#else
++ dma_fence_put(&nv_fence->base);
++#endif
+
+ nvKms->disableChannelEvent(nv_dev->pDevice,
+ nv_gem->fenceContext.cb);
+@@ -320,7 +376,11 @@ static void nvidia_drm_gem_prime_fence_signal
+
+ nv_fence = container_of(fence, struct nv_fence, base);
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ fence_signal(&nv_fence->base);
++#else
++ dma_fence_signal(&nv_fence->base);
++#endif
+ }
+ }
+
+@@ -513,7 +573,11 @@ int nvidia_drm_gem_prime_fence_init
+ * fence_context_alloc() cannot fail, so we do not need to check a return
+ * value.
+ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ nv_gem->fenceContext.context = fence_context_alloc(1);
++#else
++ nv_gem->fenceContext.context = dma_fence_context_alloc(1);
++#endif
+
+ ret = nvidia_drm_gem_prime_fence_import_semaphore(
+ nv_dev, nv_gem, p->index,
+@@ -670,7 +734,11 @@ int nvidia_drm_gem_prime_fence_attach
+ nv_fence->nv_gem = nv_gem;
+
+ spin_lock_init(&nv_fence->lock);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ fence_init(&nv_fence->base, &nvidia_drm_gem_prime_fence_ops,
++#else
++ dma_fence_init(&nv_fence->base, &nvidia_drm_gem_prime_fence_ops,
++#endif
+ &nv_fence->lock, nv_gem->fenceContext.context,
+ p->sem_thresh);
+
+@@ -680,7 +748,11 @@ int nvidia_drm_gem_prime_fence_attach
+
+ reservation_object_add_excl_fence(&nv_gem->fenceContext.resv,
+ &nv_fence->base);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ fence_put(&nv_fence->base); /* Reservation object has reference */
++#else
++ dma_fence_put(&nv_fence->base);
++#endif
+
+ ret = 0;
+
+diff --git a/kernel/nvidia-drm/nvidia-drm-gem.h b/kernel/nvidia-drm/nvidia-drm-gem.h
+index 4ff45e8..394576b 100644
+--- a/kernel/nvidia-drm/nvidia-drm-gem.h
++++ b/kernel/nvidia-drm/nvidia-drm-gem.h
+@@ -29,6 +29,8 @@
+
+ #include "nvidia-drm-priv.h"
+
++#include <linux/version.h>
++
+ #include <drm/drmP.h>
+ #include "nvkms-kapi.h"
+
+@@ -98,7 +100,11 @@ struct nvidia_drm_gem_object
+ /* Software signaling structures */
+ struct NvKmsKapiChannelEvent *cb;
+ struct nvidia_drm_gem_prime_soft_fence_event_args *cbArgs;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ struct fence *softFence; /* Fence for software signaling */
++#else
++ struct dma_fence *softFence;
++#endif
+ } fenceContext;
+ #endif
+ };
+diff --git a/kernel/nvidia-drm/nvidia-drm-priv.h b/kernel/nvidia-drm/nvidia-drm-priv.h
+index 1e9b9f9..ae171e7 100644
+--- a/kernel/nvidia-drm/nvidia-drm-priv.h
++++ b/kernel/nvidia-drm/nvidia-drm-priv.h
+@@ -25,6 +25,8 @@
+
+ #include "conftest.h" /* NV_DRM_AVAILABLE */
+
++#include <linux/version.h>
++
+ #if defined(NV_DRM_AVAILABLE)
+
+ #include <drm/drmP.h>
+@@ -34,7 +36,12 @@
+ #endif
+
+ #if defined(NV_DRM_DRIVER_HAS_GEM_PRIME_RES_OBJ)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ #include <linux/fence.h>
++#else
++#include <linux/dma-fence.h>
++#endif
++
+ #include <linux/reservation.h>
+ #endif
+
+diff --git a/kernel/nvidia/nv-pat.c b/kernel/nvidia/nv-pat.c
+index df78020..0af7d47 100644
+--- a/kernel/nvidia/nv-pat.c
++++ b/kernel/nvidia/nv-pat.c
+@@ -203,6 +203,7 @@ void nv_disable_pat_support(void)
+ }
+
+ #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ static int
+ nvidia_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
+ {
+@@ -234,6 +235,34 @@ static struct notifier_block nv_hotcpu_nfb = {
+ .notifier_call = nvidia_cpu_callback,
+ .priority = 0
+ };
++#else
++static int nvidia_cpu_online(unsigned int hcpu)
++{
++ unsigned int cpu = get_cpu();
++ if (cpu == hcpu)
++ nv_setup_pat_entries(NULL);
++ else
++ NV_SMP_CALL_FUNCTION(nv_setup_pat_entries, (void *)(long int)hcpu, 1);
++
++ put_cpu();
++
++ return 0;
++}
++
++static int nvidia_cpu_down_prep(unsigned int hcpu)
++{
++ unsigned int cpu = get_cpu();
++ if (cpu == hcpu)
++ nv_restore_pat_entries(NULL);
++ else
++ NV_SMP_CALL_FUNCTION(nv_restore_pat_entries, (void *)(long int)hcpu, 1);
++
++ put_cpu();
++
++ return 0;
++}
++#endif
++
+ #endif
+
+ int nv_init_pat_support(nvidia_stack_t *sp)
+@@ -255,7 +284,14 @@ int nv_init_pat_support(nvidia_stack_t *sp)
+ #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU)
+ if (nv_pat_mode == NV_PAT_MODE_BUILTIN)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0)
++#else
++ if (cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
++ "gpu/nvidia:online",
++ nvidia_cpu_online,
++ nvidia_cpu_down_prep) != 0)
++#endif
+ {
+ nv_disable_pat_support();
+ nv_printf(NV_DBG_ERRORS,
+@@ -280,7 +316,11 @@ void nv_teardown_pat_support(void)
+ {
+ nv_disable_pat_support();
+ #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ unregister_hotcpu_notifier(&nv_hotcpu_nfb);
++#else
++ cpuhp_remove_state_nocalls(CPUHP_AP_ONLINE_DYN);
++#endif
+ #endif
+ }
+ }
+--
+2.7.4
+
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index a458dd6..c99ab53 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -10,7 +10,7 @@ Name: nvidia-kmod
Epoch: 1
Version: 375.39
# Taken over by kmodtool
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -19,6 +19,7 @@ URL: http://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: nv-linux-arm.patch
Patch1: nv-linux-arm2.patch
+Patch2: kernel_4.10.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i686 x86_64 armv7hl
@@ -44,6 +45,7 @@ tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{versi
# patch loop
%patch0 -p1
%patch1 -p1
+%patch2 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -71,6 +73,9 @@ done
%changelog
+* Mon Feb 20 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:375.39-2
+- patch for 4.10 kernel
+
* Wed Feb 15 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:375.39-1
- Update to 375.39 release
7 years, 4 months
[nvidia-kmod/el7] Update to 375.39 release
by Nicolas Chauvet
commit 97332642f3323d080c80eb4c0ea98fe19992d8e5
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Wed Feb 15 07:39:17 2017 +0000
Update to 375.39 release
nvidia-kmod.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index 09803a7..a458dd6 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -8,7 +8,7 @@
Name: nvidia-kmod
Epoch: 1
-Version: 375.26
+Version: 375.39
# Taken over by kmodtool
Release: 1%{?dist}
Summary: NVIDIA display driver kernel module
@@ -71,6 +71,9 @@ done
%changelog
+* Wed Feb 15 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:375.39-1
+- Update to 375.39 release
+
* Wed Dec 14 2016 leigh scott <leigh123linux(a)googlemail.com> - 1:375.26-1
- Update to 375.26
7 years, 4 months
[nvidia-kmod/el7] Clean-up
by Nicolas Chauvet
commit ed4accd50b097eb5f37206099a1089b6517d3b18
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Feb 9 12:41:18 2017 +0100
Clean-up
nvidia-kmod.spec | 6 ------
1 file changed, 6 deletions(-)
---
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index 328ab9f..09803a7 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -20,8 +20,6 @@ Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: nv-linux-arm.patch
Patch1: nv-linux-arm2.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i686 x86_64 armv7hl
@@ -63,7 +61,6 @@ done
%install
-rm -rf $RPM_BUILD_ROOT
for kernel_version in %{?kernel_versions}; do
mkdir -p $RPM_BUILD_ROOT/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
install -D -m 0755 _kmod_build_${kernel_version%%___*}/nvidia*.ko \
@@ -72,9 +69,6 @@ done
%{?akmod_install}
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%changelog
* Wed Dec 14 2016 leigh scott <leigh123linux(a)googlemail.com> - 1:375.26-1
7 years, 4 months
[VirtualBox] clean some patches
by Sérgio M. Basto
commit 4d2f0c8f00b141143cfc9878833e0cd59ff4e17f
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Thu Jul 6 20:10:49 2017 +0100
clean some patches
VirtualBox.spec | 8 --------
.../VirtualBox-5.0.16-glibc.patch | 0
smap.diff => not_in_use/smap.diff | 0
3 files changed, 8 deletions(-)
---
diff --git a/VirtualBox.spec b/VirtualBox.spec
index d67f001..7105f74 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -57,11 +57,7 @@ Patch26: VirtualBox-4.3.0-no-bundles.patch
Patch27: VirtualBox-gcc.patch
# from Debian
Patch28: 02-gsoap-build-fix.patch
-# glibc fix is just for glibc-2.24 (Fedora 25+) but Oracle opt by another fix
-# https://www.virtualbox.org/ticket/15205
-Patch34: VirtualBox-5.0.16-glibc.patch
Patch35: VirtualBox-5.0.22-guest_soname.patch
-Patch37: smap.diff
# from Mageia
Patch50: VirtualBox-5.1.0-add-Mageia-support.patch
Patch51: VirtualBox-5.1.0-revert-VBox.sh.patch
@@ -263,11 +259,7 @@ rm -r src/libs/zlib-1.2.8/
%if 0%{?fedora} > 20
%patch28 -p1 -b .gsoap2
%endif
-%if 0%{?fedora} > 24
-#patch34 -p1 -b .glibc
-%endif
%patch35 -p1 -b .soname
-%patch37 -p1 -b .kernel4.7-smap
%patch50 -p1 -b .mageia-support
%patch51 -p1 -b .revert-VBox.sh
diff --git a/VirtualBox-5.0.16-glibc.patch b/not_in_use/VirtualBox-5.0.16-glibc.patch
similarity index 100%
rename from VirtualBox-5.0.16-glibc.patch
rename to not_in_use/VirtualBox-5.0.16-glibc.patch
diff --git a/smap.diff b/not_in_use/smap.diff
similarity index 100%
rename from smap.diff
rename to not_in_use/smap.diff
7 years, 4 months
[xorg-x11-drv-nvidia] Fixup for rhel
by Nicolas Chauvet
commit d550940d3825c629471ae584d0b63f4a63013ea6
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Wed Jul 5 17:59:44 2017 +0200
Fixup for rhel
xorg-x11-drv-nvidia.spec | 10 +++++-----
xorg.conf.nvidia | 9 ---------
2 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index f71a3c3..7575c61 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -42,7 +42,6 @@ Source0: http://download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-
Source1: http://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x...
Source2: http://download.nvidia.com/XFree86/Linux-32bit-ARM/%{version}/NVIDIA-Linu...
-Source3: xorg.conf.nvidia
Source4: 99-nvidia.conf
Source5: 00-avoid-glamor.conf
Source6: blacklist-nouveau.conf
@@ -284,7 +283,7 @@ install -p -m 0644 10_nvidia.json %{buildroot}%{_datadir}/glvnd/egl_vendor.d/10_
# Blacklist nouveau, autoload nvidia-uvm module after nvidia module
mkdir -p %{buildroot}%{_modprobe_d}
install -p -m 0644 %{SOURCE15} %{buildroot}%{_modprobe_d}
-%if ! 0%{?fedora} >= 25
+%if 0%{?rhel} && 0%{?rhel} < 8
install -p -m 0644 %{SOURCE6} %{buildroot}%{_modprobe_d}
%endif
@@ -339,8 +338,9 @@ touch -r %{SOURCE10} %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
%else
install -pm 0644 nvidia-drm-outputclass.conf %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
install -pm 0644 %{SOURCE4} %{buildroot}%{_datadir}/X11/xorg.conf.d
-sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
-touch -r %{SOURCE4} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
+install -pm 0644 %{SOURCE5} %{buildroot}%{_datadir}/X11/xorg.conf.d
+sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_datadir}/X11/xorg.conf.d/99-nvidia.conf
+touch -r %{SOURCE4} %{buildroot}%{_datadir}/X11/xorg.conf.d/99-nvidia.conf
%endif
#Ghost Xorg nvidia.conf files
touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-avoid-glamor.conf
@@ -471,10 +471,10 @@ fi ||:
%ghost %{_sysconfdir}/X11/xorg.conf.d/00-avoid-glamor.conf
%ghost %{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
%ghost %{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
+%{_datadir}/X11/xorg.conf.d/nvidia.conf
%if 0%{?fedora} >= 25
%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
%{_dracut_conf_d}/99-nvidia-dracut.conf
-%{_datadir}/X11/xorg.conf.d/nvidia.conf
%else
# Owns the directory since libglvnd is optional here
%dir %{_datadir}/glvnd
7 years, 4 months
[xorg-x11-drv-nvidia/el7] Fixup for rhel
by Nicolas Chauvet
commit ce413621769246c2ec187e6aec722ea55cedba9b
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Wed Jul 5 17:59:44 2017 +0200
Fixup for rhel
xorg-x11-drv-nvidia.spec | 10 +++++-----
xorg.conf.nvidia | 9 ---------
2 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index f71a3c3..7575c61 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -42,7 +42,6 @@ Source0: http://download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-
Source1: http://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x...
Source2: http://download.nvidia.com/XFree86/Linux-32bit-ARM/%{version}/NVIDIA-Linu...
-Source3: xorg.conf.nvidia
Source4: 99-nvidia.conf
Source5: 00-avoid-glamor.conf
Source6: blacklist-nouveau.conf
@@ -284,7 +283,7 @@ install -p -m 0644 10_nvidia.json %{buildroot}%{_datadir}/glvnd/egl_vendor.d/10_
# Blacklist nouveau, autoload nvidia-uvm module after nvidia module
mkdir -p %{buildroot}%{_modprobe_d}
install -p -m 0644 %{SOURCE15} %{buildroot}%{_modprobe_d}
-%if ! 0%{?fedora} >= 25
+%if 0%{?rhel} && 0%{?rhel} < 8
install -p -m 0644 %{SOURCE6} %{buildroot}%{_modprobe_d}
%endif
@@ -339,8 +338,9 @@ touch -r %{SOURCE10} %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
%else
install -pm 0644 nvidia-drm-outputclass.conf %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
install -pm 0644 %{SOURCE4} %{buildroot}%{_datadir}/X11/xorg.conf.d
-sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
-touch -r %{SOURCE4} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
+install -pm 0644 %{SOURCE5} %{buildroot}%{_datadir}/X11/xorg.conf.d
+sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_datadir}/X11/xorg.conf.d/99-nvidia.conf
+touch -r %{SOURCE4} %{buildroot}%{_datadir}/X11/xorg.conf.d/99-nvidia.conf
%endif
#Ghost Xorg nvidia.conf files
touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-avoid-glamor.conf
@@ -471,10 +471,10 @@ fi ||:
%ghost %{_sysconfdir}/X11/xorg.conf.d/00-avoid-glamor.conf
%ghost %{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
%ghost %{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
+%{_datadir}/X11/xorg.conf.d/nvidia.conf
%if 0%{?fedora} >= 25
%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
%{_dracut_conf_d}/99-nvidia-dracut.conf
-%{_datadir}/X11/xorg.conf.d/nvidia.conf
%else
# Owns the directory since libglvnd is optional here
%dir %{_datadir}/glvnd
7 years, 4 months