PR# port-i386/41929: genfb and machdep.acpi_vbios_reset=2 interaction
When acpi_vbios_reset=2, invoke vga_post_call followed by vga_post_set_mode in the genfb pmf resume handler.
This commit is contained in:
parent
8984ef0dcd
commit
31ca9984a5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: x86_autoconf.c,v 1.42 2009/08/24 11:04:29 jmcneill Exp $ */
|
||||
/* $NetBSD: x86_autoconf.c,v 1.43 2009/08/24 11:35:27 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.42 2009/08/24 11:04:29 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.43 2009/08/24 11:35:27 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -53,19 +53,28 @@ __KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.42 2009/08/24 11:04:29 jmcneill E
|
||||
#include <machine/bootinfo.h>
|
||||
#include <machine/pio.h>
|
||||
|
||||
#include "acpica.h"
|
||||
#include "pci.h"
|
||||
#include "genfb.h"
|
||||
#include "wsdisplay.h"
|
||||
#include "opt_vga.h"
|
||||
|
||||
#ifdef VGA_POST
|
||||
#include <x86/vga_post.h>
|
||||
#endif
|
||||
#include <dev/isa/isavar.h>
|
||||
#if NPCI > 0
|
||||
#include <dev/pci/pcivar.h>
|
||||
#endif
|
||||
#include <dev/wsfb/genfbvar.h>
|
||||
#include <dev/pci/genfb_pcivar.h>
|
||||
#include <dev/ic/vgareg.h>
|
||||
|
||||
static struct genfb_colormap_callback gfb_cb;
|
||||
static struct genfb_pmf_callback pmf_cb;
|
||||
#ifdef VGA_POST
|
||||
static struct vga_post *vga_posth = NULL;
|
||||
#endif
|
||||
|
||||
struct disklist *x86_alldisks;
|
||||
int x86_ndisks;
|
||||
@ -89,9 +98,20 @@ x86_genfb_suspend(device_t dev PMF_FN_ARGS)
|
||||
static bool
|
||||
x86_genfb_resume(device_t dev PMF_FN_ARGS)
|
||||
{
|
||||
struct genfb_softc *sc = device_private(dev);
|
||||
struct pci_genfb_softc *psc = device_private(dev);
|
||||
#if NACPICA > 0 && defined(VGA_POST)
|
||||
extern int acpi_md_vbios_reset;
|
||||
extern int acpi_md_vesa_modenum;
|
||||
#endif
|
||||
|
||||
genfb_restore_palette(sc);
|
||||
#if NACPICA > 0 && defined(VGA_POST)
|
||||
if (vga_posth != NULL && acpi_md_vbios_reset == 2) {
|
||||
vga_post_call(vga_posth);
|
||||
if (acpi_md_vesa_modenum != 0)
|
||||
vga_post_set_vbe(vga_posth, acpi_md_vesa_modenum);
|
||||
}
|
||||
#endif
|
||||
genfb_restore_palette(&psc->sc_gen);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -618,6 +638,10 @@ device_register(device_t dev, void *aux)
|
||||
pmf_cb.gpc_resume = x86_genfb_resume;
|
||||
prop_dictionary_set_uint64(dict,
|
||||
"pmf_callback", (uint64_t)&pmf_cb);
|
||||
#ifdef VGA_POST
|
||||
vga_posth = vga_post_init(pa->pa_bus, pa->pa_device,
|
||||
pa->pa_function);
|
||||
#endif
|
||||
found_console = true;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user