Link Here
|
1 |
--- src/nvidia-modeset/nvidia-modeset-freebsd.c.orig 2018-08-21 23:09:28 UTC |
1 |
--- src/nvidia-modeset/nvidia-modeset-freebsd.c.orig 2020-09-23 00:54:46 UTC |
2 |
+++ src/nvidia-modeset/nvidia-modeset-freebsd.c |
2 |
+++ src/nvidia-modeset/nvidia-modeset-freebsd.c |
3 |
@@ -25,6 +25,7 @@ |
3 |
@@ -26,6 +26,7 @@ |
4 |
#include <sys/poll.h> |
|
|
5 |
#include <sys/file.h> |
4 |
#include <sys/file.h> |
6 |
#include <sys/proc.h> |
5 |
#include <sys/proc.h> |
|
|
6 |
#include <sys/stack.h> |
7 |
+#include <sys/sysproto.h> |
7 |
+#include <sys/sysproto.h> |
8 |
|
8 |
|
9 |
#include "nvkms-ioctl.h" |
9 |
#include "nvkms-ioctl.h" |
10 |
#include "nvidia-modeset-os-interface.h" |
10 |
#include "nvidia-modeset-os-interface.h" |
11 |
@@ -48,6 +49,7 @@ |
11 |
@@ -51,6 +52,7 @@ |
12 |
#include "machine/../linux32/linux32_proto.h" |
12 |
#include "machine/../linux32/linux32_proto.h" |
13 |
#endif |
13 |
#endif |
14 |
#include <compat/linux/linux_ioctl.h> |
14 |
#include <compat/linux/linux_ioctl.h> |
Link Here
|
16 |
#endif |
16 |
#endif |
17 |
|
17 |
|
18 |
|
18 |
|
19 |
@@ -250,7 +252,7 @@ struct nvkms_ref_ptr { |
19 |
@@ -267,7 +269,7 @@ struct nvkms_ref_ptr { |
20 |
|
20 |
|
21 |
struct nvkms_ref_ptr* NVKMS_API_CALL nvkms_alloc_ref_ptr(void *ptr) |
21 |
struct nvkms_ref_ptr* NVKMS_API_CALL nvkms_alloc_ref_ptr(void *ptr) |
22 |
{ |
22 |
{ |
Link Here
|
25 |
if (ref_ptr) { |
25 |
if (ref_ptr) { |
26 |
mtx_init(&ref_ptr->lock, "nvkms-ref-ptr-lock", NULL, MTX_SPIN); |
26 |
mtx_init(&ref_ptr->lock, "nvkms-ref-ptr-lock", NULL, MTX_SPIN); |
27 |
// The ref_ptr owner counts as a reference on the ref_ptr itself. |
27 |
// The ref_ptr owner counts as a reference on the ref_ptr itself. |
28 |
@@ -867,33 +869,31 @@ static int nvkms_poll( |
28 |
@@ -888,33 +890,31 @@ static int nvkms_poll( |
29 |
*************************************************************************/ |
29 |
*************************************************************************/ |
30 |
|
30 |
|
31 |
#if defined(NVKMS_SUPPORT_LINUX_COMPAT) |
31 |
#if defined(NVKMS_SUPPORT_LINUX_COMPAT) |
Link Here
|
76 |
} |
76 |
} |
77 |
|
77 |
|
78 |
#define NVKMS_LINUX_IOCTL_MIN _IOC(0, NVKMS_IOCTL_MAGIC, NVKMS_IOCTL_CMD, 0) |
78 |
#define NVKMS_LINUX_IOCTL_MIN _IOC(0, NVKMS_IOCTL_MAGIC, NVKMS_IOCTL_CMD, 0) |
79 |
@@ -909,6 +909,7 @@ static struct linux_ioctl_handler nvkms_linux_ioctl_ha |
79 |
@@ -930,6 +930,7 @@ static struct linux_ioctl_handler nvkms_linux_ioctl_ha |
80 |
static void nvkms_linux_compat_load(void) |
80 |
static void nvkms_linux_compat_load(void) |
81 |
{ |
81 |
{ |
82 |
#if defined(NVKMS_SUPPORT_LINUX_COMPAT) |
82 |
#if defined(NVKMS_SUPPORT_LINUX_COMPAT) |
Link Here
|
84 |
linux_ioctl_register_handler(&nvkms_linux_ioctl_handler); |
84 |
linux_ioctl_register_handler(&nvkms_linux_ioctl_handler); |
85 |
#endif |
85 |
#endif |
86 |
} |
86 |
} |
87 |
@@ -917,6 +918,7 @@ static void nvkms_linux_compat_unload(void) |
87 |
@@ -938,6 +939,7 @@ static void nvkms_linux_compat_unload(void) |
88 |
{ |
88 |
{ |
89 |
#if defined(NVKMS_SUPPORT_LINUX_COMPAT) |
89 |
#if defined(NVKMS_SUPPORT_LINUX_COMPAT) |
90 |
linux_ioctl_unregister_handler(&nvkms_linux_ioctl_handler); |
90 |
linux_ioctl_unregister_handler(&nvkms_linux_ioctl_handler); |
Link Here
|
92 |
#endif |
92 |
#endif |
93 |
} |
93 |
} |
94 |
|
94 |
|
95 |
@@ -1100,4 +1102,9 @@ MODULE_DEPEND(nvidia_modeset, /* module |
95 |
@@ -1121,4 +1123,9 @@ MODULE_DEPEND(nvidia_modeset, /* module |
96 |
MODULE_DEPEND(nvidia_modeset, /* module name */ |
96 |
MODULE_DEPEND(nvidia_modeset, /* module name */ |
97 |
linux, /* prerequisite module */ |
97 |
linux, /* prerequisite module */ |
98 |
1, 1, 1); /* vmin, vpref, vmax */ |
98 |
1, 1, 1); /* vmin, vpref, vmax */ |