Module Name: src
Committed By: martin
Date: Sat Oct 21 12:59:25 UTC 2023
Modified Files:
src/sys/arch/x86/pci [netbsd-10]: pci_machdep.c
src/sys/arch/x86/x86 [netbsd-10]: genfb_machdep.c
Log Message:
Apply patch, requested by bouyer in ticket #433:
sys/arch/x86/pci/pci_machdep.c (apply patch)
sys/arch/x86/x86/genfb_machdep.c (apply patch)
Fix build of XEN kernels with genfb(4)
To generate a diff of this commit:
cvs rdiff -u -r1.93.4.3 -r1.93.4.4 src/sys/arch/x86/pci/pci_machdep.c
cvs rdiff -u -r1.19.4.3 -r1.19.4.4 src/sys/arch/x86/x86/genfb_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/pci/pci_machdep.c
diff -u src/sys/arch/x86/pci/pci_machdep.c:1.93.4.3 src/sys/arch/x86/pci/pci_machdep.c:1.93.4.4
--- src/sys/arch/x86/pci/pci_machdep.c:1.93.4.3 Wed Oct 18 16:53:03 2023
+++ src/sys/arch/x86/pci/pci_machdep.c Sat Oct 21 12:59:25 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.93.4.3 2023/10/18 16:53:03 martin Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.93.4.4 2023/10/21 12:59:25 martin Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.93.4.3 2023/10/18 16:53:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.93.4.4 2023/10/21 12:59:25 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1058,13 +1058,13 @@ static bool
x86_genfb_setmode(struct genfb_softc *sc, int newmode)
{
#if NGENFB > 0
-# if NACPICA > 0 && defined(VGA_POST)
+# if NACPICA > 0 && defined(VGA_POST) && !defined(XENPV)
static int curmode = WSDISPLAYIO_MODE_EMUL;
# endif
switch (newmode) {
case WSDISPLAYIO_MODE_EMUL:
-# if NACPICA > 0 && defined(VGA_POST)
+# if NACPICA > 0 && defined(VGA_POST) && !defined(XENPV)
if (curmode != newmode) {
if (vga_posth != NULL && acpi_md_vesa_modenum != 0) {
vga_post_set_vbe(vga_posth,
@@ -1075,7 +1075,7 @@ x86_genfb_setmode(struct genfb_softc *sc
break;
}
-# if NACPICA > 0 && defined(VGA_POST)
+# if NACPICA > 0 && defined(VGA_POST) && !defined(XENPV)
curmode = newmode;
# endif
#endif
@@ -1094,7 +1094,7 @@ x86_genfb_resume(device_t dev, const pmf
#if NGENFB > 0
struct pci_genfb_softc *psc = device_private(dev);
-#if NACPICA > 0 && defined(VGA_POST)
+#if NACPICA > 0 && defined(VGA_POST) && !defined(XENPV)
if (vga_posth != NULL && acpi_md_vbios_reset == 2) {
vga_post_call(vga_posth);
if (acpi_md_vesa_modenum != 0)
Index: src/sys/arch/x86/x86/genfb_machdep.c
diff -u src/sys/arch/x86/x86/genfb_machdep.c:1.19.4.3 src/sys/arch/x86/x86/genfb_machdep.c:1.19.4.4
--- src/sys/arch/x86/x86/genfb_machdep.c:1.19.4.3 Fri Oct 20 18:35:54 2023
+++ src/sys/arch/x86/x86/genfb_machdep.c Sat Oct 21 12:59:25 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_machdep.c,v 1.19.4.3 2023/10/20 18:35:54 martin Exp $ */
+/* $NetBSD: genfb_machdep.c,v 1.19.4.4 2023/10/21 12:59:25 martin Exp $ */
/*-
* Copyright (c) 2009 Jared D. McNeill <[email protected]>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.19.4.3 2023/10/20 18:35:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.19.4.4 2023/10/21 12:59:25 martin Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -137,7 +137,7 @@ x86_genfb_init(void)
return 0;
}
-#if NACPICA > 0
+#if NACPICA > 0 && !defined(XENPV)
acpi_md_vesa_modenum = fbinfo->vbemode;
#endif