diff options
Diffstat (limited to 'src/soc/intel/skylake/graphics.c')
-rw-r--r-- | src/soc/intel/skylake/graphics.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/soc/intel/skylake/graphics.c b/src/soc/intel/skylake/graphics.c index 95a37d673d..bda08c54c0 100644 --- a/src/soc/intel/skylake/graphics.c +++ b/src/soc/intel/skylake/graphics.c @@ -14,11 +14,13 @@ * GNU General Public License for more details. */ +#include <cbmem.h> #include <console/console.h> #include <device/pci.h> #include <drivers/intel/gma/i915_reg.h> #include <intelblocks/graphics.h> #include <drivers/intel/gma/opregion.h> +#include <soc/nvs.h> #include <soc/ramstage.h> uintptr_t fsp_soc_get_igd_bar(void) @@ -60,6 +62,21 @@ void graphics_soc_init(struct device *dev) /* Initialize PCI device, load/execute BIOS Option ROM */ pci_dev_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; } /* Initialize IGD OpRegion, called from ACPI code */ @@ -72,6 +89,7 @@ uintptr_t graphics_soc_write_acpi_opregion(struct device *device, uintptr_t current, struct acpi_rsdp *rsdp) { igd_opregion_t *opregion; + global_nvs_t *gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); /* If GOP is not used, exit here */ if (!IS_ENABLED(CONFIG_INTEL_GMA_ADD_VBT_DATA_FILE)) @@ -86,7 +104,8 @@ uintptr_t graphics_soc_write_acpi_opregion(struct device *device, if (intel_gma_init_igd_opregion(opregion) != CB_SUCCESS) return current; - + if (gnvs) + gnvs->aslb = (u32)(uintptr_t)opregion; update_igd_opregion(opregion); current += sizeof(igd_opregion_t); current = acpi_align_current(current); |