View | Details | Raw Unified | Return to bug 216050 | Differences between
and this patch

Collapse All | Expand All

(-)x11/nvidia-driver/Makefile (-1 / +2 lines)
Lines 71-77 Link Here
71
.else
71
.else
72
EXTRA_PATCHES=	${FILESDIR}/extra-patch-src_nvidia_Makefile \
72
EXTRA_PATCHES=	${FILESDIR}/extra-patch-src_nvidia_Makefile \
73
		${FILESDIR}/extra-patch-src_nvidia_nv-freebsd.h \
73
		${FILESDIR}/extra-patch-src_nvidia_nv-freebsd.h \
74
		${FILESDIR}/extra-patch-src_nvidia_nv-misc.h
74
		${FILESDIR}/extra-patch-src_nvidia_nv-misc.h \
75
		${FILESDIR}/extra-patch-src_nvidia_nvidia_os.c
75
NVSRC=		nvidia
76
NVSRC=		nvidia
76
.endif
77
.endif
77
.if ${NVVERSION} >= 358.009
78
.if ${NVVERSION} >= 358.009
(-)x11/nvidia-driver/files/extra-patch-src_nvidia_Makefile (-6 / +17 lines)
Lines 1-11 Link Here
1
--- src/nvidia/Makefile.orig	2014-04-04 23:24:59.000000000 +0200
1
--- src/nvidia/Makefile.orig	2017-05-02 00:34:40.000000000 +0300
2
+++ src/nvidia/Makefile	2014-05-06 14:31:07.000000000 +0200
2
+++ src/nvidia/Makefile	2017-06-04 21:44:00.043530000 +0300
3
@@ -24,6 +24,15 @@
3
@@ -26,9 +26,25 @@
4
 stdarg.h:
4
 stdarg.h:
5
 	@ln -s machine/stdarg.h stdarg.h
5
 	@ln -s machine/stdarg.h stdarg.h
6
 
6
 
7
+SRCS+=		opt_global.h
7
+SRCS+=		opt_global.h opt_syscons.h
8
+.if ${MACHINE_ARCH} == "i386" && !defined(KERNBUILDDIR)
8
+.if defined(KERNBUILDDIR)
9
+MKDEP=		-include ${KERNBUILDDIR}/opt_global.h -include ${KERNBUILDDIR}/opt_syscons.h
10
+.else
11
+CFLAGS+=	-include opt_global.h -include opt_syscons.h
12
+MKDEP=		-include opt_global.h -include opt_syscons.h
13
+
14
+.if ${MACHINE_ARCH} == "i386"
9
+PAE!=		sed -n '/define NV_SUPPORT_PAE/p' nv-freebsd.h
15
+PAE!=		sed -n '/define NV_SUPPORT_PAE/p' nv-freebsd.h
10
+.if !empty(PAE)
16
+.if !empty(PAE)
11
+opt_global.h:
17
+opt_global.h:
Lines 12-18 Link Here
12
+		echo "#define PAE 1" > ${.TARGET}
18
+		echo "#define PAE 1" > ${.TARGET}
13
+.endif
19
+.endif
14
+.endif
20
+.endif
21
+.endif
15
+
22
+
16
 *.c: stdarg.h
23
 *.c: stdarg.h
17
 
24
 
18
 beforeinstall:	${KMOD}.ko
25
-beforeinstall:	${KMOD}.ko
26
+beforeinstall_dontexecute_dontexecute:	${KMOD}.ko
27
 
28
 all:	${OSOBJ}
29
 
(-)x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia_os.c (+67 lines)
Line 0 Link Here
1
--- src/nvidia/nvidia_os.c.orig	2017-05-01 21:17:21 UTC
2
+++ src/nvidia/nvidia_os.c
3
@@ -8,6 +8,7 @@
4
  * _NVRM_COPYRIGHT_END_
5
  */
6
 
7
+#include "opt_syscons.h"
8
 #include "nv-misc.h"
9
 #include "os-interface.h"
10
 #include "nv.h"
11
@@ -16,7 +17,9 @@
12
 #include <sys/consio.h>
13
 #include <sys/fbio.h>
14
 #include <sys/linker.h>
15
+#ifdef DEV_SC
16
 #include <dev/syscons/syscons.h>
17
+#endif
18
 
19
 // This bootloader metadata interface was added to metadata.h in FreeBSD 10.1
20
 // with commit 3a7cd99956b1 and FreeBSD 11 with commit d2c99117cd3b.
21
@@ -787,29 +790,32 @@
22
         }
23
     }
24
 #endif
25
+
26
+#ifdef DEV_VT
27
+	/* TODO */
28
+#endif
29
+
30
+#ifdef DEV_SC
31
     {
32
         const sc_softc_t *sc = sc_get_softc(0, SC_KERNEL_CONSOLE);
33
+        const struct video_info *vi;
34
 
35
-        if (sc)
36
+        if (sc && sc->adp)
37
         {
38
-            const video_adapter_t *adp = sc->adp;
39
+            vi = &sc->adp->va_info;
40
 
41
-            if (adp)
42
+            if (vi && (vi->vi_flags & V_INFO_LINEAR))
43
             {
44
-                const struct video_info *vi = &adp->va_info;
45
-
46
-                if (vi && (vi->vi_flags & V_INFO_LINEAR))
47
-                {
48
-                    *pPhysicalAddress = vi->vi_buffer;
49
-                    *pFbWidth = vi->vi_width;
50
-                    *pFbHeight = vi->vi_height;
51
-                    *pFbDepth = vi->vi_depth;
52
-                    *pFbPitch = adp->va_line_width;
53
-                    return;
54
-                }
55
+                *pPhysicalAddress = vi->vi_buffer;
56
+                *pFbWidth = vi->vi_width;
57
+                *pFbHeight = vi->vi_height;
58
+                *pFbDepth = vi->vi_depth;
59
+                *pFbPitch = sc->adp->va_line_width;
60
+                return;
61
             }
62
         }
63
     }
64
+#endif
65
 
66
     *pPhysicalAddress = 0;
67
     *pFbWidth = *pFbHeight = *pFbDepth = *pFbPitch = 0;

Return to bug 216050