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
--- /tmp/ports/usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-375.66/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
+++ /tmp/ports/usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-375.66/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 (+65 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
@@ -15,7 +16,9 @@
12
 
13
 #include <sys/consio.h>
14
 #include <sys/fbio.h>
15
+#ifdef DEV_SC
16
 #include <dev/syscons/syscons.h>
17
+#endif
18
 
19
 MALLOC_DEFINE(M_NVIDIA, "nvidia", "NVIDIA memory allocations");
20
 TASKQUEUE_DEFINE_THREAD(nvidia);
21
@@ -757,27 +760,29 @@ void NV_API_CALL os_get_screen_info(
22
     NvU16 *pFbPitch
23
 )
24
 {
25
+
26
+#ifdef DEV_VT
27
+	/* TODO */
28
+#endif
29
+
30
+#ifdef DEV_SC
31
     const sc_softc_t *sc = sc_get_softc(0, SC_KERNEL_CONSOLE);
32
+    const struct video_info *vi;
33
 
34
-    if (sc)
35
+    if (sc && sc->adp)
36
     {
37
-        const video_adapter_t *adp = sc->adp;
38
-
39
-        if (adp)
40
+        vi = &sc->adp->va_info;
41
+        if (vi && (vi->vi_flags & V_INFO_LINEAR))
42
         {
43
-            const struct video_info *vi = &adp->va_info;
44
-
45
-            if (vi && (vi->vi_flags & V_INFO_LINEAR))
46
-            {
47
-                *pPhysicalAddress = vi->vi_buffer;
48
-                *pFbWidth = vi->vi_width;
49
-                *pFbHeight = vi->vi_height;
50
-                *pFbDepth = vi->vi_depth;
51
-                *pFbPitch = adp->va_line_width;
52
-                return;
53
-            }
54
+	    *pPhysicalAddress = vi->vi_buffer;
55
+	    *pFbWidth = vi->vi_width;
56
+	    *pFbHeight = vi->vi_height;
57
+	    *pFbDepth = vi->vi_depth;
58
+	    *pFbPitch = sc->adp->va_line_width;
59
+	    return;
60
         }
61
     }
62
+#endif
63
 
64
     *pPhysicalAddress = 0;
65
     *pFbWidth = *pFbHeight = *pFbDepth = *pFbPitch = 0;

Return to bug 216050