aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/braswell/gfx.c
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2017-07-01 13:02:47 -0500
committerMartin Roth <martinroth@google.com>2018-03-30 07:20:38 +0000
commit132bbe6be537b5cb8e827e01f28086d3e3ce6677 (patch)
tree1ddef6690707b17c224430a4ce39878f8abbb922 /src/soc/intel/braswell/gfx.c
parentc7edf18f7c763762676eeb3bad084cd4c032cfcf (diff)
soc/intel/braswell: Save/restore GMA OpRegion address
Add global/ACPI nvs variables required for IGD OpRegion. Add functions necessary to save the ACPI OpRegion table address in ASLB, and restore table address upon S3 resume. Implementation modeled on existing Baytrail code. Test: boot Windows 10 on google/edgar with Tianocore payload and GOP display init, observe display driver loaded and functional, display not black screen when resuming from S3 suspend. Change-Id: I7c1fbf818510949420f70e93ed4780e94e598508 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/25197 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/soc/intel/braswell/gfx.c')
-rw-r--r--src/soc/intel/braswell/gfx.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/soc/intel/braswell/gfx.c b/src/soc/intel/braswell/gfx.c
index 4328abb243..8481446095 100644
--- a/src/soc/intel/braswell/gfx.c
+++ b/src/soc/intel/braswell/gfx.c
@@ -20,8 +20,10 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
+#include <drivers/intel/gma/opregion.h>
#include <reg_script.h>
#include <soc/gfx.h>
+#include <soc/nvs.h>
#include <soc/pci_devs.h>
#include <soc/ramstage.h>
@@ -73,6 +75,21 @@ static void gfx_init(device_t dev)
/* Post VBIOS Init */
gfx_post_vbios_init(dev);
+
+ intel_gma_restore_opregion();
+}
+
+uintptr_t gma_get_gnvs_aslb(const void *gnvs)
+{
+ const global_nvs_t *gnvs_ptr = gnvs;
+ return (uintptr_t)(gnvs_ptr ? gnvs_ptr->aslb : 0);
+}
+
+void gma_set_gnvs_aslb(void *gnvs, uintptr_t aslb)
+{
+ global_nvs_t *gnvs_ptr = gnvs;
+ if (gnvs_ptr)
+ gnvs_ptr->aslb = aslb;
}
static struct device_operations gfx_device_ops = {