nvidia: patch for linux 4.6

This commit is contained in:
Alessio Sergi 2016-05-28 18:01:08 +02:00
parent bab4843fe1
commit a6e2ed802e
2 changed files with 52 additions and 1 deletions

View file

@ -0,0 +1,50 @@
--- kernel/nvidia-drm/nvidia-drm-fb.c
+++ kernel/nvidia-drm/nvidia-drm-fb.c
@@ -77,7 +77,7 @@
static struct drm_framebuffer *internal_framebuffer_create
(
struct drm_device *dev,
- struct drm_file *file, struct drm_mode_fb_cmd2 *cmd,
+ struct drm_file *file, const struct drm_mode_fb_cmd2 *cmd,
uint64_t nvkms_params_ptr,
uint64_t nvkms_params_size
)
@@ -199,7 +199,7 @@
struct drm_framebuffer *nvidia_drm_framebuffer_create
(
struct drm_device *dev,
- struct drm_file *file, struct drm_mode_fb_cmd2 *cmd
+ struct drm_file *file, const struct drm_mode_fb_cmd2 *cmd
)
{
return internal_framebuffer_create(dev, file, cmd, 0, 0);
--- kernel/nvidia-drm/nvidia-drm-fb.h
+++ kernel/nvidia-drm/nvidia-drm-fb.h
@@ -45,7 +45,7 @@
struct drm_framebuffer *nvidia_drm_framebuffer_create
(
struct drm_device *dev,
- struct drm_file *file, struct drm_mode_fb_cmd2 *cmd
+ struct drm_file *file, const struct drm_mode_fb_cmd2 *cmd
);
int nvidia_drm_add_nvkms_fb(
--- kernel/nvidia-drm/nvidia-drm-linux.c
+++ kernel/nvidia-drm/nvidia-drm-linux.c
@@ -31,6 +31,7 @@
#if defined(NV_DRM_AVAILABLE)
+#include "nv-mm.h"
#include "nv-pgprot.h"
MODULE_PARM_DESC(
@@ -121,8 +122,7 @@
down_read(&mm->mmap_sem);
- pages_pinned = get_user_pages(current, mm,
- address, pages_count, write, force,
+ pages_pinned = NV_GET_USER_PAGES(address, pages_count, write, force,
user_pages, NULL);
up_read(&mm->mmap_sem);

View file

@ -4,7 +4,7 @@ _desc="NVIDIA drivers for linux (long-lived series)"
pkgname=nvidia
version=364.19
revision=1
revision=2
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="Proprietary NVIDIA license"
homepage="http://www.nvidia.com"
@ -42,6 +42,7 @@ do_extract() {
do_configure() {
cd ${_pkg}
# patches
patch -sNp0 -i ${FILESDIR}/linux-4.6.patch
}
do_install() {
cd ${_pkg}