void-packages/srcpkgs/nvidia/files/linux-4.6.patch
2016-05-28 18:05:24 +02:00

50 lines
1.5 KiB
Diff

--- 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);