summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/skylake/graphics.c
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2020-04-26 17:01:25 +0200
committerNico Huber <nico.h@gmx.de>2020-05-27 21:34:49 +0000
commitf2a0be235cdf72caff549a1cfe0b986bdd99e93b (patch)
treed2e66798375f6b644c97206d65684b9f7e95ce9d /src/soc/intel/skylake/graphics.c
parent4dc4cb6b5c835ca947356a4d4e8c10228966bebc (diff)
downloadcoreboot-f2a0be235cdf72caff549a1cfe0b986bdd99e93b.tar.gz
coreboot-f2a0be235cdf72caff549a1cfe0b986bdd99e93b.tar.bz2
coreboot-f2a0be235cdf72caff549a1cfe0b986bdd99e93b.zip
drivers/intel/gma: Move IGD OpRegion to CBMEM
It never was in GNVS, it never belonged among the ACPI tables. Having it in CBMEM, makes it easy to look the location up on resume, and saves us additional boilerplate. TEST=Booted Linux on Lenovo/X201s, confirmed ASLS is set and intel_backlight + acpi_video synchronize, both before and after suspend. Change-Id: I5fdd6634e4a671a85b1df8bc9815296ff42edf29 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40724 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/skylake/graphics.c')
-rw-r--r--src/soc/intel/skylake/graphics.c54
1 files changed, 2 insertions, 52 deletions
diff --git a/src/soc/intel/skylake/graphics.c b/src/soc/intel/skylake/graphics.c
index 0f6e35a173a3..dab7e145d103 100644
--- a/src/soc/intel/skylake/graphics.c
+++ b/src/soc/intel/skylake/graphics.c
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootmode.h>
-#include <cbmem.h>
#include <commonlib/helpers.h>
#include <console/console.h>
#include <device/pci.h>
@@ -12,7 +11,6 @@
#include <drivers/intel/gma/libgfxinit.h>
#include <intelblocks/graphics.h>
#include <drivers/intel/gma/opregion.h>
-#include <soc/nvs.h>
#include <soc/ramstage.h>
#include <types.h>
@@ -85,6 +83,8 @@ void graphics_soc_init(struct device *dev)
{
u32 ddi_buf_ctl;
+ intel_gma_init_igd_opregion();
+
graphics_setup_panel(dev);
/*
@@ -123,56 +123,6 @@ 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 */
-static void update_igd_opregion(igd_opregion_t *opregion)
-{
- /* FIXME: Add platform specific mailbox initialization */
-}
-
-uintptr_t graphics_soc_write_acpi_opregion(const 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 (!CONFIG(INTEL_GMA_ADD_VBT))
- return current;
-
- /* If IGD is disabled, exit here */
- if (pci_read_config16(device, PCI_VENDOR_ID) == 0xFFFF)
- return current;
-
- printk(BIOS_DEBUG, "ACPI: * IGD OpRegion\n");
- opregion = (igd_opregion_t *)current;
-
- 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);
-
- printk(BIOS_DEBUG, "current = %lx\n", current);
- return current;
}
const struct i915_gpu_controller_info *